forked from RetroAchievements/RAWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yaml
89 lines (72 loc) · 1.98 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
env:
browser: true
extends:
- eslint:recommended
- plugin:prettier/recommended
- plugin:@typescript-eslint/recommended
parser: "@typescript-eslint/parser"
plugins:
- "@typescript-eslint"
- simple-import-sort
- import
settings:
# allows for tsconfig path aliases
import/resolver:
typescript: {} # this loads tsconfig.json to eslint
globals:
Atomics: readonly
SharedArrayBuffer: readonly
# very basic javascript
parserOptions:
ecmaVersion: 6
sourceType: module
rules:
# some javascript functions are used within html attributes rendered within php
no-unused-vars: off
max-len: off
# eslint doesn't like itself
prefer-destructuring: off
# yeah, we're polluting the global namespace with jquery...
no-undef: off
# ouch. refactor affected code...
no-eval: off
# let's at least have console output. at least no alerts, right? right!?
no-console: off
# ++ in for loop
no-plusplus: off
# ecmaVersion 5...
comma-dangle: off
no-alert: off # still using confirm() dialog
no-restricted-globals: off # still using confirm() dialog
no-loop-func: off
no-shadow: off # typescript-eslint is not happy about injecting Alpine and/or utils into `window`
no-param-reassign: off
no-var: off
object-shorthand: off
prefer-arrow-callback: off
prefer-rest-params: off
prefer-template: off
func-names: off
no-useless-escape: off # not so sure about regex there it seems
no-use-before-define: off
vars-on-top: off
# sort and organize imports/exports
simple-import-sort/imports: error
simple-import-sort/exports: error
import/first: error
import/newline-after-import: error
import/no-duplicates: error
# tailwind.config.js
global-require: off
# set up prettier as an eslint plugin
prettier/prettier:
- error
- tabWidth: 2
printWidth: 100
singleQuote: true
# don't enforce explicit-any rule in test files
overrides:
- files:
- "*.test.ts"
rules:
"@typescript-eslint/no-explicit-any": "off"