Skip to content

Commit

Permalink
Merge pull request #11 from Brightspace/eslint-4
Browse files Browse the repository at this point in the history
upgrading to eslint 4 from 2 and improving how we extend configurations
  • Loading branch information
dlockhart authored Jun 30, 2017
2 parents fe3aa97 + 077a1f8 commit aea44ff
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 43 deletions.
8 changes: 2 additions & 6 deletions browser-config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
var baseConfig = require('./index'),
extend = require('extend');

var browserConfig = {
module.exports = {
"extends": "./index.js",
"env": {
"browser": true
}
};

module.exports = extend(true, baseConfig, browserConfig);
10 changes: 3 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
var eslint = require('eslint'),
extend = require('extend'),
commonConfig = require('./common-config');

var recommendedConfig = eslint.linter.defaults();

module.exports = extend(true, recommendedConfig, commonConfig);
module.exports = {
"extends": ["eslint:recommended","./common-config.js"]
};
8 changes: 2 additions & 6 deletions node-config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
var baseConfig = require('./index'),
extend = require('extend');

var nodeConfig = {
module.exports = {
"extends": "./index.js",
"env": {
"es6": true,
"node": true
}
};

module.exports = extend(true, baseConfig, nodeConfig);
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
"url": "https://github.com/Brightspace/eslint-config-brightspace/issues"
},
"homepage": "https://github.com/Brightspace/eslint-config-brightspace",
"devDependencies": {},
"dependencies": {
"eslint": "^2.3.0",
"extend": "^3.0.0"
"eslint": "^4.1.1"
}
}
8 changes: 2 additions & 6 deletions polymer-config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
var baseConfig = require('./index'),
extend = require('extend');

var polymerConfig = {
module.exports = {
"extends": "./index.js",
"env": {
"browser": true
},
Expand All @@ -16,5 +14,3 @@ var polymerConfig = {
"strict": 0
}
};

module.exports = extend(true, baseConfig, polymerConfig);
16 changes: 7 additions & 9 deletions react-config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
var baseConfig = require('./index'),
extend = require('extend');

var reactConfig = {
"ecmaFeatures": {
"jsx": true,
"modules": true
module.exports = {
"extends": "./index.js",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"env": {
"browser": true,
Expand All @@ -16,5 +16,3 @@ var reactConfig = {
"react"
]
};

module.exports = extend(true, baseConfig, reactConfig);
8 changes: 2 additions & 6 deletions wct-config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
var polymerConfig = require('./polymer-config'),
extend = require('extend');

var wctConfig = {
module.exports = {
"extends": "./polymer-config.js",
"env": {
"es6": true,
"mocha": true
Expand All @@ -16,5 +14,3 @@ var wctConfig = {
"WCT": true
}
};

module.exports = extend(true, polymerConfig, wctConfig);

0 comments on commit aea44ff

Please sign in to comment.