-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.yml
76 lines (76 loc) · 2.07 KB
/
.eslintrc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
env:
es6: true
node: true
extends:
- eslint:recommended
- standard
parserOptions:
ecmaVersion: 2018
# Node.js 10+ almost supports features up to ES2018
# see https://node.green/#ES2018
rules:
no-console: off
import/no-extraneous-dependencies:
- error
- devDependencies:
- "*"
- .*
- test/**
prettier/prettier: error
overrides:
- files: "*.{js,cjs,mjs}"
extends:
- plugin:prettier/recommended
- files: "*.ts"
extends:
- plugin:@typescript-eslint/recommended-requiring-type-checking
- plugin:@typescript-eslint/strict
- plugin:import/typescript
- plugin:prettier/recommended
parser: "@typescript-eslint/parser"
parserOptions:
sourceType: module
project:
- ./tsconfig.json
- ./test/tsconfig.json
plugins:
- "@typescript-eslint"
- simple-import-sort
rules:
no-dupe-class-members: off
# The no-unused-expressions rule does not support optional chaining operator (`?.`)
no-unused-expressions: off
n/no-unsupported-features/es-syntax:
- error
- ignores:
- modules
"@typescript-eslint/array-type": warn
"@typescript-eslint/explicit-function-return-type":
- warn
- allowExpressions: true
"@typescript-eslint/no-inferrable-types": off
# Copy the no-unused-expressions rule's option contained in eslint-config-standard
# see: https://github.com/standard/eslint-config-standard/blob/v14.1.1/eslintrc.json#L157
"@typescript-eslint/no-unused-expressions":
- error
- allowShortCircuit: true
allowTernary: true
allowTaggedTemplates: true
simple-import-sort/imports: error
- files: "*.d.ts"
rules:
no-redeclare: off
no-useless-constructor: off
- files:
- test/*.ts
- test/!(helpers!(?))*{,/**}/*.ts
extends:
- plugin:vitest/all
rules:
vitest/no-hooks:
- warn
- allow:
- beforeAll
vitest/prefer-lowercase-title:
- warn
- allowedPrefixes: [CLI]