diff --git a/browser-config.js b/browser-config.js index 845659f..d792344 100644 --- a/browser-config.js +++ b/browser-config.js @@ -1,6 +1,21 @@ +const { sortMemberRules } = require('./sort-member-config'); + module.exports = { - "extends": "./index.js", - "env": { - "browser": true - } + "extends": "./index.js", + "parser": "babel-eslint", + "env": { + "browser": true + }, + "plugins": [ + "html", + "sort-class-members" + ], + "globals": { + "D2L": false, + "Promise": false + }, + "rules": { + "no-console": ["error", { "allow": ["warn", "error"] }], + ...sortMemberRules + } }; diff --git a/lit-config.js b/lit-config.js index 3b6c133..042909c 100644 --- a/lit-config.js +++ b/lit-config.js @@ -1,21 +1,11 @@ -const { sortMemberRules } = require('./sort-member-config'); - module.exports = { - "extends": "./index.js", - "parser": "babel-eslint", + "extends": "./browser-config.js", "env": { - "browser": true, "es6": true }, "plugins": [ - "lit", - "html", - "sort-class-members" + "lit" ], - "globals": { - "D2L": false, - "Promise": false - }, "rules": { "arrow-spacing": 2, "no-confusing-arrow": 2, @@ -41,7 +31,6 @@ module.exports = { "lit/no-template-bind": 2, "lit/no-template-map": 0, "lit/no-useless-template-literals": 2, - "lit/no-value-attribute": 2, - ...sortMemberRules + "lit/no-value-attribute": 2 } }; diff --git a/package.json b/package.json index e651e20..5d23cd0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-brightspace", - "version": "0.6.7", + "version": "0.7.0", "description": "Common Brightspace eslint configs.", "main": "index.js", "scripts": { diff --git a/polymer-3-config.js b/polymer-3-config.js index 1bf8b54..bc7b417 100644 --- a/polymer-3-config.js +++ b/polymer-3-config.js @@ -1,21 +1,6 @@ -const { sortMemberRules } = require('./sort-member-config'); - module.exports = { - "extends": "./index.js", - "parser": "babel-eslint", - "env": { - "browser": true - }, - "plugins": [ - "html", - "sort-class-members" - ], - "globals": { - "D2L": false, - "Polymer": false - }, + "extends": "./browser-config.js", "rules": { - "strict": 0, - ...sortMemberRules + "strict": 0 } }; diff --git a/polymer-config.js b/polymer-config.js index f65a63c..8cec35a 100644 --- a/polymer-config.js +++ b/polymer-config.js @@ -1,15 +1,5 @@ module.exports = { - "extends": "./index.js", - "env": { - "browser": true - }, - "plugins": [ - "html" - ], - "globals": { - "D2L": false, - "Polymer": false - }, + "extends": "./browser-config.js", "rules": { "strict": 0 }