168 lines
5.4 KiB
YAML
168 lines
5.4 KiB
YAML
env:
|
|
jest: true
|
|
node: true
|
|
root: true
|
|
plugins:
|
|
- import
|
|
- prettier
|
|
parserOptions:
|
|
ecmaVersion: 2021
|
|
sourceType: module
|
|
extends:
|
|
- plugin:prettier/recommended
|
|
- prettier
|
|
rules:
|
|
prettier/prettier: [error]
|
|
import/no-extraneous-dependencies:
|
|
- error
|
|
- devDependencies:
|
|
- "**/test/**"
|
|
- "**/build-tools/**"
|
|
optionalDependencies: false
|
|
peerDependencies: true
|
|
import/no-unresolved: [error]
|
|
import/order:
|
|
- warn
|
|
- groups:
|
|
- builtin
|
|
- external
|
|
alphabetize:
|
|
order: asc
|
|
caseInsensitive: true
|
|
array-callback-return: [warn]
|
|
no-await-in-loop: [warn]
|
|
no-constant-binary-expression: [error]
|
|
no-constructor-return: [error]
|
|
no-duplicate-imports: [error]
|
|
no-self-compare: [warn]
|
|
no-template-curly-in-string: [error]
|
|
no-unmodified-loop-condition: [error]
|
|
no-unreachable-loop: [error]
|
|
no-unused-private-class-members: [error]
|
|
no-use-before-define: [error]
|
|
require-atomic-updates: [error]
|
|
block-scoped-var: [warn]
|
|
camelcase: [warn]
|
|
class-methods-use-this: [error]
|
|
consistent-return: [warn]
|
|
consistent-this: [warn]
|
|
default-case-last: [warn]
|
|
default-param-last: [warn]
|
|
dot-notation: [error]
|
|
eqeqeq: [error]
|
|
guard-for-in: [warn]
|
|
logical-assignment-operators:
|
|
- error
|
|
- always
|
|
- enforceForIfStatements: false
|
|
no-array-constructor: [error]
|
|
no-bitwise: [error]
|
|
no-console: [warn]
|
|
no-empty-function: [warn]
|
|
no-eval: [error]
|
|
no-extra-bind: [error]
|
|
no-labels: [error]
|
|
no-implicit-globals: [error]
|
|
no-invalid-this: [error]
|
|
key-spacing: [error]
|
|
no-multiple-empty-lines: [error]
|
|
no-return-await: [warn]
|
|
no-trailing-spaces: [error]
|
|
no-lonely-if: [error]
|
|
no-nested-ternary: [warn]
|
|
no-mixed-operators: [warn]
|
|
no-proto: [error]
|
|
no-sequences: [error]
|
|
no-throw-literal: [error]
|
|
no-useless-call: [error]
|
|
no-useless-concat: [warn]
|
|
no-var: [error]
|
|
one-var-declaration-per-line: [error]
|
|
prefer-const: [warn]
|
|
prefer-arrow-callback: [warn]
|
|
prefer-regex-literals: [warn]
|
|
prefer-promise-reject-errors: [warn]
|
|
prefer-spread: [warn]
|
|
prefer-template: [warn]
|
|
require-await: [error]
|
|
overrides:
|
|
- files:
|
|
- '**/*.ts'
|
|
parser: '@typescript-eslint/parser'
|
|
parserOptions:
|
|
ecmaVersion: 2021
|
|
sourceType: module
|
|
project: ./tsconfig.json
|
|
extends:
|
|
- plugin:@typescript-eslint/recommended
|
|
- plugin:@typescript-eslint/recommended-requiring-type-checking
|
|
- plugin:import/typescript
|
|
rules:
|
|
'@typescript-eslint/array-type':
|
|
- warn
|
|
- default: array-simple
|
|
'@typescript-eslint/ban-tslint-comment': [error]
|
|
'@typescript-eslint/consistent-indexed-object-style': [warn]
|
|
'@typescript-eslint/consistent-type-assertions': [warn]
|
|
'@typescript-eslint/prefer-includes': [warn]
|
|
dot-notation: [off]
|
|
'@typescript-eslint/dot-notation': [error]
|
|
'@typescript-eslint/no-explicit-any': [off]
|
|
'@typescript-eslint/consistent-type-exports': [warn]
|
|
'@typescript-eslint/consistent-type-imports': [warn]
|
|
'@typescript-eslint/no-base-to-string': [error]
|
|
'@typescript-eslint/no-confusing-non-null-assertion': [warn]
|
|
'@typescript-eslint/no-invalid-void-type': [error]
|
|
'@typescript-eslint/no-meaningless-void-operator': [warn]
|
|
'@typescript-eslint/no-redundant-type-constituents': [warn]
|
|
'@typescript-eslint/no-unnecessary-boolean-literal-compare': [warn]
|
|
'@typescript-eslint/no-unnecessary-condition': [warn]
|
|
'@typescript-eslint/no-unnecessary-qualifier': [warn]
|
|
'@typescript-eslint/no-unnecessary-type-arguments': [warn]
|
|
'@typescript-eslint/non-nullable-type-assertion-style': [warn]
|
|
'@typescript-eslint/prefer-for-of': [error]
|
|
'@typescript-eslint/prefer-literal-enum-member': [warn]
|
|
'@typescript-eslint/prefer-optional-chain': [warn]
|
|
'@typescript-eslint/prefer-readonly': [warn]
|
|
'@typescript-eslint/prefer-regexp-exec': [warn]
|
|
'@typescript-eslint/prefer-string-starts-ends-with': [warn]
|
|
'@typescript-eslint/prefer-ts-expect-error': [error]
|
|
'@typescript-eslint/promise-function-async': [warn]
|
|
'@typescript-eslint/require-array-sort-compare': [error]
|
|
default-param-last: [off]
|
|
'@typescript-eslint/default-param-last': [warn]
|
|
no-array-constructor: [off]
|
|
'@typescript-eslint/no-array-constructor': [error]
|
|
no-dupe-class-members: [off]
|
|
'@typescript-eslint/no-dupe-class-members': [warn]
|
|
no-invalid-this: [off]
|
|
'@typescript-eslint/no-invalid-this': [warn]
|
|
no-unused-vars: [off]
|
|
'@typescript-eslint/no-unused-vars':
|
|
- error
|
|
- varsIgnorePattern: '^_'
|
|
argsIgnorePattern: '^_'
|
|
caughtErrorsIgnorePattern: '^_'
|
|
'@typescript-eslint/no-non-null-assertion': [off]
|
|
'@typescript-eslint/no-require-imports':
|
|
- error
|
|
no-return-await: [off]
|
|
'@typescript-eslint/return-await': [error]
|
|
no-shadow: [off]
|
|
'@typescript-eslint/no-shadow': [error]
|
|
'@typescript-eslint/no-floating-promises': [error]
|
|
"@typescript-eslint/member-ordering":
|
|
- error
|
|
- default:
|
|
- public-static-field
|
|
- public-static-method
|
|
- protected-static-field
|
|
- protected-static-method
|
|
- private-static-field
|
|
- private-static-method
|
|
- field
|
|
- constructor
|
|
- method
|
|
no-use-before-define: [off]
|
|
'@typescript-eslint/no-use-before-define': [error]
|
|
no-duplicate-imports: [off]
|