{"id":13800457,"url":"https://github.com/davidjbradshaw/eslint-config-adjunct","last_synced_at":"2025-05-07T07:24:06.077Z","repository":{"id":44934342,"uuid":"169852979","full_name":"davidjbradshaw/eslint-config-adjunct","owner":"davidjbradshaw","description":"A reasonable collection of plugins to use alongside your main esLint configuration","archived":false,"fork":false,"pushed_at":"2024-04-29T05:06:44.000Z","size":196,"stargazers_count":50,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-03T06:46:12.039Z","etag":null,"topics":["ava","chai","cypress","eslint","eslint-config","eslint-configs","jasmine","jest","lodash","mocha","prettier","prettier-eslint","qunit","ramda","redux","redux-saga","security","sonarjs","unicorn"],"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/davidjbradshaw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"davidjbradshaw","custom":["https://www.buymeacoffee.com/davidjbradshaw"]}},"created_at":"2019-02-09T09:57:27.000Z","updated_at":"2024-10-17T13:48:59.000Z","dependencies_parsed_at":"2024-01-02T23:42:52.531Z","dependency_job_id":"999050bf-4f96-4d81-a3b5-a41f464d0790","html_url":"https://github.com/davidjbradshaw/eslint-config-adjunct","commit_stats":{"total_commits":254,"total_committers":13,"mean_commits":19.53846153846154,"dds":0.5,"last_synced_commit":"e381160ad5f7cd18acbb40f7ef6093eda5741f8b"},"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidjbradshaw%2Feslint-config-adjunct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidjbradshaw%2Feslint-config-adjunct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidjbradshaw%2Feslint-config-adjunct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidjbradshaw%2Feslint-config-adjunct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidjbradshaw","download_url":"https://codeload.github.com/davidjbradshaw/eslint-config-adjunct/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233327824,"owners_count":18659363,"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":["ava","chai","cypress","eslint","eslint-config","eslint-configs","jasmine","jest","lodash","mocha","prettier","prettier-eslint","qunit","ramda","redux","redux-saga","security","sonarjs","unicorn"],"created_at":"2024-08-04T00:01:12.793Z","updated_at":"2025-01-10T10:20:16.082Z","avatar_url":"https://github.com/davidjbradshaw.png","language":"JavaScript","funding_links":["https://github.com/sponsors/davidjbradshaw","https://www.buymeacoffee.com/davidjbradshaw"],"categories":["Configs"],"sub_categories":["Other Configs"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://eslint.org/icon.svg\" width=\"160\" alt=\"\"\u003e\n\n# eslint-config-adjunct\n_A reasonable collection of *plugins* to use alongside your main esLint configuration_\n\u003c/div\u003e\n\nThis config is designed to be used alongside any of the major esLint configs, such as [airbnb](https://github.com/airbnb/javascript), [standard](https://github.com/standard/eslint-config-standard) or [eslint:recommended](https://eslint.org/docs/rules/). It provides a range of useful plugins that are often too time-consuming to setup and provides an easy way to install just the plugins you need, based on your project's dependencies.\n\n## Install\n\nTo install this config, run the following command.\n\n```sh\nnpm install eslint-config-adjunct --save-dev\n```\n\n## Configure\n\nExtend your `.eslintrc`, with `adjunct`, which should be the last item in the `extends` array. For example if your using `eslint-config-airbnb` as your main rule set, your `.eslintrc` should look like the following. For more advanced use cases see the example configurations for [TypeScript](https://github.com/davidjbradshaw/eslint-config-adjunct/blob/master/docs/typescript.md) and [Vue](https://github.com/davidjbradshaw/eslint-config-adjunct/blob/master/docs/vue.md).\n\n```json\n{\n  \"extends\": [\"airbnb\", \"adjunct\"]\n}\n```\n\nYou can now include `html`, `json` and `markdown` in the list of files passed to `eslint` to lint any JavaScript contained.\n\n```json\n{\n  \"scripts\": {\n    \"eslint\": \"eslint --color --ext .html,.js,.json,.jsx,.md *.* src\",\n    \"eslint:fix\": \"npm run eslint -- --fix\"\n  }\n}\n```\n\n## Install Dependencies\n\nAfter you have configured `eslint` to include this package, the first time you run `eslint` it will output the `npm` command to install the dependencies required for your project. Cut'n'paste this command into the console, and you are then ready to start linting.\n\n## Plugins\n\n### Code Quality\n\nThese two plugins provide a range of code quality rules:\n\n- [eslint-plugin-sonarjs](https://github.com/SonarSource/eslint-plugin-sonarjs)\n- [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)\n\n### Langauges\n\nThe following plugins expand esLint to work with json files, and lint JavaScript contiained in HTML and MarkDown:\n\n- [eslint-plugin-html](https://github.com/BenoitZugmeyer/eslint-plugin-html)\n- [eslint-plugin-json](https://github.com/azeemba/eslint-plugin-json)\n- [eslint-plugin-markdown](https://github.com/eslint/eslint-plugin-markdown)\n\n_When linting code snippets in Markdown files, a few [rules](https://github.com/davidjbradshaw/eslint-config-adjunct/blob/master/rules/markdown.js#L3) relating to globals and unused vars are disabled._\n\n### Library Plugins\n\nThese plugins will be loaded in based on your project `dependencies` in `package.json`. If a supported library is part of your project then it's related esLint plugins will be loaded. The following packages are supported:\n\n- [eslint-plugin-fsa](https://github.com/joseph-galindo/eslint-plugin-fsa)\n- [eslint-plugin-lodash](https://github.com/wix/eslint-plugin-lodash)\n- [eslint-plugin-lodash-fp](https://github.com/jfmengels/eslint-plugin-lodash-fp)\n- [eslint-plugin-ramda](https://github.com/ramda/eslint-plugin-ramda)\n- [eslint-plugin-react-redux](https://github.com/DianaSuvorova/eslint-plugin-react-redux#readme)\n- [eslint-plugin-redux-saga](https://github.com/pke/eslint-plugin-redux-saga)\n\n### Practices\n\nThe following esLint plugins enforce good coding practices:\n\n- [eslint-plugin-const-case](https://github.com/k03mad/eslint-plugin-const-case#readme)\n- [eslint-plugin-array-func](https://github.com/freaktechnik/eslint-plugin-array-func)\n- [eslint-plugin-eslint-comments](https://github.com/mysticatea/eslint-plugin-eslint-comments)\n- [eslint-plugin-no-constructor-bind](https://github.com/markalfred/eslint-plugin-no-constructor-bind)\n- [eslint-plugin-no-use-extend-native](https://github.com/dustinspecker/eslint-plugin-no-use-extend-native)\n- [eslint-plugin-optimize-regex](https://github.com/BrainMaestro/eslint-plugin-optimize-regex)\n- [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise)\n- [eslint-plugin-simple-import-sort](https://github.com/lydell/eslint-plugin-simple-import-sort)\n- [eslint-plugin-switch-case](https://github.com/lukeapage/eslint-plugin-switch-case)\n\n### Prettier\n\nIf prettier is installed, any rules that may conflict with Prettier will be disabled. The plugin should read you Prettier config from your project's root.\n\n- [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier)\n\nThe prettier configs for different eslint plugins are also automatically included based on which eslint plugins have been installed into your project.\n\n### Security\n\nThese plugins add code security rules to esLint:\n\n- [eslint-plugin-no-secrets](https://github.com/nickdeis/eslint-plugin-no-secrets)\n- [eslint-plugin-no-unsanitized](https://github.com/mozilla/eslint-plugin-no-unsanitized)\n- [eslint-plugin-pii](https://github.com/shiva-hack/eslint-plugin-pii)\n- [eslint-plugin-security](https://github.com/nodesecurity/eslint-plugin-security)\n- [eslint-plugin-xss](https://github.com/Rantanen/eslint-plugin-xss)\n\n### Test Libraries\n\nTest plugins are loaded based on which testing tools you have listed in `devDependencies` of `package.json`. The following test plugins are supported:\n\n- [eslint-plugin-ava](https://github.com/avajs/eslint-plugin-ava)\n- [eslint-plugin-chai-expect](https://github.com/turbo87/eslint-plugin-chai-expect)\n- [eslint-plugin-chai-friendly](https://github.com/ihordiachenko/eslint-plugin-chai-friendly)\n- [eslint-plugin-cypress](https://github.com/cypress-io/eslint-plugin-cypress)\n- [eslint-plugin-jasmine](https://github.com/tlvince/eslint-plugin-jasmine)\n- [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest)\n- [eslint-plugin-jest-async](https://www.npmjs.com/package/eslint-plugin-jest-async)\n- [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha)\n- [eslint-plugin-mocha-cleanup](https://github.com/onechiporenko/eslint-plugin-mocha-cleanup/)\n- [eslint-plugin-qunit](https://github.com/platinumazure/eslint-plugin-qunit)\n- [eslint-plugin-testing-library](https://github.com/testing-library/eslint-plugin-testing-library)\n\n_For test files a few [rules](https://github.com/davidjbradshaw/eslint-config-adjunct/blob/master/rules/test-overrides.js) are turned off, to better to support normal unit test code styles._\n\n## Rules\n\nIn the most part the default rules are used for the plugins listed above, with the following exceptions.\n\n### Switch-Case\n\nAdds the `fallthrough: 'never'` option to the `newline-between-switch-case` rule.\n\n```js\n// Good\n\nswitch (foo) {\n  case 1:\n    something()\n    break\n\n  case 2:\n  case 3:\n    somethingElse()\n    break\n\n  default:\n    defaultThing()\n}\n```\n\n### Disabled rules\n\nThe following rules are disabled due to them being considered unduly restrictive or unhelpful.\n\n- jest/no-disabled-tests\n- react-redux/prefer-separate-component-file\n- redux-saga/no-unhandled-errors\n- lodash/prefer over native rules\n- lodash-fp/use-fp\n- unicorn/no-array-for-each\n- unicorn/no-fn-reference-in-iterator\n- unicorn/no-array-for-each\n- unicorn/no-reduce\n- unicorn/no-null\n- unicorn/prefer-number-properties\n- unicorn/prefer-optional-catch-binding\n- unicorn/prevent-abbreviations\n\nThe following rules are disabled due to clashing with other plugins\n\n- array-func/prefer-array-from\n- import/order\n- sort-imports\n\n## License\n\nCopyright \u0026copy; 2019-21 [David J. Bradshaw](https://github.com/davidjbradshaw).\nLicensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidjbradshaw%2Feslint-config-adjunct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidjbradshaw%2Feslint-config-adjunct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidjbradshaw%2Feslint-config-adjunct/lists"}