@repath-solutions/eslint-config-commonjs
v1.2.1
Published
ESlint and prettier rules for NodeJS projects with CommonJS
Downloads
4
Keywords
Readme
@repath-solutions/eslint-config-commonjs
ESlint and prettier rules for NodeJS projects with CommonJS
Usage
Add "@repath-solutions/eslint-config-commonjs" to the extends part of your eslint configuration file
{
"extends": ["@repath-solutions/eslint-config-commonjs"]
}
Rules
ESlint recommended https://eslint.org/docs/latest/rules/
ESlint import plugin recommended https://www.npmjs.com/package/eslint-plugin-import
ESlint jest plugin recommended https://www.npmjs.com/package/eslint-plugin-jest
Additional code rules
no-console https://eslint.org/docs/latest/rules/no-console
func-names https://eslint.org/docs/latest/rules/func-names
prefer-const https://eslint.org/docs/latest/rules/prefer-const
prefer-destructuring https://eslint.org/docs/latest/rules/prefer-destructuring
no-param-reassign (object properties) https://eslint.org/docs/latest/rules/no-param-reassign
no-else-return https://eslint.org/docs/latest/rules/no-else-return
no-var https://eslint.org/docs/latest/rules/no-var
no-await-in-loop https://eslint.org/docs/latest/rules/no-await-in-loop
no-template-curly-in-string https://eslint.org/docs/latest/rules/no-template-curly-in-string
Additional formatting rules
single-quote true https://prettier.io/docs/en/options.html#quotes
tab-width 2 https://prettier.io/docs/en/options.html#tab-width
print-width 80 https://prettier.io/docs/en/options.html#tab-width
use-tabs false https://prettier.io/docs/en/options.html#tabs
semi true https://prettier.io/docs/en/options.html#semicolons
trailing-comma es5 https://prettier.io/docs/en/options.html#trailing-commas
bracket-spasing true https://prettier.io/docs/en/options.html#bracket-spacing
bracket-same-line false https://prettier.io/docs/en/options.html#bracket-line
arrow-parens always https://prettier.io/docs/en/options.html#arrow-function-parentheses
end-of-line lf https://prettier.io/docs/en/options.html#end-of-line