Last active
August 28, 2023 15:23
-
-
Save wmakeev/b25404c1b4fb2a2158c0cc9b02730591 to your computer and use it in GitHub Desktop.
[02 - ESLint (JavaScript)] #template #eslint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm i -D eslint eslint-config-prettier eslint-plugin-node eslint-plugin-import eslint-plugin-unicorn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extends": [ | |
"eslint:recommended", | |
"plugin:node/recommended", | |
"plugin:unicorn/recommended", | |
"plugin:import/recommended", | |
"prettier" | |
], | |
"plugins": ["node", "prettier", "unicorn", "import"], | |
"rules": { | |
"array-callback-return": "error", | |
"prettier/prettier": "error", | |
"block-scoped-var": "error", | |
"eqeqeq": [2, "allow-null"], | |
"no-var": "error", | |
"prefer-const": "error", | |
"eol-last": "error", | |
"prefer-arrow-callback": "error", | |
"no-constant-condition": [ | |
"error", | |
{ | |
"checkLoops": false | |
} | |
], | |
"no-trailing-spaces": "error", | |
"quotes": [ | |
"warn", | |
"single", | |
{ | |
"avoidEscape": true | |
} | |
], | |
"no-restricted-properties": [ | |
"error", | |
{ | |
"object": "describe", | |
"property": "only" | |
}, | |
{ | |
"object": "it", | |
"property": "only" | |
} | |
], | |
"node/no-unpublished-import": "off" | |
} | |
} | |
// See https://github.com/import-js/eslint-plugin-import/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment