forked from Shopify/quilt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
72 lines (72 loc) · 2.25 KB
/
.eslintrc.js
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
module.exports = {
extends: [
'plugin:@shopify/typescript',
'plugin:@shopify/typescript-type-checking',
'plugin:@shopify/react',
'plugin:@shopify/jest',
'plugin:@shopify/prettier',
],
parserOptions: {
project: ['./tsconfig.eslint.json'],
},
rules: {
'jest/valid-expect-in-promise': 'off',
'import/extensions': 'off',
'jsx-a11y/control-has-associated-label': 'off',
'node/no-extraneous-require': 'off',
'import/no-cycle': 'off',
'jest/require-tothrow-message': 'off',
'callback-return': 'off',
'func-style': 'off',
'react/display-name': 'off',
'@shopify/restrict-full-import': ['error', 'lodash'],
'@shopify/jsx-no-hardcoded-content': 'off',
// reports false positives with React's useRef hook
'require-atomic-updates': 'off',
'@typescript-eslint/no-unnecessary-type-arguments': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/prefer-readonly': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/await-thenable': 'off',
'import/no-extraneous-dependencies': 'error',
},
overrides: [
{
files: [
'**/test/**/*.ts',
'**/test/**/*.tsx',
'**/tests/**/*.ts',
'**/tests/**/*.tsx',
'**/sewing-kit.config.ts',
],
rules: {
// We disable `import/no-extraneous-dependencies` for test files because it
// would force releases of `@shopify/react-testing` (and similar devDependencies)
// to cause unnecessary package bumps in every package that consumes them.
// Test files with extraneous dependencies won't cause runtime errors in production.
'import/no-extraneous-dependencies': 'off',
},
},
{
files: [
'**/test/fixtures/**/*.*',
],
rules: {
'@shopify/typescript/prefer-pascal-case-enums': 'off',
'babel/object-curly-spacing': 'off',
'prettier/prettier': 'off',
'import/newline-after-import': 'off',
},
},
{
files: [
'packages/sewing-kit-plugin-quilt/src/*.ts',
],
rules: {
'babel/no-unused-expressions': 'off',
},
},
],
};