This repository has been archived by the owner on Jun 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.yml
109 lines (80 loc) · 2.71 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
109
root: true
plugins:
- prettier
extends:
- airbnb
- airbnb/hooks
- plugin:import/electron
- plugin:promise/recommended
- plugin:unicorn/recommended
- prettier
- prettier/react
env:
node: true
parserOptions:
ecmaVersion: 2020
ecmaFeatures:
jsx: true
settings:
import/resolver:
node:
moduleDirectory: [node_modules, app]
typescript:
alwaysTryTypes: true
webpack:
config: 'webpack.config.js'
rules:
# Disabled because some of the functions may need to return different types
consistent-return: 0
no-param-reassign: [error, { props: false }]
no-unused-vars: warn
import/extensions: [error, ignorePackages, { js: never, ts: never, jsx: never, tsx: never }]
# Disabled because dependencies used in production code are bundled
import/no-extraneous-dependencies: off
# Disabled because it's annoying
import/prefer-default-export: off
promise/avoid-new: error
# Disabled because it's unstable
unicorn/consistent-function-scoping: off
unicorn/filename-case: [error, { cases: { camelCase: true, pascalCase: true } }]
# Disabled because it's frequently used by react
unicorn/no-null: off
# Disabled because it's too annoying
unicorn/prevent-abbreviations: off
react/jsx-filename-extension: [error, extensions: [.jsx, .tsx]]
# Disabled because it's buggy (https://github.com/yannickcr/eslint-plugin-react/issues/1835)
react/jsx-one-expression-per-line: off
# Disabled because it's too annoying
react/jsx-props-no-spreading: off
prettier/prettier: warn
overrides:
- files: app/**/*
extends:
- plugin:import/typescript
- plugin:@typescript-eslint/recommended
- prettier/@typescript-eslint
env:
browser: true
parser: '@typescript-eslint/parser'
parserOptions:
project: 'app/tsconfig.json'
- files: scripts/**/*
extends:
- plugin:node/recommended
rules:
# Disabled because it's script code
no-console: 0
# Disabled because it's redundant with import/no-extraneous-dependencies
node/no-extraneous-import: off
node/no-extraneous-require: off
# Disabled because it's redundant with import/no-unresolved
node/no-missing-import: off
node/no-missing-require: off
# Disabled because it's too annoying
node/no-unpublished-import: off
node/no-unpublished-require: off
node/no-unsupported-features/es-builtins: [error, { version: '>=12.14.1' }]
node/no-unsupported-features/es-syntax: [error, { version: '>=12.14.1' }]
node/no-unsupported-features/node-builtins: [error, { version: '>=12.14.1' }]
# Disabled as the rule doesn't exclude scripts executed with `node` but not referenced in 'bin'
node/shebang: off