-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yml
136 lines (122 loc) · 3.32 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
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
env:
# Most of the code here will not be for the browser; use overrides to indicate
# browser code.
browser: false
node: true
extends:
- 'plugin:workspaces/recommended'
- 'plugin:@ianwremmel/ianwremmel/modern'
- 'plugin:@ianwremmel/ianwremmel/typescript'
- 'plugin:lodash/recommended'
- 'prettier'
ignorePatterns:
- dist
- '!.graphqlrc.js'
overrides:
- files:
- '**/*.mjs'
- '**/*.mts'
parserOptions:
sourceType: 'module'
- files:
- '**/*.mts'
parser: '@typescript-eslint/parser'
- files:
- '**/*.graphql'
- '**/*.graphqls'
extends: 'plugin:@graphql-eslint/schema-recommended'
rules:
# Since we're building a bunch of different schema, not all of the shared
# schema will be used in each combined schema ,so this rule can't be
# usefully enforced.
'@graphql-eslint/no-unreachable-types': off
'@graphql-eslint/no-typename-prefix': off
strict: off
- files:
- '**/*.mts'
- '**/*.ts'
- '**/*.tsx'
parserOptions:
sourceType: module
rules:
# These rules do the wrong thing when they encounter type imports
no-duplicate-imports: off
import/no-duplicates: error
- files:
- '**/*.spec.*'
- '**/*.test.*'
- 'test/jest/spec/**/*'
- '**/__mocks__/**/*'
env:
jest: true
- files:
- '**/__generated__/**'
- '**/*.generated.*'
rules:
'@typescript-eslint/no-explicit-any': off
'@typescript-eslint/no-unused-vars': off
complexity: off
eslint-comments/disable-enable-pair: off
eslint-comments/no-unlimited-disable: off
no-restricted-imports: off
prefer-destructuring: off
sort-keys: off
- files:
- '*.d.*'
- '*.d.json.*'
rules:
eslint-comments/disable-enable-pair: off
eslint-comments/no-unlimited-disable: off
parserOptions:
ecmaVersion: 2022
sourceType: 'script'
plugins:
- workspaces
settings:
import/internal-regex: '^@code-like-a-carpenter/'
lodash:
pragma: '_'
react:
version: 'detect'
rules:
'@typescript-eslint/consistent-type-imports': 'error'
'@typescript-eslint/no-explicit-any': 'warn'
'@typescript-eslint/no-unused-vars':
- 'error'
- args: 'after-used'
ignoreRestSiblings: true
import/extensions:
- error
- ignorePackages
import/no-extraneous-dependencies:
- error
- devDependencies:
- '!src/**/*'
- '!packages/**/*'
# This rule doesn't seem to be able to find packages whose entrypoint is an
# mjs file. tsc _should_ provide the same assurance.
import/no-unresolved: off
no-restricted-imports:
- error
- patterns:
# Avoid importing directly from files in packages and instead allow only
# importing from the main entry point.
- 'src'
workspaces/no-relative-imports: 'error'
require-jsdoc: off
'lodash/import-scope':
- error
- method-package
'lodash/prefer-constant': off
'lodash/prefer-get': off
'lodash/prefer-includes': off
'lodash/prefer-is-nil': off
'lodash/prefer-lodash-chain': off
'lodash/prefer-lodash-method': off
'lodash/prefer-lodash-typecheck': off
'lodash/prefer-matches': off
'lodash/prefer-noop': off
'lodash/prefer-over-quantifier': off
'lodash/prefer-some': off
'lodash/prefer-startswith': off
'lodash/prefer-times': off