diff --git a/.eslintignore b/.eslintignore index 46ebbaf86..357ccfa51 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,3 @@ data/content/ logs/ -node_modules/ firefox/ diff --git a/.eslintrc b/.eslintrc index 91ef1b5fc..e2fc57bb8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -4,33 +4,38 @@ "mozilla", "react" ], + "extends": [ + "eslint:recommended" + ], "rules": { "mozilla/components-imports": 1, "mozilla/import-globals-from": 1, "mozilla/this-top-level-scope": 1, - "no-unused-vars": 2, - "semi": [2, "always"], - "no-undef": 2, - "object-curly-spacing": [2, "never"], - "computed-property-spacing": [2, "never"], - "array-bracket-spacing": [2, "never"], - "space-before-function-paren": [2, {"anonymous": "never", "named": "never"}], + "react/jsx-uses-react": 1, + + "array-bracket-spacing": [2, "never"], + "comma-dangle": 0, + "computed-property-spacing": [2, "never"], + "no-console": 1, "no-trailing-spaces": [2, {"skipBlankLines": false}], + "no-undef": 2, + "no-unused-vars": 2, + "object-curly-spacing": [2, "never"], + "semi": [2, "always"], + "space-before-function-paren": [2, {"anonymous": "never", "named": "never"}] }, "ecmaFeatures": { "jsx": true }, "env": { - "es6": true, - "node": true, "browser": true, + "es6": true, "mocha": true, + "node": true, }, "globals": { - "require": true, "StopIteration": true, - "exports": true, "__CONFIG__": true } } diff --git a/content-src/lib/ActionManager.js b/content-src/lib/ActionManager.js index bf229d6c2..ac69b97c8 100644 --- a/content-src/lib/ActionManager.js +++ b/content-src/lib/ActionManager.js @@ -58,7 +58,7 @@ class ActionManager { } return action; } -}; +} // This is an extremely bare-bones action types // that can be used if you just want a plain action, diff --git a/lib/ActivityStreams.js b/lib/ActivityStreams.js index 4572f9232..d800ca3aa 100644 --- a/lib/ActivityStreams.js +++ b/lib/ActivityStreams.js @@ -29,7 +29,7 @@ function ActivityStreams(options = {}) { this._setupPageMod(); this._setupListeners(); NewTabURL.override(this.options.pageURL); -}; +} ActivityStreams.prototype = { diff --git a/webpack.config.js b/webpack.config.js index 934055823..348e03bd3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -13,7 +13,7 @@ let config = yaml.load("config.default.yml"); try { // Load user config if it exists config = Object.assign({}, config, yaml.load("config.yml")); -} catch (e) {} +} catch (e) {} // eslint-disable-line no-empty module.exports = { entry: srcPath,