ESLint config
Installation
$ npm install --save-dev eslint eslint-plugin-import @namics/eslint-config
Usage Typescript (recommended)
@namics/eslint-config/configurations/typescript-browser
- typescript + browser
@namics/eslint-config/configurations/typescript-react
- typescript + react
@namics/eslint-config/configurations/typescript-node
- typescript + node
package.json
{
"scripts": {
"lint:ts": "eslint . --ext .jsx,.js,.ts,.tsx"
}
}
Enabling ESLint on TS files in VSCode
You need to update the eslint.validate setting to:
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
]
Usage ES8 (ES2017)
@namics/eslint-config/configurations/es8-browser
- ES8 + browser
@namics/eslint-config/configurations/es8-react
- ES8 + react
@namics/eslint-config/configurations/es8-node
- ES8 + node
Usage ES7 (ES2016)
@namics/eslint-config/configurations/es7-browser
- ES7 + browser (deprecated)
@namics/eslint-config/configurations/es7-react
- ES7 + react (deprecated)
@namics/eslint-config/configurations/es7-node
- ES7 + node
Usage ES6 (ES2015) - deprecated
@namics/eslint-config/configurations/es6-browser
- ES6 + browser (deprecated)
@namics/eslint-config/configurations/es6-react
- ES6 + react (deprecated)
@namics/eslint-config/configurations/es6-node
- ES6 + node (deprecated)
Usage with Prettier
.eslintrc.js (add globals here if needed)
module.exports = {
extends: require.resolve('@namics/eslint-config/configurations/es8-browser.js'),
};
.eslintignore
/.idea/
/node_modules/
package.json
"scripts": {
"lint": "npm run lint:js",
"lint:js": "eslint ."
},
then run npm run lint
Example usage in project tree
- .eslintrc.js (es8-react)
- .eslintignore
- src
- test
- .eslintrc.js (es8-node)
- index.js
- scripts
- .eslintrc.js (es6-node)
- index.js
Documentation
Build release
- Create feature or bugfix branch based on master
- Make changes and create pull request, add reviewer, wait for approval
- Merge pull request into master
- Prepare release notes, adjust package.json to next version ([Semantic Versioning](semantic versioning))
- Run
npm publish
(locally) to create npm version
- Create and push git tag for version
- Add release notes on GitHub
Thanks to
License
MIT License
Changelog
Please see the Releases
Current Tags
40 Versions
-
10.0.0
[deprecated]
...
2 years ago
-
10.0.0-beta.1
[deprecated]
...
2 years ago
-
9.1.1
[deprecated]
...
3 years ago
-
9.1.0
[deprecated]
...
3 years ago
-
9.0.6
[deprecated]
...
4 years ago
-
9.0.6-beta.0
[deprecated]
...
4 years ago
-
9.0.5
[deprecated]
...
4 years ago
-
9.0.4
[deprecated]
...
4 years ago
-
9.0.3
[deprecated]
...
4 years ago
-
9.0.2
[deprecated]
...
4 years ago
-
9.0.1
[deprecated]
...
4 years ago
-
9.0.0
[deprecated]
...
4 years ago
-
8.0.7
[deprecated]
...
5 years ago
-
8.0.6
[deprecated]
...
5 years ago
-
8.0.5
[deprecated]
...
5 years ago
-
8.0.4
[deprecated]
...
5 years ago
-
8.0.3
[deprecated]
...
5 years ago
-
8.0.2
[deprecated]
...
5 years ago
-
8.0.1
[deprecated]
...
5 years ago
-
8.0.0
[deprecated]
...
5 years ago
-
7.0.3
[deprecated]
...
5 years ago
-
7.0.2
[deprecated]
...
5 years ago
-
7.0.1
[deprecated]
...
6 years ago
-
7.0.0
[deprecated]
...
6 years ago
-
6.1.0
[deprecated]
...
6 years ago
-
6.0.1
[deprecated]
...
6 years ago
-
6.0.0
[deprecated]
...
6 years ago
-
5.0.1
[deprecated]
...
7 years ago
-
5.0.0
[deprecated]
...
7 years ago
-
4.2.0
[deprecated]
...
7 years ago
-
4.1.0
[deprecated]
...
7 years ago
-
4.0.0
[deprecated]
...
7 years ago
-
3.0.0
[deprecated]
...
7 years ago
-
2.3.0
[deprecated]
...
8 years ago
-
2.2.0
[deprecated]
...
8 years ago
-
2.1.0
[deprecated]
...
8 years ago
-
2.0.0
[deprecated]
...
8 years ago
-
1.0.0
[deprecated]
...
8 years ago
-
0.2.0
[deprecated]
...
8 years ago
-
0.1.0
[deprecated]
...
8 years ago