AndreyProgr/estimate-js

View on GitHub
.eslintrc.json

Summary

Maintainability
Test Coverage
{
  "parser": "@typescript-eslint/parser",
  "extends": [
    "plugin:@typescript-eslint/recommended"
  ],
  "plugins": [
    "harkovets"
  ],
  "globals": {
    "__DEV__": "readonly"
  },
  "ignorePatterns": [
    "webpack.config.js",
    "/dist/*"
  ],
  "env": {
    "es6": true,
    "node": true,
    "jest": true,
    "browser": true
  },
  "parserOptions": {
    "ecmaVersion": 2021,
    "sourceType": "module"
  },
  "rules": {
    "no-labels": "error",
    "no-caller": "error",
    "use-isnan": "error",
    "no-dupe-args": "error",
    "no-redeclare": "error",
    "no-obj-calls": "error",
    "no-dupe-keys": "error",
    "no-div-regex": "error",
    "valid-typeof": "error",
    "for-direction": "error",
    "no-new-symbol": "error",
    "no-delete-var": "error",
    "no-const-assign": "error",
    "no-extend-native": "error",
    "no-global-assign": "error",
    "no-unsafe-finally": "error",
    "no-duplicate-case": "error",
    "no-invalid-regexp": "error",
    "no-this-before-super": "error",
    "no-shadow-restricted-names": "error",
    "no-unmodified-loop-condition": "error",
    "semi": "warn",
    "yoda": "warn",
    "no-var": "warn",
    "eqeqeq": "warn",
    "no-eval": "warn",
    "no-with": "warn",
    "no-void": "warn",
    "eol-last": "warn",
    "no-undef": "warn",
    "no-proto": "warn",
    "no-octal": "warn",
    "no-alert": "warn",
    "wrap-iife": "warn",
    "wrap-regex": "warn",
    "no-bitwise": "warn",
    "semi-style": "warn",
    "new-parens": "warn",
    "no-debugger": "warn",
    "no-continue": "warn",
    "key-spacing": "warn",
    "comma-style": "warn",
    "no-new-func": "warn",
    "no-iterator": "warn",
    "prefer-const": "warn",
    "no-sequences": "warn",
    "dot-notation": "warn",
    "no-ex-assign": "warn",
    "semi-spacing": "warn",
    "no-lonely-if": "warn",
    "no-multi-str": "warn",
    "no-loop-func": "warn",
    "arrow-parens": "warn",
    "prefer-spread": "warn",
    "arrow-spacing": "warn",
    "getter-return": "warn",
    "no-new-object": "warn",
    "comma-spacing": "warn",
    "block-spacing": "warn",
    "no-undef-init": "warn",
    "require-await": "warn",
    "no-script-url": "warn",
    "no-extra-bind": "warn",
    "require-yield": "warn",
    "no-extra-semi": "warn",
    "no-cond-assign": "warn",
    "spaced-comment": "warn",
    "no-path-concat": "warn",
    "no-lone-blocks": "warn",
    "no-else-return": "warn",
    "no-spaced-func": "warn",
    "accessor-pairs": "warn",
    "no-func-assign": "warn",
    "no-unreachable": "warn",
    "prefer-template": "warn",
    "no-class-assign": "warn",
    "space-in-parens": "warn",
    "no-multi-spaces": "warn",
    "space-unary-ops": "warn",
    "space-infix-ops": "warn",
    "keyword-spacing": "warn",
    "no-useless-call": "warn",
    "no-self-compare": "warn",
    "no-return-await": "warn",
    "no-octal-escape": "warn",
    "no-new-wrappers": "warn",
    "no-implied-eval": "warn",
    "no-regex-spaces": "warn",
    "no-return-assign": "warn",
    "no-throw-literal": "warn",
    "no-empty-pattern": "warn",
    "no-sparse-arrays": "warn",
    "constructor-super": "warn",
    "no-useless-rename": "warn",
    "func-call-spacing": "warn",
    "no-useless-return": "warn",
    "no-useless-escape": "warn",
    "no-useless-concat": "warn",
    "no-empty-function": "warn",
    "yield-star-spacing": "warn",
    "symbol-description": "warn",
    "prefer-rest-params": "warn",
    "quotes": ["warn", "single"],
    "no-trailing-spaces": "warn",
    "no-mixed-operators": "warn",
    "no-inline-comments": "warn",
    "func-name-matching": "warn",
    "no-unsafe-negation": "warn",
    "no-floating-decimal": "warn",
    "no-compare-neg-zero": "warn",
    "rest-spread-spacing": "warn",
    "no-unneeded-ternary": "warn",
    "operator-assignment": "warn",
    "space-before-blocks": "warn",
    "no-implicit-globals": "warn",
    "no-case-declarations": "warn",
    "prefer-destructuring": "warn",
    "no-duplicate-imports": "warn",
    "template-tag-spacing": "warn",
    "switch-colon-spacing": "warn",
    "prefer-object-spread": "warn",
    "no-negated-condition": "warn",
    "no-array-constructor": "warn",
    "no-unused-expressions": "warn",
    "prefer-arrow-callback": "warn",
    "no-buffer-constructor": "warn",
    "no-constant-condition": "warn",
    "no-extra-boolean-cast": "warn",
    "no-inner-declarations": "warn",
    "generator-star-spacing": "warn",
    "template-curly-spacing": "warn",
    "no-useless-computed-key": "warn",
    "no-unexpected-multiline": "warn",
    "no-irregular-whitespace": "warn",
    "padded-blocks": ["warn", "never"],
    "no-mixed-spaces-and-tabs": "warn",
    "no-empty-character-class": "warn",
    "max-nested-callbacks": ["warn", 4],
    "func-names": ["warn", "as-needed"],
    "max-len": ["warn", { "code": 80 }],
    "max-depth": ["warn", { "max": 4 }],
    "computed-property-spacing": "warn",
    "dot-location": ["warn", "property"],
    "max-params": ["warn", { "max": 4 }],
    "quote-props": ["warn", "as-needed"],
    "func-style": ["warn", "expression"],
    "no-template-curly-in-string": "warn",
    "complexity": ["warn", { "max": 12 }],
    "one-var-declaration-per-line": "warn",
    "prefer-promise-reject-errors": "warn",
    "no-whitespace-before-property": "warn",
    "jsx-quotes": ["warn", "prefer-single"],
    "no-misleading-character-class": "warn",
    "max-statements": ["warn", { "max": 10 }],
    "object-curly-spacing": ["warn", "always"],
    "new-cap": ["warn", { "capIsNew": false }],
    "indent": ["warn", 2, { "SwitchCase": 1 }],
    "array-bracket-spacing": ["warn", "never"],
    "comma-dangle": ["warn", "always-multiline"],
    "id-length": ["warn", { "min": 1, "max": 35 }],
    "no-console": ["warn", { "allow": ["error"] }],
    "array-bracket-newline": ["warn", "consistent"],
    "function-paren-newline": ["warn", "consistent"],
    "curly": ["warn", "multi-or-nest", "consistent"],
    "multiline-ternary": ["warn", "always-multiline"],
    "max-statements-per-line": ["warn", { "max": 1 }],
    "no-empty": ["warn", { "allowEmptyCatch": true }],
    "multiline-comment-style": ["warn", "starred-block"],
    "no-implicit-coercion": ["warn", { "allow": ["!!"] }],
    "function-call-argument-newline": ["warn", "consistent"],
    "line-comment-position": ["warn", { "position": "above" }],
    "brace-style": ["warn", "1tbs", { "allowSingleLine": false }],
    "no-multiple-empty-lines": ["warn", { "max": 1, "maxEOF": 0 }],
    "no-warning-comments": ["warn", { "terms": ["todo","fixme"] }],
    "newline-per-chained-call": ["warn", { "ignoreChainWithDepth": 4 }],
    "consistent-return": ["warn", { "treatUndefinedAsUnspecified": false }],
    "no-extra-parens": ["warn", "all", { "nestedBinaryExpressions": false }],
    "object-property-newline": ["warn", { "allowAllPropertiesOnSameLine": true }],
    "max-lines": ["warn", { "max": 120, "skipBlankLines": true, "skipComments": true }],
    "max-lines-per-function": ["warn", { "max": 40, "skipBlankLines": true, "skipComments": true }],
    "operator-linebreak": ["warn", "before", { "overrides": { "=": "after", "&&": "after", "||": "after" } }],
    "space-before-function-paren": [
      "warn",
      { "named": "never", "anonymous": "always", "asyncArrow": "always" }
    ],
    "radix": "off",
    "no-new": "off",
    "strict": "off",
    "one-var": "off",
    "no-sync": "off",
    "no-tabs": "off",
    "id-match": "off",
    "no-shadow": "off",
    "sort-vars": "off",
    "sort-keys": "off",
    "no-ternary": "off",
    "no-eq-null": "off",
    "valid-jsdoc": "off",
    "no-plusplus": "off",
    "vars-on-top": "off",
    "unicode-bom": "off",
    "id-blacklist": "off",
    "no-label-var": "off",
    "no-undefined": "off",
    "guard-for-in": "off",
    "default-case": "off",
    "sort-imports": "off",
    "require-jsdoc": "off",
    "indent-legacy": "off",
    "no-unused-vars": "off",
    "no-self-assign": "off",
    "no-fallthrough": "off",
    "no-extra-label": "off",
    "global-require": "off",
    "no-new-require": "off",
    "prefer-reflect": "off",
    "no-process-env": "off",
    "no-multi-assign": "off",
    "no-catch-shadow": "off",
    "linebreak-style": "off",
    "consistent-this": "off",
    "no-invalid-this": "off",
    "no-process-exit": "off",
    "no-unused-labels": "off",
    "no-control-regex": "off",
    "block-scoped-var": "off",
    "no-magic-numbers": "off",
    "no-await-in-loop": "off",
    "object-shorthand": "off",
    "no-nested-ternary": "off",
    "no-param-reassign": "off",
    "init-declarations": "off",
    "no-mixed-requires": "off",
    "newline-after-var": "off",
    "no-negated-in-lhs": "off",
    "no-confusing-arrow": "off",
    "no-native-reassign": "off",
    "handle-callback-err": "off",
    "no-use-before-define": "off",
    "no-underscore-dangle": "off",
    "no-restricted-syntax": "off",
    "object-curly-newline": "off",
    "capitalized-comments": "off",
    "lines-around-comment": "off",
    "no-dupe-class-members": "off",
    "array-callback-return": "off",
    "no-restricted-modules": "off",
    "no-restricted-imports": "off",
    "no-restricted-globals": "off",
    "no-prototype-builtins": "off",
    "array-element-newline": "off",
    "newline-before-return": "off",
    "class-methods-use-this": "off",
    "no-useless-constructor": "off",
    "lines-around-directive": "off",
    "prefer-numeric-literals": "off",
    "implicit-arrow-linebreak": "off",
    "no-restricted-properties": "off",
    "lines-between-class-members": "off",
    "arrow-body-style": ["off", "as-needed"],
    "padding-line-between-statements": "off",
    "nonblock-statement-body-position": "off",
    "callback-return": ["off", ["callback", "next", "done"]],
    "camelcase": ["off", { "properties": "never", "ignoreDestructuring": true }],

    "harkovets/prohibit-newline-in-function-body": "warn",

    "@typescript-eslint/no-unused-vars": ["warn"],
    "@typescript-eslint/indent": "off",
    "@typescript-eslint/ban-types": "off",
    "@typescript-eslint/camelcase": "off",
    "@typescript-eslint/no-explicit-any": "off",
    "@typescript-eslint/no-empty-function": "off",
    "@typescript-eslint/no-empty-interface": "off",
    "@typescript-eslint/interface-name-prefix": "off",
    "@typescript-eslint/explicit-module-boundary-types": "off"
  }
}