eslint-config-tui
Version:
ESLint sharable config for TUI components
155 lines (154 loc) • 4.64 kB
JavaScript
module.exports = {
rules: {
"accessor-pairs": [
2,
{ setWithoutGet: true, getWithoutSet: false, enforceForClassMembers: false },
],
"arrow-body-style": [2, "as-needed", { requireReturnForObjectLiteral: false }],
"block-scoped-var": 2,
camelcase: 2,
"capitalized-comments": 0,
"class-methods-use-this": [0, { enforceForClassFields: false }],
complexity: [1, { max: 4, variant: "modified" }],
"consistent-return": 2,
"consistent-this": [2, "self"],
curly: 2,
"default-case": 2,
"default-param-last": 2,
"dot-notation": [2, { allowKeywords: false }],
eqeqeq: [2, "always"],
"func-name-matching": [2, "always", { includeCommonJSModuleExports: false }],
"func-names": 0,
"func-style": 0,
"grouped-accessor-pairs": [2, "getBeforeSet"],
"guard-for-in": 2,
"id-length": 0,
"id-match": 0,
"init-declarations": 0,
"logical-assignment-operators": 0,
"max-classes-per-file": [0, { ignoreExpressions: false }],
"max-depth": [2, 3],
"max-lines-per-function": 0,
"max-nested-callbacks": [2, 3],
"max-params": [2, 5],
"max-statements": 0,
"multiline-comment-style": 0,
"new-cap": 2,
"no-alert": 0,
"no-array-constructor": 0,
"no-bitwise": 0,
"no-caller": 2,
"no-case-declarations": 2,
"no-confusing-arrow": 0,
"no-console": 1,
"no-continue": 0,
"no-delete-var": 2,
"no-div-regex": 2,
"no-else-return": [2, { allowElseIf: false }],
"no-empty": [2, { allowEmptyCatch: false }],
"no-empty-static-block": 2,
"no-eq-null": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-extra-boolean-cast": [2, { enforceForInnerExpressions: true }],
"no-extra-semi": 2,
"no-floating-decimal": 2,
"no-implicit-coercion": [2, { boolean: false, disallowTemplateShorthand: false }],
"no-implicit-globals": [2, { lexicalBindings: true }],
"no-implied-eval": 2,
"no-inline-comments": 0,
"no-iterator": 2,
"no-label-var": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-lonely-if": 2,
"no-loop-func": 2,
"no-mixed-operators": [2, { allowSamePrecedence: true }],
"no-multi-assign": 0,
"no-multi-str": 2,
"no-nested-ternary": 2,
"no-new": 2,
"no-new-func": 2,
"no-new-wrappers": 2,
"no-nonoctal-decimal-escape": 2,
"no-object-constructor": 2,
"no-octal": 2,
"no-octal-escape": 2,
"no-param-reassign": 0,
"no-plusplus": 2,
"no-proto": 2,
"no-redeclare": 2,
"no-regex-spaces": 2,
"no-restricted-globals": [1, "event", "fdescribe", "fit"],
"no-restricted-properties": 0,
"no-restricted-syntax": [2, "WithStatement"],
"no-return-assign": [2, "always"],
"no-script-url": 2,
"no-sequences": [2, { allowInParentheses: false }],
"no-shadow": [2, { ignoreOnInitialization: false }],
"no-shadow-restricted-names": 2,
"no-ternary": 0,
"no-throw-literal": 2,
"no-undef-init": 2,
"no-undefined": 2,
"no-underscore-dangle": 0,
"no-unneeded-ternary": 2,
"no-unused-expressions": 2,
"no-useless-call": 2,
"no-useless-catch": 2,
"no-useless-computed-key": 2,
"no-useless-concat": 2,
"no-useless-constructor": 2,
"no-useless-escape": 2,
"no-useless-rename": 2,
"no-useless-return": 2,
"no-var": 2,
"no-void": 2,
"no-warning-comments": 1,
"no-with": 2,
"object-shorthand": [2, "always", { avoidQuotes: true }],
"one-var": 0,
"operator-assignment": 0,
"prefer-arrow-callback": [2, { allowUnboundThis: false, allowNamedFunctions: true }],
"prefer-const": [2, { destructuring: "any", ignoreReadBeforeAssign: true }],
"prefer-destructuring": [
2,
{
VariableDeclarator: { array: true, object: true },
AssignmentExpression: { array: true, object: true },
},
{ enforceForRenamedProperties: false },
],
"prefer-exponentiation-operator": 2,
"prefer-numeric-literals": 2,
"prefer-object-spread": 0,
"prefer-promise-reject-errors": 0,
"prefer-regex-literals": 2,
"prefer-rest-params": 2,
"prefer-spread": 2,
"prefer-template": 2,
"quote-props": 0,
radix: 2,
"require-await": 2,
"require-unicode-regexp": 0,
"require-yield": 2,
"sort-imports": 0,
"sort-keys": 0,
"sort-vars": 0,
"spaced-comment": [
2,
"always",
{
block: {
markers: ["*"],
exceptions: ["*"],
},
},
],
strict: [2, "global"],
"symbol-description": 0,
"vars-on-top": 2,
yoda: 2,
},
};