-
Notifications
You must be signed in to change notification settings - Fork 7
/
.eslintrc.yaml
67 lines (67 loc) · 1.93 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
---
extends:
- plugin:zillow/recommended
- plugin:zillow/jest
- plugin:import/typescript
- plugin:node/recommended
env:
browser: false
node: true
plugins:
- node
rules:
# prettier handles max-len fine
max-len: 'off'
no-restricted-syntax:
- error
- ForInStatement
# allows ForOfStatement
- LabeledStatement
- WithStatement
padding-line-between-statements:
- error
# blank line before return statements
- { blankLine: 'always', prev: '*', next: 'return' }
# blank line after const/let statement(s)
- { blankLine: 'always', prev: ['const', 'let'], next: '*' }
- { blankLine: 'any', prev: ['const', 'let'], next: ['const', 'let'] }
# blank line before and after multi-line block-like statements
- { blankLine: 'always', prev: '*', next: 'multiline-block-like' }
- { blankLine: 'always', prev: 'multiline-block-like', next: '*' }
prefer-object-spread: 'off'
strict: 'off'
# extend missing eslint-plugin-zillow patterns
zillow/import/no-extraneous-dependencies:
- error
- devDependencies: ['**/test/**']
root: true
settings:
# effectively extending import/typescript config
'import/extensions': ['.ts', '.d.ts', '.js', '.json']
'import/parsers':
'@typescript-eslint/parser': ['.ts', '.d.ts']
'import/resolver':
node:
extensions: ['.ts', '.d.ts', '.js', '.json']
'eslint-import-resolver-typescript': true
# avoid eslint-plugin-node tripping over TS
node:
tryExtensions: ['.ts', '.js']
overrides:
- files: '**/test/**'
env:
jest: true
- files: '*.ts'
parser: '@typescript-eslint/parser'
plugins:
- '@typescript-eslint'
extends:
- 'plugin:@typescript-eslint/recommended'
rules:
node/no-unsupported-features/es-syntax:
- error
- ignores:
- modules
# typescript completely bamboozles these rules
zillow/import/newline-after-import: 'off'
zillow/import/first: 'off'