This package provides netzkern base JS .eslintrc as an extensible shared config.
- Extends babel-preset-airbnb for babel settings
We export two ESLint configurations for your usage.
Our default export contains all of our ESLint rules, including ECMAScript 6+. It requires eslint and eslint-plugin-import.
- Install the correct versions of each package, which are listed by the command:
npm install --save-dev eslint-config-netzkern-base eslint eslint-plugin-import- Add
"extends": "netzkern-base"to your .eslintrc.
Lints ES5 and below. Requires eslint.
- Install the correct versions of each package, which are listed by the command:
npm install --save-dev eslint-config-netzkern-base eslint- Add
"extends": "netzkern-base/legacy"to your .eslintrc.
Consider adding test cases if you're making complicated rules changes, like anything involving regexes. Perhaps in a distant future, we could use literate programming to structure our README as test cases for our .eslintrc?
You can run tests with npm test.
You can make sure this module lints with itself using npm run lint.
{
'brace-style': ['error', '1tbs', { allowSingleLine: false }], // disallow single line
indent: ['error', 4] // 4 spaces
curly: ['error', 'all'], // always enforce braces
}- Visual Studio Code link