UNPKG

cra-template-jam

Version:

A quick start Create React App template with React Router, Redux Toolkit, TypeScript, Styled Components and custom ESlint configurations

335 lines (332 loc) 10.5 kB
{ "env": { "browser": true, "es2020": true, "node": true }, "extends": [ "eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended" ], "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaFeatures": { "jsx": true }, "ecmaVersion": 11, "sourceType": "module", "project": "./tsconfig.json" }, "plugins": [ "react", "@typescript-eslint" ], "settings": { "react": { "createClass": "createReactClass", "pragma": "React", "version": "detect" } }, "globals": { "page": true, "browser": true, "context": true }, "rules": { "react/jsx-key": "off", "accessor-pairs": "error", "array-bracket-spacing": "warn", "array-element-newline": ["error", "consistent"], "arrow-body-style": ["warn", "as-needed"], "arrow-parens": ["error", "as-needed"], "arrow-spacing": "error", "block-spacing": "error", "brace-style": "error", "callback-return": "off", "camelcase": "warn", "capitalized-comments": "off", "class-methods-use-this": "off", "comma-dangle": ["error", "always-multiline"], "comma-spacing": "error", "comma-style": "error", "complexity": "off", "computed-property-spacing": "error", "curly": "error", "default-case-last": "error", "dot-location": ["error", "property"], "dot-notation": "error", "eol-last": "error", "func-name-matching": "error", "func-names": "off", "func-style": "off", "function-call-argument-newline": ["error", "consistent"], "function-paren-newline": ["error", "consistent"], "generator-star-spacing": "error", "global-require": "warn", "grouped-accessor-pairs": "error", "guard-for-in": "error", "handle-callback-err": "error", "id-blacklist": "error", "id-length": "warn", "id-match": "error", "implicit-arrow-linebreak": "error", "indent": ["error", 4, { "SwitchCase": 1 }], "indent-legacy": "off", "init-declarations": "warn", "jsx-quotes": "error", "key-spacing": "error", "keyword-spacing": "error", "line-comment-position": "off", "lines-around-comment": "off", "lines-around-directive": "error", "lines-between-class-members": "off", "max-classes-per-file": "off", "max-depth": ["error", 6], "max-lines-per-function": "off", "max-nested-callbacks": "error", "max-params": ["error", 20], "max-statements": ["error", 100], "multiline-comment-style": "off", "multiline-ternary": ["warn", "always-multiline"], "new-cap": "off", "new-parens": "error", "newline-per-chained-call": "error", "no-array-constructor": "error", "no-await-in-loop": "off", "no-buffer-constructor": "error", "no-caller": "error", "no-confusing-arrow": ["error", { "allowParens": true }], "no-console": ["warn", { "allow": ["warn", "error"] }], "no-constructor-return": "error", "no-continue": "off", "no-div-regex": "error", "no-duplicate-imports": "warn", "no-else-return": "error", "no-empty-function": "off", "no-eval": "error", "no-extend-native": "error", "no-extra-bind": "error", "no-extra-label": "error", "no-floating-decimal": "error", "no-implicit-coercion": "warn", "no-implicit-globals": "error", "no-implied-eval": "error", "no-inline-comments": "off", "no-invalid-this": "off", "no-iterator": "error", "no-label-var": "error", "no-labels": "error", "no-lonely-if": "warn", "no-loss-of-precision": "error", "no-magic-numbers": "off", "@typescript-eslint/no-magic-numbers": ["warn", { "ignoreEnums": true, "ignoreNumericLiteralTypes": true, "ignore": [0, 1, -1, 12, 100, 1000], "ignoreArrayIndexes": true }], "no-mixed-operators": "warn", "no-mixed-requires": "error", "no-multi-spaces": "error", "no-multi-str": "error", "no-multiple-empty-lines": ["error", { "max": 1 }], "no-native-reassign": "error", "no-negated-condition": "warn", "no-negated-in-lhs": "error", "no-nested-ternary": "warn", "no-new": "error", "no-new-func": "error", "no-new-object": "error", "no-new-require": "error", "no-new-wrappers": "error", "no-octal-escape": "error", "no-plusplus": "off", "no-proto": "error", "no-restricted-exports": "error", "no-restricted-globals": "error", "no-restricted-imports": "error", "no-restricted-modules": "error", "no-restricted-properties": "error", "no-restricted-syntax": "error", "no-script-url": "error", "no-sequences": "error", "no-tabs": "error", "no-template-curly-in-string": "error", "no-ternary": "off", "no-trailing-spaces": "error", "no-undef-init": "off", "no-undefined": "off", "no-underscore-dangle": ["warn", { "allow": ["_", "_removed"] }], "no-unneeded-ternary": "error", "no-unreachable-loop": "error", "no-use-before-define": ["warn", { "functions": false }], "no-useless-backreference": "error", "no-useless-call": "error", "no-useless-computed-key": "error", "no-useless-constructor": "off", "no-useless-rename": "error", "no-useless-return": "error", "no-warning-comments": "off", "no-whitespace-before-property": "error", "nonblock-statement-body-position": "error", "object-curly-newline": "error", "object-curly-spacing": ["error", "always"], "object-property-newline": ["error", { "allowAllPropertiesOnSameLine": true }], "object-shorthand": "warn", "one-var": "off", "one-var-declaration-per-line": "error", "operator-assignment": "error", "operator-linebreak": ["error", "before"], "padded-blocks": "off", "padding-line-between-statements": "error", "prefer-arrow-callback": "error", "prefer-destructuring": "off", "prefer-exponentiation-operator": "error", "prefer-numeric-literals": "error", "prefer-object-spread": "error", "prefer-reflect": "off", "prefer-rest-params": "error", "prefer-template": "warn", "quote-props": ["warn", "as-needed", { "keywords": true }], "quotes": ["error", "single"], "require-jsdoc": "off", "rest-spread-spacing": "error", "semi-spacing": "error", "sort-imports": "off", "sort-keys": "off", "sort-vars": "off", "space-before-blocks": "error", "space-before-function-paren": "off", "space-in-parens": "error", "space-infix-ops": "error", "space-unary-ops": "error", "spaced-comment": ["error", "always", { "markers": ["/"] }], "strict": "error", "switch-colon-spacing": "error", "symbol-description": "error", "template-curly-spacing": "error", "template-tag-spacing": "error", "unicode-bom": "error", "valid-jsdoc": "off", "wrap-iife": ["error", "inside"], "wrap-regex": "error", "yield-star-spacing": "error", "yoda": "error", "@typescript-eslint/no-explicit-any": ["error", { "ignoreRestArgs": true }], "@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/ban-types": "off", "newline-after-var": "warn", "newline-before-return": "warn", "no-prototype-builtins": "off", "@typescript-eslint/no-inferrable-types": "warn", "@typescript-eslint/no-empty-function": ["error", { "allow": ["constructors", "arrowFunctions"] }], "react/display-name": "off", "react/prop-types": "off", "no-extra-parens": "off", "@typescript-eslint/no-extra-parens": ["warn", "all", { "nestedBinaryExpressions": false, "enforceForArrowConditionals": false }], "@typescript-eslint/ban-ts-comment": "off", "@typescript-eslint/no-empty-interface": "warn", "require-unicode-regexp": "warn", "require-await": "off", "@typescript-eslint/require-await": "warn", "prefer-named-capture-group": "off", "no-sync": "off", "no-param-reassign": "warn", "no-process-env": "off", "no-process-exit": "off", "max-len": ["warn", { "code": 120, "ignoreComments": true, "ignoreTemplateLiterals": true }], "consistent-return": "warn", "no-case-declarations": "warn", "default-param-last": "off", "array-callback-return": "warn", "prefer-const": "warn", "no-return-await": "warn", "array-bracket-newline": "warn", "block-scoped-var": "off", "max-statements-per-line": ["warn", { "max": 2 }], "no-alert": "warn", "no-async-promise-executor": "warn", "no-bitwise": "warn", "no-promise-executor-return": "warn", "no-return-assign": "warn", "no-throw-literal": "warn", "no-unused-expressions": "warn", "prefer-spread": "warn", "no-useless-escape": "warn", "no-useless-concat": "warn", "max-lines": ["warn", 1000], "@typescript-eslint/default-param-last": "warn", "no-void": "warn", "require-atomic-updates": "warn", "consistent-this": "warn", "default-case": "warn", "eqeqeq": "warn", "func-call-spacing": "warn", "no-catch-shadow": "warn", "no-cond-assign": "warn", "no-constant-condition": "warn", "no-duplicate-case": "warn", "no-empty": ["warn", { "allowEmptyCatch": true }], "no-empty-pattern": "warn", "no-eq-null": "warn", "no-fallthrough": "warn", "no-lone-blocks": "warn", "no-loop-func": "warn", "no-multi-assign": "warn", "no-path-concat": "warn", "no-self-assign": "warn", "no-self-compare": "warn", "no-shadow": "warn", "no-spaced-func": "warn", "no-unmodified-loop-condition": "warn", "no-var": "warn", "prefer-promise-reject-errors": "warn", "prefer-regex-literals": "warn", "radix": "warn", "semi": "warn", "semi-style": "warn", "vars-on-top": "warn", "no-unused-vars": "off", "@typescript-eslint/no-unused-vars": ["warn", { "args": "after-used", "ignoreRestSiblings": true, "caughtErrors": "none", "argsIgnorePattern": "^_" }] } }