github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/client/.eslintrc (about)

     1  {
     2    "parser": "@typescript-eslint/parser",
     3    "parserOptions": {
     4      "ecmaVersion": 12,
     5      "sourceType": "module"
     6    },
     7    "plugins": ["@typescript-eslint"],
     8    "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
     9  
    10    "rules": {
    11      // bundle
    12      "@typescript-eslint/no-unused-vars": "error",
    13      "@typescript-eslint/consistent-type-definitions": ["error", "type"],
    14  
    15      // problems
    16      "array-callback-return": ["error"],
    17      "no-await-in-loop": ["error"],
    18      "no-constant-binary-expression": ["error"],
    19      "no-constructor-return": ["error"],
    20      "no-duplicate-imports": ["error"],
    21      "no-new-native-nonconstructor": ["error"],
    22      "no-promise-executor-return": ["error"],
    23      "no-self-compare": ["error"],
    24      "no-template-curly-in-string": ["error"],
    25      "no-unmodified-loop-condition": ["error"],
    26      "no-unreachable-loop": ["error"],
    27      "no-unused-private-class-members": ["error"],
    28      "no-use-before-define": ["error"],
    29      "require-atomic-updates": ["error"],
    30  
    31      // suggestions
    32      "accessor-pairs": ["error"],
    33      "block-scoped-var": ["error"],
    34      "camelcase": ["error"],
    35      "curly": ["error"],
    36      "default-case-last": ["error"],
    37      "default-param-last": ["error"],
    38      "dot-notation": ["error"],
    39      "eqeqeq": ["error"],
    40      "grouped-accessor-pairs": ["error"],
    41      "logical-assignment-operators": ["error"],
    42      "max-depth": ["error"],
    43      "max-lines": ["error"],
    44      "max-lines-per-function": ["error", { "max": 100 }],
    45      "max-nested-callbacks": ["error"],
    46      "max-params": ["error", 6],
    47      "new-cap": ["error"],
    48      "no-array-constructor": ["error"],
    49      "no-caller": ["error"],
    50      "no-case-declarations": ["error"],
    51      "no-confusing-arrow": ["error"],
    52      "no-div-regex": ["error"],
    53      "no-else-return": ["error"],
    54      "no-empty-function": ["error"],
    55      "no-empty-static-block": ["error"],
    56      "no-eval": ["error"],
    57      "no-extend-native": ["error"],
    58      "no-extra-bind": ["error"],
    59      "no-extra-label": ["error"],
    60      "no-floating-decimal": ["error"],
    61      "no-implicit-coercion": ["error"],
    62      "no-implicit-globals": ["error"],
    63      "no-implied-eval": ["error"],
    64      "no-invalid-this": ["error"],
    65      "no-iterator": ["error"],
    66      "no-label-var": ["error"],
    67      "no-lone-blocks": ["error"],
    68      "no-lonely-if": ["error"],
    69      "no-loop-func": ["error"],
    70      "no-negated-condition": ["error"],
    71      "no-nested-ternary": ["error"],
    72      "no-new": ["error"],
    73      "no-new-func": ["error"],
    74      "no-new-object": ["error"],
    75      "no-new-wrappers": ["error"],
    76      "no-proto": ["error"],
    77      "no-return-assign": ["error"],
    78      "no-return-await": ["error"],
    79      "no-script-url": ["error"],
    80      "no-shadow": ["error"],
    81      "no-throw-literal": ["error"],
    82      "no-undef-init": ["error"],
    83      "no-underscore-dangle": ["error"],
    84      "no-unneeded-ternary": ["error"],
    85      "no-unused-expressions": ["error"],
    86      "no-unused-labels": ["error"],
    87      "no-useless-call": ["error"],
    88      "no-useless-computed-key": ["error"],
    89      "no-useless-concat": ["error"],
    90      "no-useless-constructor": ["error"],
    91      "no-useless-rename": ["error"],
    92      "no-useless-return": ["error"],
    93      "no-var": ["error"],
    94      "prefer-arrow-callback": ["error"],
    95      "prefer-const": ["error"],
    96      // "prefer-destructuring": ["error"],
    97      "prefer-numeric-literals": ["error"],
    98      "prefer-object-has-own": ["error"],
    99      "prefer-object-spread": ["error"],
   100      "prefer-promise-reject-errors": ["error"],
   101      "prefer-regex-literals": ["error"],
   102      "prefer-rest-params": ["error"],
   103      "prefer-spread": ["error"],
   104      // "prefer-template": ["error"],
   105      // "quote-props": ["error"],
   106      "radix": ["error"],
   107      "require-await": ["error"],
   108      "require-unicode-regexp": ["error"],
   109      // "sort-imports": ["error"],
   110      "spaced-comment": ["error"],
   111      "strict": ["error"],
   112      "yoda": ["error"],
   113  
   114      // formatting
   115      "array-bracket-spacing": ["error"],
   116      "arrow-parens": ["error"],
   117      "arrow-spacing": ["error"],
   118      "block-spacing": ["error"],
   119      "brace-style": ["error"],
   120      "comma-dangle": ["error"],
   121      "comma-spacing": ["error"],
   122      "comma-style": ["error"],
   123      "computed-property-spacing": ["error"],
   124      "dot-location": ["error"],
   125      "eol-last": ["error"],
   126      "func-call-spacing": ["error"],
   127      "function-call-argument-newline": ["error", "consistent"],
   128      "generator-star-spacing": ["error"],
   129      "implicit-arrow-linebreak": ["error"],
   130      "indent": ["error", 2, {"SwitchCase": 1}],
   131      "jsx-quotes": ["error"],
   132      "key-spacing": ["error"],
   133      "keyword-spacing": ["error"],
   134      "linebreak-style": ["error"],
   135      "max-statements-per-line": ["error"],
   136      "new-parens": ["error"],
   137      "no-extra-parens": ["error"],
   138      "no-multi-spaces": ["error"],
   139      "no-multiple-empty-lines": ["error"],
   140      "no-tabs": ["error"],
   141      "no-trailing-spaces": ["error"],
   142      "no-whitespace-before-property": ["error"],
   143      "nonblock-statement-body-position": ["error"],
   144      "object-curly-spacing": ["error"],
   145      "operator-linebreak": ["error"],
   146      "padded-blocks": ["error", "never"],
   147      "quotes": ["error", "double", {"avoidEscape": true, "allowTemplateLiterals": true}],
   148      "rest-spread-spacing": ["error"],
   149      "semi": ["error", "always"],
   150      "semi-spacing": ["error"],
   151      "semi-style": ["error"],
   152      "space-before-blocks": ["error"],
   153      "space-before-function-paren": ["error", "never"],
   154      "space-in-parens": ["error"],
   155      "space-infix-ops": ["error"],
   156      "space-unary-ops": ["error"],
   157      "switch-colon-spacing": ["error"],
   158      "template-curly-spacing": ["error"],
   159      "template-tag-spacing": ["error"],
   160      "unicode-bom": ["error"],
   161      "wrap-iife": ["error"],
   162      "wrap-regex": ["error"],
   163      "yield-star-spacing": ["error"]
   164    },
   165  
   166    "env": {
   167      "browser": true,
   168      "es2021": true
   169    }
   170  }