{"id":16229621,"url":"https://github.com/nick-mazuk/eslint-config","last_synced_at":"2025-03-19T14:30:20.671Z","repository":{"id":40297093,"uuid":"301282627","full_name":"Nick-Mazuk/eslint-config","owner":"Nick-Mazuk","description":"A highly opinionated ESLint config.","archived":false,"fork":false,"pushed_at":"2024-04-07T17:43:53.000Z","size":909,"stargazers_count":1,"open_issues_count":8,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T01:35:02.261Z","etag":null,"topics":["best-practices","eslint"],"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/Nick-Mazuk.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-05T03:22:30.000Z","updated_at":"2022-01-10T02:46:30.000Z","dependencies_parsed_at":"2024-06-21T05:42:52.564Z","dependency_job_id":"29a2288a-de8b-46c5-bf92-d067eddcadb9","html_url":"https://github.com/Nick-Mazuk/eslint-config","commit_stats":null,"previous_names":[],"tags_count":144,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nick-Mazuk%2Feslint-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nick-Mazuk%2Feslint-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nick-Mazuk%2Feslint-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nick-Mazuk%2Feslint-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nick-Mazuk","download_url":"https://codeload.github.com/Nick-Mazuk/eslint-config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244444356,"owners_count":20453706,"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":["best-practices","eslint"],"created_at":"2024-10-10T12:58:44.157Z","updated_at":"2025-03-19T14:30:20.333Z","avatar_url":"https://github.com/Nick-Mazuk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-config\n\nA highly opinionated ESLint config.\n\n## Getting started\n\nInstall from NPM, including peer dependencies, with `--save-dev`\n\n```bash\nnpm i @nick-mazuk/eslint-config eslint --save-dev\n```\n\nThen, create a `.eslintrc` file in the root of your project with\n\n```json\n{\n    \"extends\": [\"@nick-mazuk/eslint-config\"]\n}\n```\n\n### Running the linter\n\nAdd this to your `package.json` file:\n\n```json\n\"scripts\": {\n    \"eslint\": \"eslint '**/*.{js,ts,tsx}' --quiet --fix\",\n    \"check-types\": \"tsc --noemit\",\n    \"lint\": \"npm run eslint \u0026\u0026 npm run check-types\"\n},\n```\n\nThen run\n\n```bash\nnpm run lint\n```\n\n### Versions\n\nThis package has configs for different scenarios (more coming).\n\n- **React**: use `@nick-mazuk/eslint-config/react`\n- **NextJS**: use `@nick-mazuk/eslint-config/next`\n- **Cypress**: use `@nick-mazuk/eslint-config/cypress`\n- **Firebase functions**: use `@nick-mazuk/eslint-config/firebase-functions`\n\nWhen using a more specific config, the base config is not needed. For instance, with NextJS, this is all that's required:\n\n```json\n{\n    \"extends\": [\"@nick-mazuk/eslint-config/next\"]\n}\n```\n\n## Integration with VS Code (recommended)\n\nThis is the easiest way to ensure ESLint is run every time you save a file, and that VS Code lints as you type, pointing out errors in real-time.\n\n1. Create a new file `.vscode/settings.json`\n2. Add this to the file:\n\n```json\n{\n    \"editor.codeActionsOnSave\": {\n        \"source.fixAll.eslint\": true\n    },\n    \"eslint.run\": \"onType\"\n}\n```\n\n\u003e **Note**: when you first open the repo with this ESLint configuration, it can take up to a minute for VS Code to start linting. You'll still be able to edit files in the meantime.\n\n## Use with Prettier\n\nThis config has Prettier built-in. If you use Prettier with your code editor or use a `.prettierrc` file, there will likely be conflicts. It's best to remove any `.prettierrc` files you may have and disable Prettier in your code editor.\n\n\u003e **Rationale**: this ESLint config is highly opinionated and is a living config. As best practices evolve, this config will evolve. Since Prettier is 100% fixable, that means that your code will always follow this config and therefore always follow best practices. If you override the formatting with Prettier, you forgo any future updates in regard to Prettier formatting.\n\n**Note**: If using the Svelte config, you need to setup Prettier manually. This is because the plugin `prettier-plugin-svelte` (which is needed to parse Svelte) [does not work with ESLint](https://github.com/sveltejs/prettier-plugin-svelte/issues/57).\n\n## Use without TypeScript\n\nCurrently, all the configs require TypeScript. Perhaps in the future I'll create a TypeScript addon, but since TypeScript is just better than vanilla JS, vanilla JS is currently not supported.\n\n## What rules are enabled?\n\nIn short, this config runs 500+ rules (and counting). Luckily, the source code is easy to read, so you should not have an issue reading the rules there.\n\n## I found a bug, what do I do?\n\nIf you found a bug or rule conflicts, [submit an issue on GitHub](https://github.com/Nick-Mazuk/eslint-config/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnick-mazuk%2Feslint-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnick-mazuk%2Feslint-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnick-mazuk%2Feslint-config/lists"}