{"id":25904268,"url":"https://github.com/azedo/eslint-config-azedo","last_synced_at":"2025-03-03T04:17:47.736Z","repository":{"id":57227762,"uuid":"356519741","full_name":"azedo/eslint-config-azedo","owner":"azedo","description":"Eslint and Prettier setup based on my most used configurations. This was initially meant to be used by me in my projects, but feel free to use and/or extend it if you feel like it.","archived":false,"fork":false,"pushed_at":"2023-07-19T02:07:29.000Z","size":542,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-12-01T10:43:00.643Z","etag":null,"topics":["config","eslint","ide","prettier","vscode"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/eslint-config-azedo","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/azedo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-10T08:27:41.000Z","updated_at":"2023-03-07T15:02:03.000Z","dependencies_parsed_at":"2023-02-08T09:50:11.486Z","dependency_job_id":null,"html_url":"https://github.com/azedo/eslint-config-azedo","commit_stats":null,"previous_names":[],"tags_count":7,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azedo%2Feslint-config-azedo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azedo%2Feslint-config-azedo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azedo%2Feslint-config-azedo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azedo%2Feslint-config-azedo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azedo","download_url":"https://codeload.github.com/azedo/eslint-config-azedo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241605771,"owners_count":19989612,"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":["config","eslint","ide","prettier","vscode"],"created_at":"2025-03-03T04:17:47.182Z","updated_at":"2025-03-03T04:17:47.728Z","avatar_url":"https://github.com/azedo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eslint Config\n\nOpinionated eslint defaults for js/node repositories. If you need to check the documentation in order to overwrite some rules in your repository, go to \u003chttps://eslint.org/docs/rules/\u003e and have a look.\n\n## How to use it?\n\n1. If you don't already have a `package.json` file, create one with `npm init`.\n\n2. Then you need to install the packages needed by the config\n\n```bash\nnpx install-peerdeps --dev eslint-config-azedo\n```\n\n3. Now, if you have a look at your `package.json` file, you can see that it has a bunch of new packages under `devDependencies`\n\n4. Next you need to import this config in your `.eslintrc` in order to use them. (The `react config` is enabled by default, but in case you want to use the `node config` just change the extends string to `eslint-config-azedo/node-config`)\n\n```javascript\nmodule.exports = {\n  extends: ['eslint-config-azedo']\n}\n```\n\n5. You can also use our automated script in order to create the `.eslintrs.js`, `.prettierrc.js` and `vscode/settings.json` files (they will not be replaced in case you already have them!)\n\n```bash\n# Run this on your project's main folder (root folder)\n./node_modules/eslint-config-azedo/utils/setup.js\n\n# You can also use the node command if you prefer (you don't need to!)\nnode node_modules/eslint-config-azedo/utils/setup.js\n```\n\n5. Lastly, don't forget to add a script in your `package.json` file to run these rules against your codebase.\n\n```json\n\"scripts\": {\n   \"lint\": \"eslint '*/**/*.{js,jsx,ts,tsx}' --fix\"\n}\n```\n\n6. **And that's it!** Now you should be able to run these rules whenever you want.\n\n7. One suggestion is that you add the script above `lint` in your repo:\n   - As a `pre-push` hook (with husky):\n\n   ```json\n    \"husky\": {\n      \"hooks\": {\n        \"pre-push\": \"npm run lint\"\n      }\n    }\n   ```\n\n   - And/or as a step in your CI pipelines\n\n   ```yaml\n   linting:\n     stage: codeQuality\n     script:\n       - npm run lint\n   ```\n\n8. One last thing. Feel free to customize these rules in your repository by overwriting them in the `.eslintrc` file or adding more rules that are necessary (or make more sense) for your codebase.\n\n## Known issues\n\n- If you can't use the automated script (because you already had the package in your repo), delete the `node_modules` folder from your repo and install this config package again!\n\n```bash\n# On your project's main folder (root folder), type - PLEASE BE CAREFUL WITH THIS RM COMMAND!!!!!\nrm -rf node_modules\n\n# Then, in the same main folder (root folder), install the project's dependencies again (since they should already be in package.json, just run the global npm install command)\nnpm i\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazedo%2Feslint-config-azedo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazedo%2Feslint-config-azedo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazedo%2Feslint-config-azedo/lists"}