3.0.0 • Published 3 years ago
eslint-config-guard v3.0.0
eslint-config-guard
Set of configuration files (shareable configs) for ESLint to guard/protect from problems in different areas of JavaScript development.
Includes:
guard- contains rules for possible errors, best practices, strict mode and variables; extendseslint:recommended;guard/editor- rules corresponding to editor preferences (likeeditorconfig) such aseol-last,linebreak-style,no-trailing-spaces;guard/esnext- configuration for ECMAScript 6/2015+ features;guard/indent- configuration ofindentrule;guard/jsdoc- contains rules related to JSDoc;guard/no-prettier- adds"prettier/prettier": "off"to rules; can be helpful to use with TSDX;guard/node- configuration related to Node.js and CommonJS;guard/proper-arrows- configuration for stylistic rules related to arrow functions (see@getify/eslint-plugin-proper-arrows);guard/react- configuration for React and JSX; extendsplugin:react/recommended;guard/style- rules for stylistic issues;guard/test- appropriate for use in tests (relaxes some rules from other configs);guard/test-jest- appropriate for use in Jest tests; extendsguard/test;guard/test-mocha- appropriate for use in Mocha tests; extendsguard/test;
The following files are combined configs which extend other configs:
guard/ext-style- extendsguard/indentandguard/style;guard/optimum- extendsguardandguard/ext-style;guard/optimum-next- extendsguard/optimumandguard/esnext.
See eslint-config-ts-guard for configuration files related to TypeScript.
Installation
npm install eslint-config-guard --save-devIf you are going to use guard/node you should install eslint-plugin-node:
npm install eslint-plugin-node --save-devIf you are going to use guard/proper-arrows you should install @getify/eslint-plugin-proper-arrows:
npm install @getify/eslint-plugin-proper-arrows --save-devIf you are going to use guard/react you should install eslint-plugin-react:
npm install eslint-plugin-react --save-devUsage
In a .eslintrc.json file:
{
"extends": [
"guard",
"guard/node"
]
}In a package.json:
{
"eslintConfig": {
"extends": [
"guard/optimum-next",
"guard/proper-arrows",
"guard/react"
]
}
}License
Copyright (c) 2016-2022 Denis Sikuler
Licensed under the MIT license.