eslint-config-creative-area
v0.11.1
Published
eslint configuration used in all creative-area's projects
Downloads
88
Maintainers
Readme
ESLint Configuration for Creative-Area's Projects
Usage
package.json
First, add the following properties to the devDependencies
object:
"eslint": "<eslint-version>",
"eslint-config-creative-area": "<config-version>",
where <eslint-version>
and <config-version>
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:
"eslintConfig": {
"extends": "creative-area/<ecma-version>",
"env": {
"node": true
}
},
where <ecma-version>
is the desired language version (typically es<current-year>
unless you work with an older version of nodejs) followed by a slash (/
) and the source type if above es6 (module
or script
).
.eslintrc
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:
{
"extends": "creative-area/es5",
"env": {
"browser": true,
"commonjs": true
}
}
Available Configurations
creative-area/es3
creative-area/es5
creative-area/es6/module
same ascreative-area/es2015/module
creative-area/es6/script
same ascreative-area/es2015/script
creative-area/es7/module
same ascreative-area/es2016/module
creative-area/es7/script
same ascreative-area/es2016/script
creative-area/es8/module
same ascreative-area/es2017/module
creative-area/es8/script
same ascreative-area/es2017/script
creative-area/es9/module
same ascreative-area/es2018/module
creative-area/es9/script
same ascreative-area/es2018/script
creative-area/es10/module
same ascreative-area/es2019/module
creative-area/es10/script
same ascreative-area/es2019/script
creative-area/es11/module
same ascreative-area/es2020/module
creative-area/es11/script
same ascreative-area/es2020/script
creative-area/es12/module
same ascreative-area/es2021/module
creative-area/es12/script
same ascreative-area/es2021/script
License
These ESLint configurations and the code used to generate them are distributed under the MIT license.