eslint-config-defaults
Advanced tools
Comparing version 0.2.0 to 0.3.0
19
es5.js
@@ -5,5 +5,18 @@ 'use strict'; | ||
var es5Config = _.cloneDeep(require('./defaults')) | ||
_.merge(es5Config, require('./es6/off.js')) | ||
var bestPractices = require('./best-practices/default.js'); | ||
var errors = require('./errors/default.js'); | ||
var es6 = require('./es6/off.js'); | ||
var legacy = require('./legacy/off.js'); | ||
var node = require('./node/off.js'); | ||
var strict = require('./strict/default.js'); | ||
var style = require('./style/default.js'); | ||
var variables = require('./variables/default.js'); | ||
module.exports = es5Config; | ||
var defaults = { | ||
env: {}, | ||
ecmaFeatures: {}, | ||
globals: {}, | ||
rules: {} | ||
} | ||
module.exports = _.merge(defaults, bestPractices, errors, es6, legacy, node, strict, style, variables); |
@@ -17,3 +17,3 @@ { | ||
"version" : "0.2.0", | ||
"version" : "0.3.0", | ||
"author" : "Eric Baer <me@ericbaer.com>", | ||
@@ -36,3 +36,3 @@ | ||
"main": "./defaults.js", | ||
"main": "./es5.js", | ||
@@ -39,0 +39,0 @@ "engines":{ |
@@ -15,3 +15,3 @@ # eslint-config-strict | ||
##### Full Configurations | ||
#### Full Configurations | ||
@@ -24,15 +24,43 @@ This set of configs is meant to be extended on a per-project basis as necessary using ESLint's | ||
- `defaults` | ||
- `defaults/browser` | ||
- `defaults/es5` | ||
- `defaults/node` | ||
- `defaults/off` | ||
- `defaults/test` | ||
- `defaults` - The default ES5 config | ||
- `defaults/off` - Turns off all rules. | ||
##### Piecemeal Configurations | ||
Every test in ESLint is broken out into categories in directories that mirror the documentation. | ||
Each of the following directories can be included as a set of defaults or by including the `off.js` | ||
file which turns off every rule in this category. | ||
- `defaults/es5-browser` - The default ES5 config with browser globals | ||
- `defaults/es5-node` - The default ES5 config with node globals and rules | ||
- `defaults/es5-test` - The default ES5 config with mocha globals | ||
- `defaults/es5` - The default ES5 config | ||
- `defaults/es6-browser` - The default ES6 config with browser globals | ||
- `defaults/es6-node` - The default ES6 config with node globals and rules | ||
- `defaults/es6-test` - The default ES6 config with mocha globals | ||
- `defaults/es6` - The default ES6 config | ||
To extend a config in ESLint just add the extends attribute to your `.eslintrc` | ||
```json | ||
{ | ||
"extends": "defaults" | ||
} | ||
``` | ||
```json | ||
{ | ||
"extends": "defaults/es6-browser" | ||
} | ||
``` | ||
```json | ||
{ | ||
"extends": ["defaults/es6-browser", "defaults/es6-node"] | ||
} | ||
``` | ||
#### Piecemeal Configurations | ||
Every test in ESLint is broken out into categories that mirror the documentation. Each of the | ||
following directories can be included as a set of defaults or by including the `off.js` file which | ||
turns off every rule in this category. | ||
###### `best-practices`, `errors`, `es6`, `legacy`, `node`, `strict`, `style`, `variables` | ||
@@ -60,18 +88,2 @@ | ||
To extend a config in ESLint just add the extends attribute to your `.eslintrc` | ||
```json | ||
{ | ||
"extends": "defaults" | ||
} | ||
``` | ||
or | ||
```json | ||
{ | ||
"extends": "defaults/browser" | ||
} | ||
``` | ||
*** | ||
@@ -78,0 +90,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33248
30
772
91