ESLint configuration files (shareable configs) to guard from problems in different areas of JavaScript development.
npm install eslint-config-guardguard - contains rules for possible errors, best practices, strict mode and variables; extends eslint:recommended;
guard/editor - rules corresponding to editor preferences (like editorconfig)
eol-last, linebreak-style, no-trailing-spaces;
guard/esnext - configuration for ECMAScript 6/2015+ features;
guard/indent - configuration of indent rule;
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; extends plugin: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; extends guard/test;
guard/test-mocha - appropriate for use in Mocha tests; extends guard/test;
guard/ext-style - extends guard/indent and guard/style;
guard/optimum - extends guard and guard/ext-style;
guard/optimum-next - extends guard/optimum and guard/esnext.
guard/node you should install eslint-plugin-node:
guard/proper-arrows you should install @getify/eslint-plugin-proper-arrows:
guard/react you should install eslint-plugin-react:
.eslintrc.json file:
json
{
"extends": [
"guard",
"guard/node"
]
}
`
In a package.json:
`json
{
"eslintConfig": {
"extends": [
"guard/optimum-next",
"guard/proper-arrows",
"guard/react"
]
}
}
``