зеркало из https://github.com/mozilla/tsci.git
63 строки
1.7 KiB
JavaScript
63 строки
1.7 KiB
JavaScript
module.exports = {
|
|
env: {
|
|
es6: true,
|
|
node: true,
|
|
jest: true,
|
|
},
|
|
extends: [
|
|
"eslint:recommended",
|
|
"plugin:prettier/recommended",
|
|
],
|
|
parserOptions: {
|
|
ecmaVersion: 9,
|
|
sourceType: "module",
|
|
},
|
|
plugins: ["import"],
|
|
rules: {
|
|
// Plugin rules:
|
|
"import/no-duplicates": "error",
|
|
"import/no-unresolved": "error",
|
|
"import/named": "error",
|
|
|
|
// overriding recommended rules
|
|
"no-constant-condition": ["error", { checkLoops: false }],
|
|
"no-console": ["error", { allow: ["log", "warn", "error"] }],
|
|
"no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
"no-async-promise-executor": "warn",
|
|
|
|
// possible errors
|
|
"array-callback-return": "error",
|
|
"comma-dangle": ["error", "only-multiline"],
|
|
"consistent-return": "error",
|
|
"default-case": "error",
|
|
"dot-notation": "error",
|
|
"eqeqeq": "error",
|
|
"for-direction": "error",
|
|
"no-alert": "error",
|
|
"no-caller": "error",
|
|
"no-eval": "error",
|
|
"no-extend-native": "error",
|
|
"no-extra-bind": "error",
|
|
"no-extra-label": "error",
|
|
"no-implied-eval": "error",
|
|
"no-return-await": "error",
|
|
"no-self-compare": "error",
|
|
"no-throw-literal": "error",
|
|
"no-unmodified-loop-condition": "error",
|
|
"no-useless-call": "error",
|
|
"no-useless-computed-key": "error",
|
|
"no-useless-concat": "error",
|
|
"no-useless-constructor": "error",
|
|
"no-useless-rename": "error",
|
|
"no-useless-return": "error",
|
|
"no-var": "error",
|
|
"no-void": "error",
|
|
"no-with": "error",
|
|
"prefer-const": "error",
|
|
"prefer-promise-reject-errors": "error",
|
|
"prefer-rest-params": "error",
|
|
"prefer-spread": "error",
|
|
"no-else-return": "error",
|
|
},
|
|
};
|