Skip to content

Commit

Permalink
Improved eslint config as proposed in #61
Browse files Browse the repository at this point in the history
  • Loading branch information
motin authored and gregglind committed Apr 25, 2018
1 parent be41ea6 commit 6ffe693
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 30 deletions.
48 changes: 29 additions & 19 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,27 @@

"use strict";

/* All Mozilla specific rules and enviroments at:
* http://firefox-source-docs.mozilla.org/tools/lint/linters/eslint-plugin-mozilla.html
*/
// All Mozilla specific rules and environments at:
// http://firefox-source-docs.mozilla.org/tools/lint/linters/eslint-plugin-mozilla.html

module.exports = {
env: {
es6: true,
},
extends: [
"eslint:recommended",
// list of rules at: https://dxr.mozilla.org/mozilla-central/source/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
"plugin:mozilla/recommended",
],
overrides: [
{
files: "src/**",
env: {
browser: true,
webextensions: true,
},
},
],
parserOptions: {
ecmaVersion: 8,
sourceType: "module",
Expand All @@ -15,31 +31,25 @@ module.exports = {
experimentalObjectRestSpread: true,
},
},
env: {
es6: true,
},
extends: [
"eslint:recommended",
/* list of rules at:
* https://dxr.mozilla.org/mozilla-central/source/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
*/
"plugin:mozilla/recommended",
plugins: [
"json",
"mozilla",
],

plugins: ["json", "mozilla"],

root: true,
rules: {
"babel/new-cap": "off",
"comma-dangle": ["error", "always-multiline"],
eqeqeq: "error",
indent: ["warn", 2, { SwitchCase: 1 }],
"mozilla/no-aArgs": "warn",
"mozilla/balanced-listeners": "off",
"comma-dangle": ["error", "always-multiline"],
"eqeqeq": "error",
"indent": ["warn", 2, { SwitchCase: 1 }],
"no-console": "warn",
"no-var": "error",
"no-shadow": "error",
"no-unused-vars": "error",
"prefer-const": "warn",
"prefer-spread": "error",
semi: ["error", "always"],
"semi": ["error", "always"],
"valid-jsdoc": "warn",
},
};
11 changes: 0 additions & 11 deletions src/.eslintrc.json

This file was deleted.

0 comments on commit 6ffe693

Please sign in to comment.