eslint-config-ta
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -19,2 +19,4 @@ module.exports = { | ||
'no-debugger': 2, | ||
// specify the maximum cyclomatic complexity allowed in a program | ||
'complexity': [1, 5], | ||
@@ -21,0 +23,0 @@ /** |
@@ -18,5 +18,5 @@ module.exports = { | ||
*/ | ||
// testing lends itself to deeply nested callbacks | ||
// specify the maximum depth callbacks can be nested | ||
'max-nested-callbacks': 0, | ||
}, | ||
} |
{ | ||
"name": "eslint-config-ta", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Reusable eslint config for TA web apps.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -15,3 +15,3 @@ eslint-config-ta | ||
**Default** | ||
### Root Config | ||
@@ -29,3 +29,16 @@ In the project root: | ||
At the root of each group (e.g. `ta`, `ta/(frontend|backend)`) is an `index.js` file that will select the appropriate | ||
### Test Config | ||
Use the test config to customize rules for the `/test` directory: | ||
```json | ||
{ | ||
"extends": [ | ||
"ta/(backend|frontend)/test" | ||
] | ||
} | ||
``` | ||
### Environment Detection | ||
At the root of each group (e.g. `ta`, `ta/(frontend|backend)`) is an `index.js` file. It will select the appropriate | ||
configuration file based on the current `NODE_ENV`. For example, where your `.eslintrc` is: | ||
@@ -54,22 +67,2 @@ | ||
## Example configs | ||
### /.eslintrc | ||
Root config | ||
```json | ||
{ | ||
"extends": "ta" | ||
} | ||
``` | ||
### /test/.eslintrc | ||
```json | ||
{ | ||
"extends": "ta/(frontend|backend)/test" | ||
} | ||
``` | ||
## Deployment | ||
@@ -76,0 +69,0 @@ |
9485
282
80