|
1 | 1 | module.exports = {
|
2 | 2 | root: true,
|
3 |
| - plugins: ['@typescript-eslint', 'react', 'react-native', 'jest', 'import'], |
| 3 | + plugins: ["@typescript-eslint", "react", "react-native", "jest", "import"], |
4 | 4 | extends: [
|
5 |
| - '@react-native', |
6 |
| - 'prettier', |
7 |
| - 'eslint:recommended', |
8 |
| - 'plugin:@typescript-eslint/recommended', |
9 |
| - 'plugin:jest/recommended', |
10 |
| - 'plugin:import/typescript', |
| 5 | + "@react-native", |
| 6 | + "prettier", |
| 7 | + "eslint:recommended", |
| 8 | + "plugin:@typescript-eslint/recommended", |
| 9 | + "plugin:jest/recommended", |
| 10 | + "plugin:import/typescript", |
11 | 11 | ],
|
12 | 12 | settings: {
|
13 |
| - 'import/parsers': { |
14 |
| - '@typescript-eslint/parser': ['.ts', '.tsx'], |
| 13 | + "import/parsers": { |
| 14 | + "@typescript-eslint/parser": [".ts", ".tsx"], |
15 | 15 | },
|
16 |
| - 'import/resolver': { |
| 16 | + "import/resolver": { |
17 | 17 | typescript: {
|
18 | 18 | alwaysTryTypes: true,
|
19 |
| - project: '<root>/tsconfig.json', |
| 19 | + project: "<root>/tsconfig.json", |
20 | 20 | },
|
21 | 21 | },
|
22 | 22 | },
|
23 | 23 | rules: {
|
24 |
| - 'prettier/prettier': [ |
25 |
| - 'error', |
| 24 | + "prettier/prettier": [ |
| 25 | + "error", |
26 | 26 | {
|
27 |
| - quoteProps: 'consistent', |
28 |
| - singleQuote: true, |
29 |
| - tabWidth: 2, |
30 |
| - trailingComma: 'es5', |
31 |
| - useTabs: false, |
| 27 | + quoteProps: "consistent", |
| 28 | + trailingComma: "all", |
32 | 29 | },
|
33 | 30 | ],
|
34 | 31 | // react
|
35 |
| - 'react-hooks/exhaustive-deps': 'warn', |
| 32 | + "react-hooks/exhaustive-deps": "warn", |
36 | 33 | // typescript
|
37 |
| - '@typescript-eslint/consistent-type-imports': [ |
38 |
| - 'error', |
39 |
| - { prefer: 'type-imports' }, |
| 34 | + "@typescript-eslint/consistent-type-imports": [ |
| 35 | + "error", |
| 36 | + { prefer: "type-imports" }, |
40 | 37 | ],
|
41 |
| - '@typescript-eslint/no-var-requires': 'warn', |
| 38 | + "@typescript-eslint/no-var-requires": "warn", |
42 | 39 | // import
|
43 |
| - 'sort-imports': [ |
44 |
| - 'error', |
| 40 | + "sort-imports": [ |
| 41 | + "error", |
45 | 42 | {
|
46 | 43 | // sort destructure imports
|
47 | 44 | ignoreCase: false,
|
48 | 45 | ignoreDeclarationSort: true,
|
49 | 46 | ignoreMemberSort: false,
|
50 |
| - memberSyntaxSortOrder: ['none', 'all', 'single', 'multiple'], |
| 47 | + memberSyntaxSortOrder: ["none", "all", "single", "multiple"], |
51 | 48 | allowSeparatedGroups: true,
|
52 | 49 | },
|
53 | 50 | ],
|
54 |
| - 'import/order': [ |
55 |
| - 'error', |
| 51 | + "import/order": [ |
| 52 | + "error", |
56 | 53 | {
|
57 |
| - 'groups': [ |
58 |
| - 'builtin', |
59 |
| - 'external', |
60 |
| - 'internal', |
61 |
| - 'parent', |
62 |
| - 'sibling', |
63 |
| - 'index', |
64 |
| - 'type', |
| 54 | + "groups": [ |
| 55 | + "builtin", |
| 56 | + "external", |
| 57 | + "internal", |
| 58 | + "parent", |
| 59 | + "sibling", |
| 60 | + "index", |
| 61 | + "type", |
65 | 62 | ],
|
66 |
| - 'alphabetize': { |
67 |
| - order: 'asc', |
| 63 | + "alphabetize": { |
| 64 | + order: "asc", |
68 | 65 | caseInsensitive: true,
|
69 | 66 | },
|
70 |
| - 'newlines-between': 'always', |
| 67 | + "newlines-between": "always", |
71 | 68 | },
|
72 | 69 | ],
|
73 | 70 | },
|
74 | 71 | overrides: [
|
75 | 72 | {
|
76 |
| - files: ['src/specs/**'], |
| 73 | + files: ["src/specs/**"], |
77 | 74 | rules: {
|
78 |
| - '@typescript-eslint/ban-types': [ |
79 |
| - 'error', |
| 75 | + "@typescript-eslint/ban-types": [ |
| 76 | + "error", |
80 | 77 | {
|
81 | 78 | extendDefaults: true,
|
82 | 79 | types: {
|
83 |
| - '{}': false, |
| 80 | + "{}": false, |
84 | 81 | },
|
85 | 82 | },
|
86 | 83 | ],
|
87 | 84 | },
|
88 | 85 | },
|
89 | 86 | ],
|
90 | 87 | env: {
|
91 |
| - 'react-native/react-native': true, |
92 |
| - 'jest/globals': true, |
| 88 | + "react-native/react-native": true, |
| 89 | + "jest/globals": true, |
93 | 90 | },
|
94 |
| - ignorePatterns: [ |
95 |
| - 'node_modules/**', |
96 |
| - 'lib/**', |
97 |
| - 'example/**', |
98 |
| - 'FabricExample/**', |
99 |
| - 'docs/**', |
100 |
| - 'scripts/**', |
101 |
| - ], |
| 91 | + ignorePatterns: ["node_modules/**", "lib/**", "scripts/**"], |
102 | 92 | };
|
0 commit comments