-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.yaml
185 lines (171 loc) · 3.73 KB
/
.eslintrc.yaml
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
root: true
env:
es2017: true
node: true
browser: true
extends:
- eslint:recommended
- plugin:svelte/recommended
- plugin:@typescript-eslint/strict
# ╭─────
# │ NOTE:
# │ ➤ (👇) below :: does not work with svelte.
# ╰─────
# - plugin:import/errors
# - plugin:import/warnings
# - plugin:import/typescript
# ╭─────
# │ NOTE:
# │ ➤ (👇) :|: https://www.npmjs.com/package/eslint-config-google
# ╰─────
# - google
# - prettier
# ╭─────
# │ NOTE:
# │ ➤ (👇) already contained within ../strict.
# ╰─────
# - plugin:@typescript-eslint/recommended
# - plugin:@typescript-eslint/stylistic
parser:
"@typescript-eslint/parser"
parserOptions:
project:
- tsconfig.json
sourceType: module
ecmaVersion: 2020
extraFileExtensions:
- '.svelte'
- '.ts'
overrides:
- files:
- '*.svelte'
parser: 'svelte-eslint-parser'
parserOptions:
parser: '@typescript-eslint/parser'
globals:
# 🔗 read-more :|: https://github.com/Chatie/eslint-config/issues/45#issuecomment-885507652
"NodeJS": true
ignorePatterns:
- .DS_Store
- node_modules
- /build
- /.svelte-kit
- /package
- .env
- .env.*
- '!.env.example'
- pnpm-lock.yaml
- package-lock.json
- yarn.lock
# ╭─────
# │ NOTE: |:| gradual eslint introduction in project.
# ╰─────
# - src/lib/store
# - src/routes
- src/lib/geo-js
- src/lib/graphql
- src/lib/redis
# - src/lib/store
- src/routes/api
- src/lib/types
- src/params
- src/service-worker.ts
plugins:
- "@typescript-eslint"
- svelte
# ╭─────
# │ WARNING:
# │ ➤ (👇) all-below :: does not work with svelte.
# ╰─────
# - import
# ╭─────
# │ IMPORTANT
# │ ➤ Main 'defacto' configuration, do not remove and/or alter heavily.
# │ ➤ 🔗 read-more :|: https://eslint.org/docs/latest/rules/
# ╰─────
rules:
# ╭─────
# │ NOTE:
# │ ➤ (👇) for svelte/sveltekit project only!
# ╰─────
'svelte/valid-compile': 0
'svelte/no-at-html-tags': 0
# ╭─────
# │ NOTE:
# │ ➤ has been depreceted.
# ╰─────
# "valid-jsdoc": [..]
no-unexpected-multiline: 0
import/no-unresolved: 0
# ╭─────
# │ NOTE:
# │ ➤ Ideal, but doesn't work as expected :: [ "error", "always", { "allowNewlines": true } ]
# │ ➤ as it requires a space after function declaration, 'always'.
# ╰─────
func-call-spacing: 0
'@typescript-eslint/no-inferrable-types': 0
'@typescript-eslint/prefer-for-of': error
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': error
no-console:
- error
curly:
- error
- multi
- consistent
max-len:
- error
- code: 250
quotes:
- error
- single
object-curly-spacing:
- error
- always
brace-style:
- error
- allman
- allowSingleLine: true
indent:
- error
- 2
space-before-function-paren:
- error
- anonymous: always
named: always
asyncArrow: always
padded-blocks:
- error
- blocks: never
comma-dangle:
- error
- only-multiline
comma-style:
- error
- last
operator-linebreak:
- error
- before
new-cap:
- error
- capIsNewExceptionPattern: "^express\\.."
camelcase:
- error
- ignoreImports: true
ignoreDestructuring: true
properties: never
allow:
- "^if_M_"
- "^B_H_"
- "^icon_"
eol-last:
- error
- always
arrow-body-style:
- error
- always
one-var:
- error
- initialized: "consecutive"
no-extra-semi: 0
no-var:
- error