This repository has been archived by the owner on Jun 13, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.yml
108 lines (100 loc) · 2.78 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
root: true
env:
node: true
reportUnusedDisableDirectives: true
parser: "@typescript-eslint/parser"
parserOptions:
project:
- "./tsconfig.json"
plugins:
- "@typescript-eslint"
- comment-length
- deprecation
- eslint-comments
- import
- prettier
- promise
- simple-import-sort
- sonarjs
- unicorn
extends:
- eslint:recommended
- plugin:@typescript-eslint/recommended
- plugin:@typescript-eslint/recommended-requiring-type-checking
- plugin:comment-length/recommended
- plugin:eslint-comments/recommended
- plugin:import/recommended
- plugin:import/typescript
- plugin:sonarjs/recommended
- plugin:unicorn/recommended
- prettier
rules:
"@typescript-eslint/consistent-type-exports": error
"@typescript-eslint/consistent-type-imports": error
"@typescript-eslint/naming-convention":
- error
- selector: [class, interface, typeAlias, typeParameter]
format: [PascalCase]
- selector: default
format: [camelCase]
leadingUnderscore: allow
"@typescript-eslint/no-explicit-any": error
"@typescript-eslint/no-inferrable-types": "off"
"@typescript-eslint/no-non-null-assertion": "off"
"@typescript-eslint/no-unused-vars": "off"
"@typescript-eslint/require-await": "off"
comment-length/limit-multi-line-comments: error
comment-length/limit-single-line-comments: error
deprecation/deprecation: error
import/first: error
import/no-default-export: error
import/no-duplicates: error
import/no-named-as-default-member: error
import/no-named-as-default: error
no-console: error
promise/prefer-await-to-callbacks: error
promise/prefer-await-to-then: error
simple-import-sort/exports: error
simple-import-sort/imports:
- error
- groups:
- ["\\u0000$"] # Types
- ["^\\u0000"] # Side-effects
- ["^@?\\w"] # Packages
- ["^"] # All other packages
- ["^\\."] # Relative imports
spaced-comment:
- error
- always
- block:
balanced: true
unicorn/filename-case:
- error
- case: kebabCase
# This is already covered by @typescript-eslint/no-this-alias.
unicorn/no-this-assignment: "off"
# The node: protocol is only supported in node 16+, and snoots currently
# supports node 14+. Once node 14 support has been dropped this rule should be
# re-enabled.
unicorn/prefer-node-protocol: "off"
unicorn/prevent-abbreviations:
- error
- replacements:
desc:
description: true
sr:
subreddit: true
unicorn/switch-case-braces: [error, avoid]
overrides:
- files: ["**/__tests__/**/*.ts"]
plugins:
- jest
extends:
- plugin:jest/recommended
rules:
jest/expect-expect:
- "error"
- assertFunctionNames:
- expect
- n.done
sonarjs/no-duplicate-string: off