2017-03-22 10:36:06 +03:00
|
|
|
module.exports = {
|
2016-02-01 17:05:16 +03:00
|
|
|
// When adding items to this file please check for effects on sub-directories.
|
2016-02-27 01:45:00 +03:00
|
|
|
"parserOptions": {
|
|
|
|
"ecmaFeatures": {
|
|
|
|
"jsx": true
|
2017-12-06 23:32:28 +03:00
|
|
|
},
|
|
|
|
"sourceType": "module"
|
2016-02-27 01:45:00 +03:00
|
|
|
},
|
|
|
|
"env": {
|
2017-12-19 23:31:12 +03:00
|
|
|
"node": true
|
2016-02-27 01:45:00 +03:00
|
|
|
},
|
2016-02-01 17:05:16 +03:00
|
|
|
"plugins": [
|
2017-12-19 23:31:23 +03:00
|
|
|
"import", // require("eslint-plugin-import")
|
2017-11-22 22:09:02 +03:00
|
|
|
"json", // require("eslint-plugin-json")
|
|
|
|
"promise", // require("eslint-plugin-promise")
|
2017-12-19 23:31:23 +03:00
|
|
|
"react" // require("eslint-plugin-react")
|
2016-02-01 17:05:16 +03:00
|
|
|
],
|
2016-02-10 00:55:12 +03:00
|
|
|
"extends": [
|
2017-04-19 19:24:11 +03:00
|
|
|
"eslint:recommended",
|
2017-11-22 22:09:02 +03:00
|
|
|
"plugin:mozilla/recommended" // require("eslint-plugin-mozilla")
|
2016-02-10 00:55:12 +03:00
|
|
|
],
|
2016-02-01 17:05:16 +03:00
|
|
|
"rules": {
|
2016-10-31 19:56:05 +03:00
|
|
|
"promise/catch-or-return": 2,
|
2017-12-19 23:31:23 +03:00
|
|
|
"promise/param-names": 2,
|
2016-10-31 19:56:05 +03:00
|
|
|
|
2016-08-04 23:43:27 +03:00
|
|
|
"react/jsx-boolean-value": [2, "always"],
|
2016-08-04 23:45:56 +03:00
|
|
|
"react/jsx-closing-bracket-location": [2, "after-props"],
|
2016-08-04 23:47:01 +03:00
|
|
|
"react/jsx-curly-spacing": [2, "never"],
|
2016-08-04 20:31:27 +03:00
|
|
|
"react/jsx-equals-spacing": [2, "never"],
|
2016-08-09 22:01:29 +03:00
|
|
|
"react/jsx-key": 2,
|
2017-07-21 20:29:52 +03:00
|
|
|
"react/jsx-no-bind": 2,
|
2016-08-09 22:01:29 +03:00
|
|
|
"react/jsx-no-comment-textnodes": 2,
|
2016-08-04 20:31:27 +03:00
|
|
|
"react/jsx-no-duplicate-props": 2,
|
2016-08-09 22:01:29 +03:00
|
|
|
"react/jsx-no-target-blank": 2,
|
2016-08-04 20:31:27 +03:00
|
|
|
"react/jsx-no-undef": 2,
|
2016-08-09 22:01:29 +03:00
|
|
|
"react/jsx-pascal-case": 2,
|
2016-08-04 23:48:10 +03:00
|
|
|
"react/jsx-space-before-closing": [2, "always"],
|
2016-08-04 20:31:27 +03:00
|
|
|
"react/jsx-uses-react": 2,
|
|
|
|
"react/jsx-uses-vars": 2,
|
2016-08-09 22:01:29 +03:00
|
|
|
"react/jsx-wrap-multilines": 2,
|
|
|
|
"react/no-danger": 2,
|
|
|
|
"react/no-deprecated": 2,
|
2016-08-04 20:31:27 +03:00
|
|
|
"react/no-did-mount-set-state": 2,
|
2016-08-05 09:48:48 +03:00
|
|
|
"react/no-did-update-set-state": 2,
|
2016-08-09 22:01:29 +03:00
|
|
|
"react/no-direct-mutation-state": 2,
|
|
|
|
"react/no-is-mounted": 2,
|
2016-08-04 20:31:27 +03:00
|
|
|
"react/no-unknown-property": 2,
|
2016-08-09 22:01:29 +03:00
|
|
|
"react/require-render-return": 2,
|
2016-08-04 20:31:27 +03:00
|
|
|
"react/self-closing-comp": 2,
|
|
|
|
|
|
|
|
"accessor-pairs": [2, {"setWithoutGet": true, "getWithoutSet": false}],
|
2016-02-10 00:55:12 +03:00
|
|
|
"array-bracket-spacing": [2, "never"],
|
2016-08-04 20:31:27 +03:00
|
|
|
"array-callback-return": 2,
|
2016-08-10 04:35:51 +03:00
|
|
|
"arrow-body-style": [2, "as-needed"],
|
2016-08-04 23:22:58 +03:00
|
|
|
"arrow-parens": [2, "as-needed"],
|
2016-08-04 20:31:27 +03:00
|
|
|
"block-scoped-var": 2,
|
2016-08-10 10:49:37 +03:00
|
|
|
"callback-return": 0,
|
2016-02-27 01:45:00 +03:00
|
|
|
"camelcase": 0,
|
2016-08-10 01:37:54 +03:00
|
|
|
"comma-dangle": [2, "never"],
|
2016-08-04 20:31:27 +03:00
|
|
|
"consistent-this": [2, "use-bind"],
|
|
|
|
"curly": [2, "all"],
|
2016-02-27 01:45:00 +03:00
|
|
|
"default-case": 0,
|
2016-08-05 02:48:27 +03:00
|
|
|
"dot-location": [2, "property"],
|
2016-03-24 01:32:32 +03:00
|
|
|
"eqeqeq": 2,
|
2016-02-27 01:45:00 +03:00
|
|
|
"func-names": 0,
|
|
|
|
"func-style": 0,
|
|
|
|
"global-require": 0,
|
2016-08-10 07:23:57 +03:00
|
|
|
"guard-for-in": 2,
|
2016-08-04 20:31:27 +03:00
|
|
|
"handle-callback-err": 2,
|
2016-02-27 01:45:00 +03:00
|
|
|
"id-blacklist": 0,
|
|
|
|
"id-length": 0,
|
|
|
|
"id-match": 0,
|
2017-10-19 15:44:59 +03:00
|
|
|
// XXX Switch back to indent once mozilla-central has decided what it is using.
|
|
|
|
"indent-legacy": ["error", 2, {"SwitchCase": 1}],
|
2016-02-27 01:45:00 +03:00
|
|
|
"init-declarations": 0,
|
2016-08-04 20:31:27 +03:00
|
|
|
"jsx-quotes": [2, "prefer-double"],
|
2017-10-19 15:44:59 +03:00
|
|
|
"lines-around-comment": ["error", {
|
|
|
|
"allowClassStart": true,
|
|
|
|
"allowObjectStart": true,
|
|
|
|
"beforeBlockComment": true
|
|
|
|
}],
|
2016-08-09 22:01:29 +03:00
|
|
|
"max-depth": [2, 4],
|
2016-02-27 01:45:00 +03:00
|
|
|
"max-len": 0,
|
2016-08-10 04:44:12 +03:00
|
|
|
"max-lines": 0,
|
2016-08-09 22:01:29 +03:00
|
|
|
"max-nested-callbacks": [2, 4],
|
2016-08-10 01:41:12 +03:00
|
|
|
"max-params": [2, 6],
|
2016-08-10 11:22:02 +03:00
|
|
|
"max-statements": [2, 50],
|
2016-08-10 04:40:49 +03:00
|
|
|
"max-statements-per-line": [2, {"max": 2}],
|
2016-08-10 01:54:11 +03:00
|
|
|
"multiline-ternary": 0,
|
2016-08-10 01:43:59 +03:00
|
|
|
"new-cap": [2, {"newIsCap": true, "capIsNew": false}],
|
2016-08-04 20:31:27 +03:00
|
|
|
"new-parens": 2,
|
2016-02-27 01:45:00 +03:00
|
|
|
"newline-after-var": 0,
|
2016-08-10 01:44:53 +03:00
|
|
|
"newline-before-return": 0,
|
2016-08-10 02:24:41 +03:00
|
|
|
"newline-per-chained-call": [2, {"ignoreChainWithDepth": 3}],
|
2016-08-10 10:56:25 +03:00
|
|
|
"no-alert": 2,
|
2016-02-27 01:45:00 +03:00
|
|
|
"no-bitwise": 0,
|
2016-08-05 02:37:44 +03:00
|
|
|
"no-catch-shadow": 2,
|
2016-10-14 17:42:01 +03:00
|
|
|
"no-confusing-arrow": [2, {"allowParens": true}],
|
2016-02-10 00:55:12 +03:00
|
|
|
"no-console": 1,
|
2016-08-10 10:54:55 +03:00
|
|
|
"no-continue": 0,
|
2016-08-04 20:31:27 +03:00
|
|
|
"no-div-regex": 2,
|
2016-08-09 22:01:29 +03:00
|
|
|
"no-duplicate-imports": 2,
|
2016-02-27 01:45:00 +03:00
|
|
|
"no-empty-function": 0,
|
2016-08-04 20:31:27 +03:00
|
|
|
"no-eq-null": 2,
|
|
|
|
"no-extend-native": 2,
|
|
|
|
"no-extra-label": 2,
|
2016-08-10 02:38:26 +03:00
|
|
|
"no-extra-parens": 0,
|
2016-08-04 20:31:27 +03:00
|
|
|
"no-floating-decimal": 2,
|
2016-08-10 10:16:13 +03:00
|
|
|
"no-implicit-coercion": [2, {"allow": ["!!"]}],
|
2016-08-09 22:01:29 +03:00
|
|
|
"no-implicit-globals": 2,
|
2016-02-27 01:45:00 +03:00
|
|
|
"no-inline-comments": 0,
|
|
|
|
"no-invalid-this": 0,
|
2016-08-04 20:31:27 +03:00
|
|
|
"no-label-var": 2,
|
|
|
|
"no-loop-func": 2,
|
2016-02-27 01:45:00 +03:00
|
|
|
"no-magic-numbers": 0,
|
2016-08-10 02:18:49 +03:00
|
|
|
"no-mixed-operators": [2, {"allowSamePrecedence": true, "groups": [["&", "|", "^", "~", "<<", ">>", ">>>"], ["==", "!=", "===", "!==", ">", ">=", "<", "<="], ["&&", "||"], ["in", "instanceof"]]}],
|
2016-08-04 20:31:27 +03:00
|
|
|
"no-mixed-requires": 2,
|
|
|
|
"no-multi-str": 2,
|
2016-08-04 23:35:06 +03:00
|
|
|
"no-multiple-empty-lines": [2, {"max": 1, "maxBOF": 0, "maxEOF": 0}],
|
2016-02-27 01:45:00 +03:00
|
|
|
"no-negated-condition": 0,
|
2016-08-09 22:01:29 +03:00
|
|
|
"no-negated-in-lhs": 2,
|
2016-08-04 20:31:27 +03:00
|
|
|
"no-new": 2,
|
|
|
|
"no-new-func": 2,
|
|
|
|
"no-new-require": 2,
|
|
|
|
"no-octal-escape": 2,
|
2016-08-10 07:15:26 +03:00
|
|
|
"no-param-reassign": 2,
|
2016-08-04 20:31:27 +03:00
|
|
|
"no-path-concat": 2,
|
2016-08-10 02:37:18 +03:00
|
|
|
"no-plusplus": 0,
|
2016-08-10 10:52:01 +03:00
|
|
|
"no-process-env": 0,
|
2016-08-09 22:01:29 +03:00
|
|
|
"no-process-exit": 2,
|
2016-08-04 20:31:27 +03:00
|
|
|
"no-proto": 2,
|
2016-08-10 11:02:03 +03:00
|
|
|
"no-prototype-builtins": 2,
|
2016-08-09 22:01:29 +03:00
|
|
|
"no-restricted-globals": 2,
|
|
|
|
"no-restricted-imports": 2,
|
|
|
|
"no-restricted-modules": 2,
|
|
|
|
"no-restricted-syntax": 2,
|
2016-08-05 02:53:45 +03:00
|
|
|
"no-return-assign": [2, "except-parens"],
|
2016-08-05 00:09:49 +03:00
|
|
|
"no-script-url": 2,
|
2016-08-05 00:10:50 +03:00
|
|
|
"no-sequences": 2,
|
2017-03-22 11:32:42 +03:00
|
|
|
"no-shadow": 2,
|
2016-08-04 20:31:27 +03:00
|
|
|
"no-spaced-func": 2,
|
2017-10-21 00:50:41 +03:00
|
|
|
"no-sync": 0,
|
2016-11-10 02:51:47 +03:00
|
|
|
"no-template-curly-in-string": 2,
|
2016-08-10 02:37:58 +03:00
|
|
|
"no-ternary": 0,
|
2016-08-04 20:31:27 +03:00
|
|
|
"no-throw-literal": 2,
|
|
|
|
"no-undef-init": 2,
|
2016-08-10 01:56:32 +03:00
|
|
|
"no-undefined": 0,
|
2016-02-27 01:45:00 +03:00
|
|
|
"no-underscore-dangle": 0,
|
2016-08-04 20:31:27 +03:00
|
|
|
"no-unmodified-loop-condition": 2,
|
2016-08-10 10:59:16 +03:00
|
|
|
"no-unused-expressions": 2,
|
2016-08-10 07:02:35 +03:00
|
|
|
"no-use-before-define": 2,
|
2016-08-09 22:01:29 +03:00
|
|
|
"no-useless-computed-key": 2,
|
2016-08-04 20:31:27 +03:00
|
|
|
"no-useless-constructor": 2,
|
2016-08-09 22:01:29 +03:00
|
|
|
"no-useless-rename": 2,
|
2016-08-04 20:31:27 +03:00
|
|
|
"no-var": 2,
|
|
|
|
"no-void": 2,
|
2016-03-11 01:38:17 +03:00
|
|
|
"no-warning-comments": 0, // TODO: Change to `1`?
|
2016-08-10 02:52:10 +03:00
|
|
|
"object-curly-newline": [2, {"multiline": true}],
|
2016-02-10 00:55:12 +03:00
|
|
|
"object-curly-spacing": [2, "never"],
|
2016-08-10 01:52:49 +03:00
|
|
|
"object-property-newline": [2, {"allowMultiplePropertiesPerLine": true}],
|
2016-08-05 01:49:02 +03:00
|
|
|
"one-var": [2, "never"],
|
2016-08-04 20:31:27 +03:00
|
|
|
"one-var-declaration-per-line": [2, "initializations"],
|
|
|
|
"operator-assignment": [2, "always"],
|
2016-08-05 01:49:02 +03:00
|
|
|
"operator-linebreak": [2, "after"],
|
2016-08-04 23:39:38 +03:00
|
|
|
"padded-blocks": [2, "never"],
|
2016-08-10 03:03:34 +03:00
|
|
|
"prefer-arrow-callback": ["error", {"allowNamedFunctions": true}],
|
2016-03-11 01:38:17 +03:00
|
|
|
"prefer-const": 0, // TODO: Change to `1`?
|
2016-02-27 01:45:00 +03:00
|
|
|
"prefer-reflect": 0,
|
2016-08-10 10:43:27 +03:00
|
|
|
"prefer-rest-params": 2,
|
2016-08-10 10:15:43 +03:00
|
|
|
"prefer-spread": 2,
|
2016-08-10 03:43:07 +03:00
|
|
|
"prefer-template": 2,
|
2016-08-10 01:42:27 +03:00
|
|
|
"quote-props": [2, "consistent"],
|
2016-08-04 20:31:27 +03:00
|
|
|
"radix": [2, "always"],
|
2016-08-10 01:45:32 +03:00
|
|
|
"require-jsdoc": 0,
|
2016-08-04 23:40:54 +03:00
|
|
|
"semi-spacing": [2, {"before": false, "after": true}],
|
2017-12-06 23:32:28 +03:00
|
|
|
"sort-imports": [2, {"ignoreCase": true}],
|
2016-08-09 22:01:29 +03:00
|
|
|
"sort-vars": 2,
|
2016-08-04 20:31:27 +03:00
|
|
|
"space-in-parens": [2, "never"],
|
|
|
|
"strict": 0,
|
|
|
|
"template-curly-spacing": [2, "never"],
|
2016-08-09 22:01:29 +03:00
|
|
|
"unicode-bom": [2, "never"],
|
2016-08-05 01:49:02 +03:00
|
|
|
"valid-jsdoc": [0, {"requireReturn": false, "requireParamDescription": false, "requireReturnDescription": false}],
|
2016-08-09 22:01:29 +03:00
|
|
|
"vars-on-top": 2,
|
|
|
|
"wrap-iife": [2, "inside"],
|
2016-08-10 10:50:36 +03:00
|
|
|
"wrap-regex": 0,
|
2016-08-04 20:31:27 +03:00
|
|
|
"yield-star-spacing": [2, "after"],
|
2016-08-05 01:49:02 +03:00
|
|
|
"yoda": [2, "never"]
|
2016-02-01 21:20:30 +03:00
|
|
|
}
|
2017-03-22 10:36:06 +03:00
|
|
|
};
|