eslint configuration used in all creative-area's projects
npm install eslint-config-creative-areaESLint Configuration for Creative-Area's Projects
=================================================
[![NPM][npm-image]][npm-url]
[![dependency Status][dependency-image]][dependency-url]
[![devDependency Status][devDependency-image]][devDependency-url]
First, add the following properties to the devDependencies object:
``json`
"eslint": "
"eslint-config-creative-area": "
where and are typically the latest (7.13.0 and 0.11.0 respectively as of this writing).
Don't forget to npm install!
Then, create an object named eslintConfig as follows:
`json`
"eslintConfig": {
"extends": "creative-area/
"env": {
"node": true
}
},
where is the desired language version (typically es unless you work with an older version of nodejs) followed by a slash (/) and the source type if above es6 (module or script).
You can also create a .eslintrc file in a sub-folder that contains code for another environment. For instance, if you have some commonjs-formatted code that is supposed to run in es5-compatible browsers, you'd create a json-formatted .eslintrc file with the following content:
`json`
{
"extends": "creative-area/es5",
"env": {
"browser": true,
"commonjs": true
}
}
- creative-area/es3creative-area/es5
- creative-area/es6/module
- same as creative-area/es2015/modulecreative-area/es6/script
- same as creative-area/es2015/scriptcreative-area/es7/module
- same as creative-area/es2016/modulecreative-area/es7/script
- same as creative-area/es2016/scriptcreative-area/es8/module
- same as creative-area/es2017/modulecreative-area/es8/script
- same as creative-area/es2017/scriptcreative-area/es9/module
- same as creative-area/es2018/modulecreative-area/es9/script
- same as creative-area/es2018/scriptcreative-area/es10/module
- same as creative-area/es2019/modulecreative-area/es10/script
- same as creative-area/es2019/scriptcreative-area/es11/module
- same as creative-area/es2020/modulecreative-area/es11/script
- same as creative-area/es2020/scriptcreative-area/es12/module
- same as creative-area/es2021/modulecreative-area/es12/script
- same as creative-area/es2021/script`
These ESLint configurations and the code used to generate them are distributed under the [MIT license][license-url].
[dependency-image]: https://img.shields.io/david/creative-area/eslint-config.svg?style=flat-square
[dependency-url]: https://david-dm.org/creative-area/eslint-config
[devDependency-image]: https://img.shields.io/david/dev/creative-area/eslint-config.svg?style=flat-square
[devDependency-url]: https://david-dm.org/creative-area/eslint-config?type=dev
[license-url]: https://raw.githubusercontent.com/creative-area/eslint-config/master/LICENSE.txt
[npm-image]: https://img.shields.io/npm/v/eslint-config-creative-area.svg?style=flat-square
[npm-url]: https://npmjs.org/package/eslint-config-creative-area