ESLint: Set environments better
Instead of setting ESLint environment to "node" globally, set it on per-directory basis using separate .eslintrc.json files: Directory Environment ----------------------- bin node lib commonjs spec jasmine It was impossible to use this approach for the "benchmark" directory which contains a mix of files used in various environments. For benchmark/run, the environment is set inline. For the other files, as well as spec/helpers.js, the globals are declared manually (it is impossible to express how these files are used just by a list of environments). Fixes #408.redux
parent
0e66f19523
commit
e61c23c634
@ -1,6 +1,3 @@
|
||||
{
|
||||
"extends": "eslint:recommended",
|
||||
"env": {
|
||||
"node": true
|
||||
}
|
||||
"extends": "eslint:recommended"
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"env": {
|
||||
"node": true
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"env": {
|
||||
"commonjs": true
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"env": {
|
||||
"jasmine": true
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue