{"id":15198514,"url":"https://github.com/wsmd/eslint-config","last_synced_at":"2025-06-29T13:03:49.343Z","repository":{"id":36380264,"uuid":"223826075","full_name":"wsmd/eslint-config","owner":"wsmd","description":"All-in-one, composable, ESLint configurations with support for TypeScript, React, Prettier, and Jest","archived":false,"fork":false,"pushed_at":"2023-01-07T12:14:34.000Z","size":253,"stargazers_count":10,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T18:13:56.737Z","etag":null,"topics":["eslint","eslint-config","javascript","jest","prettier","tslint","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wsmd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-24T23:33:23.000Z","updated_at":"2024-11-15T02:17:44.000Z","dependencies_parsed_at":"2023-01-17T00:57:57.858Z","dependency_job_id":null,"html_url":"https://github.com/wsmd/eslint-config","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/wsmd/eslint-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsmd%2Feslint-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsmd%2Feslint-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsmd%2Feslint-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsmd%2Feslint-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wsmd","download_url":"https://codeload.github.com/wsmd/eslint-config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsmd%2Feslint-config/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262598162,"owners_count":23334668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eslint","eslint-config","javascript","jest","prettier","tslint","typescript"],"created_at":"2024-09-28T01:20:36.144Z","updated_at":"2025-06-29T13:03:49.301Z","avatar_url":"https://github.com/wsmd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/2100222/69524696-8fac5600-0f5e-11ea-9258-f14132ff3c3c.png\" width=\"547\" /\u003e\n\n@wsmd/eslint-config\n\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@wsmd/eslint-config\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/@wsmd/eslint-config.svg\" alt=\"Current Release\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://travis-ci.org/wsmd/eslint-config\"\u003e\n    \u003cimg src=\"https://travis-ci.org/wsmd/eslint-config.svg?branch=master\" alt=\"CI Build\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://coveralls.io/github/wsmd/eslint-config?branch=master\"\u003e\n    \u003cimg src=\"https://coveralls.io/repos/github/wsmd/eslint-config/badge.svg?branch=master\" alt=\"Coverage Status\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/wsmd/eslint-config/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/wsmd/eslint-config.svg\" alt=\"Licence\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nAll-in-one, composable, ESLint configurations with support for:\n\n- **Javascript** (via Airbnb Javascript style guide)\n- **React** (via Airbnb React style guide)\n- **TypeScript**\n- **Prettier**\n- **Jest**\n\n\u003cdetails\u003e\n\u003csummary\u003e📖 Table of Contents\u003c/summary\u003e\n\u003cp\u003e\n\n- [Usage](#usage)\n- [Configurations](#configurations)\n  - [`@wsmd/eslint-config/base`](#wsmdeslint-configbase)\n  - [`@wsmd/eslint-config/react`](#wsmdeslint-configreact)\n  - [`@wsmd/eslint-config/typescript`](#wsmdeslint-configtypescript)\n  - [`@wsmd/eslint-config/prettier`](#wsmdeslint-configprettier)\n  - [`@wsmd/eslint-config/jest`](#wsmdeslint-configjest)\n  - [`@wsmd/eslint-config/all`](#wsmdeslint-configall)\n- [Composing Multiple Configurations](#composing-multiple-configurations)\n- [Gotchas](#gotchas)\n  - [Order of Configs](#order-of-configs)\n  - [Custom Rules](#custom-rules)\n- [License](#license)\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n## Usage\n\nThis package consists of various configurations that can be composed together depending on the needs of the project.\n\nTo get started, add `@wsmd/eslint-config` to your project:\n\n```sh\n# using yarn\nyarn add --dev eslint @wsmd/eslint-config\n\n# using npm\nnpm i --save-dev eslint @wsmd/eslint-config\n```\n\nThen add [one or some of the configurations](#configurations) included in this package to your ESLint configuration file depending on the project's needs. For example, this ESLint configuration below adds support for TypeScript, Prettier and Jest:\n\n```js\n{\n  \"extends\": [\n    \"@wsmd/eslint-config/typescript\",\n    \"@wsmd/eslint-config/prettier\",\n    \"@wsmd/eslint-config/jest\"\n  ]\n}\n```\n\nNote that some of configurations require other dependencies to be included in your project as well (npm does not allow optional peer dependencies). For more information, please refer to the documentation of each configuration below.\n\n## Configurations\n\n### `@wsmd/eslint-config/base`\n\nThis configuration is an extensions of the Airbnb JavaScript style guide targeted for JavaScript projects without React or TypeScript. It also serves as the base configuration for some of the other configurations included in this package.\n\nUnder the hood, this configuration extends:\n\n- `airbnb-eslint-config-base`\n- `eslint-plugin-import`\n\n#### Usage \u003c!-- omit in toc --\u003e\n\n```js\n{\n  \"extends\": [\n    \"@wsmd/eslint-config/base\",\n  ]\n}\n```\n\n### `@wsmd/eslint-config/react`\n\nThis is an extension of the [base configuration](#wsmdeslint-configbase) targeted for React projects.\n\nUnder the hood, this configuration extends:\n\n- `@wsmd/eslint-config/base`\n- `eslint-airbnb-config`\n  - `eslint-plugin-react`\n  - `eslint-plugin-jsx-a11y`\n- `eslint-plugin-react-hooks`\n\n#### Usage \u003c!-- omit in toc --\u003e\n\n```js\n{\n  \"extends\": [\n    \"@wsmd/eslint-config/react\",\n  ]\n}\n```\n\n### `@wsmd/eslint-config/typescript`\n\nThis configuration adds support for TypeScript projects by specifying the TypeScript ESLint Parser (`@typescript-eslint/parser`) as the code parser. It also applies a set of rules specific to TypeScript.\n\nIt can also be used alongside `@wsmd/eslint-config/base` or `@wsmd/eslint-config/react`.\n\nUnder the hood, this configuration extends:\n\n- `@typescript-eslint/recommended`\n- `plugin:import/typescript`\n\n#### Usage \u003c!-- omit in toc --\u003e\n\n```js\n{\n  \"extends\": [\n    \"@wsmd/eslint-config/typescript\",\n  ]\n}\n```\n\nIf you are including this configuration in your project, make sure you have `typescript` installed a dependency.\n\n### `@wsmd/eslint-config/prettier`\n\nThis configuration enforces Prettier formatting via ESLint. This includes:\n\n- Disabling all ESLint rules that may conflicts with prettier formatting.\n- Reporting prettier violations as ESLint issues.\n\nIt does not extend any of the other configurations in this package. However, please note that it must be applied after all other configurations.\n\n#### Usage \u003c!-- omit in toc --\u003e\n\n```js\n{\n  \"extends\": [\n    /* other eslint configurations... */\n    \"@wsmd/eslint-config/prettier\"\n  ]\n}\n```\n\nIf you are including this configuration in your project, make sure you have `prettier` installed a dependency.\n\n### `@wsmd/eslint-config/jest`\n\nThis configuration configures the ESLint environment to be compatible with Jest. It also extends the style and recommended rules included in `eslint-plugin-jest`.\n\nIt does not extend any of the other configurations in this package.\n\n#### Usage \u003c!-- omit in toc --\u003e\n\n```js\n{\n  \"extends\": [\n    \"@wsmd/eslint-config/jest\",\n  ]\n}\n```\n\n### `@wsmd/eslint-config/all`\n\nThis configuration is a convenient configuration that extends all the other configurations above.\n\nBy extending it, ESLint support will enforce rules from the Airbnb JavaScript and React style guide, and have support for TypeScript, Jest, and Prettier.\n\n#### Usage \u003c!-- omit in toc --\u003e\n\n```js\n{\n  \"extends\": [\n    \"@wsmd/eslint-config/all\",\n  ]\n}\n```\n\n## Composing Multiple Configurations\n\nThe idea of this package is to allow the composition of multiple configurations to better fit the project needs as opposed to a catch-all configuration that could potentially slow down the linting process if most of the rules are not needed.\n\n```js\n{\n  \"extends\": [\n    \"@wsmd/eslint-config/base\",\n    \"@wsmd/eslint-config/react\", // `react` already includes `base`\n    \"@wsmd/eslint-config/typescript\",\n    \"@wsmd/eslint-config/prettier\",\n    \"@wsmd/eslint-config/jest\"\n  ]\n}\n```\n\n## Gotchas\n\n### Order of Configs\n\nIf you are composing multiple configurations, note that the configurations must be listed in the following order:\n\nThe `base`/`react` configs come first, followed by the `typescript` config, then followed by the `prettier` config.\n\n### Custom Rules\n\nThis config builds on top of popular style guides and recommended rule sets of various plugins. However, it was originally built as a sharable ESLint configuration for my personal projects. This means that there are a small number of rule overrides that I have applied as well.\n\nYou can still override these rules and customize others in your ESLint config file:\n\n```js\n{\n  \"extends\": [\n    \"@wsmd/eslint-config/base\",\n    \"@wsmd/eslint-config/typescript\",\n    \"@wsmd/eslint-config/prettier\",\n    \"@wsmd/eslint-config/jest\"\n  ],\n  \"rules\": {\n    // override rules here\n  }\n}\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwsmd%2Feslint-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwsmd%2Feslint-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwsmd%2Feslint-config/lists"}