{"id":15287171,"url":"https://github.com/devansvd/eslint-config-devansvd","last_synced_at":"2026-01-06T04:05:40.854Z","repository":{"id":57228026,"uuid":"261035271","full_name":"devansvd/eslint-config-devansvd","owner":"devansvd","description":"devansvd's eslint config for js, nodejs, maybe jsx too","archived":false,"fork":false,"pushed_at":"2020-06-08T06:57:18.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-26T17:05:29.107Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/eslint-config-devansvd","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/devansvd.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-05-03T22:47:20.000Z","updated_at":"2020-06-08T06:55:46.000Z","dependencies_parsed_at":"2022-09-12T22:30:43.988Z","dependency_job_id":null,"html_url":"https://github.com/devansvd/eslint-config-devansvd","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devansvd%2Feslint-config-devansvd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devansvd%2Feslint-config-devansvd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devansvd%2Feslint-config-devansvd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devansvd%2Feslint-config-devansvd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devansvd","download_url":"https://codeload.github.com/devansvd/eslint-config-devansvd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245200680,"owners_count":20576673,"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":[],"created_at":"2024-09-30T15:25:22.598Z","updated_at":"2026-01-06T04:05:35.829Z","avatar_url":"https://github.com/devansvd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003eeslint-config-devansvd\u003c/h1\u003e\n\n\u003cp\u003eEsLint rules for all my projects. Feel free to use these conventions :-)\u003c/p\u003e\n\u003c/div\u003e\n\n---\n\n\u003c!-- prettier-ignore-start --\u003e\n[![version][version-badge]][package]\n[![downloads][downloads-badge]][npmtrends]\n[![MIT License][license-badge]][license]\n\u003c!-- prettier-ignore-end --\u003e\n\n## Table of Contents\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n  - [What it does](#what-it-does)\n  - [Installation](#installation)\n  - [Usage](#usage)\n  - [Setting up Editor](#setting-up-editor)\n    - [VSCode Setup](#vscode-setup)\n  - [Issue](#issue)\n  - [License](#license)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## What it does\n\nThis modules provides a flexible way to integrate [`Eslint`][eslint] + [`Airbnb`][airbnb] style guide conventions + [`Prettier`][prettier]. It eliminates installing bunch of devDependencies everytime setting up a new project - Makes setup easier. To summarize what it does it takes care of everything.\n\n-   Lints JavaScript based on the latest Popular style guide standards\n-   Fixes prettier issues and formatting errors\n-   Some of the rules are tweaked to my personal preference\n-\tOverride rules as you'd like\n\n**PS**: I may replace all style guide rules with my own preference soon.\n\n## Installation\n\nPackage is intended to be installed as a devDependencies in all my projects - Should not be pushed to Production, Can be installed via [npm][npm] bundled with [node][node].\n\nIf you don't already have a package.json file, create one with `npm init -y`.\n\n```\nnpm install --save-dev eslint-config-devansvd\n\n```\n\n**Note**: It will install bunch of dependencies which are need for the Linter and formatter to work. Since this package is intended to be installed as a devDependency I won't worry about anything.\n\nThese are all the dependecies packages `eslint-config-airbnb, eslint-config-airbnb-base, eslint-config-prettier, eslint-plugin-import, eslint-plugin-jsx-a11y, eslint-plugin-prettier, eslint-plugin-react, eslint-plugin-react-hooks, eslint, prettier`\n\nCan be also installed using `npx install-peerdeps --dev eslint-config-devansvd`\n\n## Usage\n\nCreate .eslintrc.js file in project. Just add this to extends\n\n```js\n// For all: javascript, Nodejs, React.\nmodule.exports = {\n  extends: ['devansvd'],\n  rules: {\n\t// your overrides\n  },\n};\n```\n\nThe above config will lint react files too. If don't want to use react, there is also a base config exposed with the package which lints only javascript and nodejs files.\n\n```js\n// Only for javascript and Nodejs\nmodule.exports = {\n  extends: ['devansvd/base'],\n  rules: {\n    // your overrides\n  },\n};\n```\n\nOptional: Under `package.json` you can add two scripts to lint and fix\n\n```js\n\"scripts\": {\n  \"lint\": \"eslint .\",\n  \"lint:fix\": \"eslint . --fix\"\n},\n```\n\nNow manually lint your code by running `npm run lint` and fix all fixable issues with `npm run lint:fix`\n\n## Setting up Editor\n\nOnce usage instructions setup done, need to configure your editors for seamless experiences.\n\n### VSCode Setup\n\n-   Install Eslint extenstion\n-   Press `Ctrl + ,` or `CMD + ,`(mac) Open `settings.json` from `{}` Icon in the right top corner.\n-   Add the settings Below\n\n```js\n \"editor.formatOnSave\": true,\n    \"[javascript]\": {\n        \"editor.formatOnSave\": false\n    },\n    \"[javascriptreact]\": {\n        \"editor.formatOnSave\": false\n    },\n    \"editor.codeActionsOnSave\": {\n        \"source.fixAll\": true\n\t},\n\t//Optional if prettier installed\n    \"prettier.disableLanguages\": [\n        \"javascript\",\n        \"javascriptreact\"\n\t]\n```\n\n**Note**: Prettier extenstion for VScode is not mandatory which is not need to be installed, If you'd like other file extenstions like `.html, .css, etc` You can install prettier extension in that case.\n\n**Summary**: Enabling formatOnSave for all files, Turning off formatOnSave for javascript and javascriptreact formats because EsLint take care that for you `source.fixAll` also avoids multiple times formatting if prettier already installed.\n\n## Issue\n\nFacing issues ? Remove `node_modules` and begin the setup from the beginning.\n\n## License\n\n[`MIT`][license]\n\n\u003c!-- prettier-ignore-start --\u003e\n[npm]: https://www.npmjs.com\n[node]: https://nodejs.org\n[version-badge]: https://img.shields.io/npm/v/eslint-config-devansvd.svg?style=flat-square\n[package]: https://www.npmjs.com/package/eslint-config-devansvd\n[downloads-badge]: https://img.shields.io/npm/dm/eslint-config-devansvd.svg?style=flat-square\n[npmtrends]: http://www.npmtrends.com/eslint-config-devansvd\n[license-badge]: https://img.shields.io/npm/l/eslint-config-devansvd.svg?style=flat-square\n[license]: https://github.com/devansvd/eslint-config-devansvd/blob/master/LICENSE\n[eslint]: https://github.com/eslint/eslint\n[airbnb]: https://github.com/airbnb/javascript\n[prettier]: https://prettier.io\n\u003c!-- prettier-ignore-end --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevansvd%2Feslint-config-devansvd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevansvd%2Feslint-config-devansvd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevansvd%2Feslint-config-devansvd/lists"}