|
1 | 1 | module.exports = {
|
2 |
| - extends: ['plugin:prettier/recommended'], |
3 |
| - plugins: ['@nativescript', 'prettier', '@typescript-eslint'], |
4 |
| - parser: '@typescript-eslint/parser', |
5 |
| - parserOptions: { |
6 |
| - ecmaVersion: 2018, |
7 |
| - sourceType: 'module', |
8 |
| - parser: '@typescript-eslint/parser', |
9 |
| - project: 'tsconfig.eslint.json', |
10 |
| - extraFileExtensions: ['.vue'], |
11 |
| - warnOnUnsupportedTypeScriptVersion: false, |
12 |
| - tsconfigRootDir: __dirname, |
13 |
| - createDefaultProgram: true |
14 |
| - }, |
15 |
| - rules: { |
16 |
| - 'prettier/prettier': 'warn', |
17 |
| - '@nativescript/no-nativescript-angular-imports': 'warn', |
18 |
| - '@nativescript/no-tns-core-modules-imports': 'warn', |
19 |
| - '@nativescript/no-duplicate-ns-imports': 'warn', |
20 |
| - '@typescript-eslint/adjacent-overload-signatures': 'error', |
21 |
| - '@typescript-eslint/array-type': 'error', |
22 |
| - '@typescript-eslint/await-thenable': 'error', |
23 |
| - '@typescript-eslint/ban-types': 'off', |
24 |
| - '@typescript-eslint/class-name-casing': 'off', |
25 |
| - '@typescript-eslint/consistent-type-assertions': 'error', |
26 |
| - '@typescript-eslint/consistent-type-definitions': 'error', |
27 |
| - '@typescript-eslint/explicit-member-accessibility': [ |
28 |
| - 'off', |
29 |
| - { |
30 |
| - accessibility: 'explicit', |
31 |
| - }, |
32 |
| - ], |
33 |
| - '@typescript-eslint/indent': [ |
34 |
| - 'error', |
35 |
| - 4, |
36 |
| - { |
37 |
| - FunctionDeclaration: { |
38 |
| - parameters: 'first', |
39 |
| - }, |
40 |
| - FunctionExpression: { |
41 |
| - parameters: 'first', |
42 |
| - }, |
43 |
| - SwitchCase: 1, |
44 |
| - }, |
45 |
| - ], |
46 |
| - '@typescript-eslint/interface-name-prefix': 'off', |
47 |
| - '@typescript-eslint/member-delimiter-style': 'error', |
48 |
| - '@typescript-eslint/member-ordering': 'off', |
49 |
| - '@typescript-eslint/no-empty-function': 'off', |
50 |
| - '@typescript-eslint/no-empty-interface': 'off', |
51 |
| - '@typescript-eslint/no-explicit-any': 'off', |
52 |
| - '@typescript-eslint/no-floating-promises': 'off', |
53 |
| - '@typescript-eslint/no-inferrable-types': 'off', |
54 |
| - '@typescript-eslint/no-misused-new': 'off', |
55 |
| - '@typescript-eslint/no-namespace': 'off', |
56 |
| - '@typescript-eslint/no-parameter-properties': 'off', |
57 |
| - '@typescript-eslint/no-require-imports': 'off', |
58 |
| - '@typescript-eslint/no-unnecessary-qualifier': 'error', |
59 |
| - '@typescript-eslint/no-unnecessary-type-assertion': 'error', |
60 |
| - '@typescript-eslint/no-use-before-declare': 'off', |
61 |
| - '@typescript-eslint/no-var-requires': 'off', |
62 |
| - '@typescript-eslint/prefer-for-of': 'off', |
63 |
| - '@typescript-eslint/prefer-function-type': 'error', |
64 |
| - '@typescript-eslint/prefer-namespace-keyword': 'error', |
65 |
| - '@typescript-eslint/quotes': [ |
66 |
| - 'error', |
67 |
| - 'single', |
68 |
| - { |
69 |
| - avoidEscape: true, |
70 |
| - }, |
71 |
| - ], |
72 |
| - '@typescript-eslint/semi': ['error'], |
73 |
| - '@typescript-eslint/space-within-parens': ['off', 'never'], |
74 |
| - '@typescript-eslint/triple-slash-reference': 'off', |
75 |
| - '@typescript-eslint/type-annotation-spacing': 'error', |
76 |
| - '@typescript-eslint/unified-signatures': 'error', |
77 |
| - 'arrow-body-style': 'error', |
78 |
| - 'arrow-parens': ['off', 'as-needed'], |
79 |
| - camelcase: 'off', |
80 |
| - 'capitalized-comments': 'off', |
81 |
| - complexity: 'off', |
82 |
| - 'constructor-super': 'error', |
83 |
| - curly: ['error', 'multi-line'], |
84 |
| - 'dot-notation': 'off', |
85 |
| - 'eol-last': 'error', |
86 |
| - eqeqeq: ['error', 'smart'], |
87 |
| - 'guard-for-in': 'off', |
88 |
| - 'id-blacklist': ['error', 'any', 'string', 'boolean', 'Undefined'], |
89 |
| - 'id-match': 'error', |
90 |
| - 'sort-imports': [ |
91 |
| - 'error', |
92 |
| - { |
93 |
| - ignoreCase: false, |
94 |
| - ignoreDeclarationSort: true, |
95 |
| - ignoreMemberSort: false, |
96 |
| - memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], |
97 |
| - }, |
98 |
| - ], |
99 |
| - 'linebreak-style': 'off', |
100 |
| - 'max-classes-per-file': 'off', |
101 |
| - 'max-len': [ |
102 |
| - 'off', |
103 |
| - { |
104 |
| - ignorePattern: '^import |^export {(.*?)}', |
105 |
| - code: 200, |
106 |
| - }, |
107 |
| - ], |
108 |
| - 'new-parens': 'off', |
109 |
| - 'newline-per-chained-call': 'off', |
110 |
| - 'no-bitwise': 'off', |
111 |
| - 'no-caller': 'error', |
112 |
| - 'no-cond-assign': 'off', |
113 |
| - 'no-console': [ |
114 |
| - 'off', |
115 |
| - { |
116 |
| - allow: [ |
117 |
| - 'log', |
118 |
| - 'warn', |
119 |
| - 'dir', |
120 |
| - 'timeLog', |
121 |
| - 'assert', |
122 |
| - 'clear', |
123 |
| - 'count', |
124 |
| - 'countReset', |
125 |
| - 'group', |
126 |
| - 'groupEnd', |
127 |
| - 'table', |
128 |
| - 'debug', |
129 |
| - 'dirxml', |
130 |
| - 'error', |
131 |
| - 'groupCollapsed', |
132 |
| - 'Console', |
133 |
| - 'profile', |
134 |
| - 'profileEnd', |
135 |
| - 'timeStamp', |
136 |
| - 'context', |
137 |
| - ], |
138 |
| - }, |
139 |
| - ], |
140 |
| - 'no-constant-condition': 'error', |
141 |
| - 'no-control-regex': 'off', |
142 |
| - 'no-debugger': 'error', |
143 |
| - 'no-duplicate-imports': 'error', |
144 |
| - 'no-empty': 'off', |
145 |
| - 'no-eval': 'off', |
146 |
| - 'no-extra-semi': 'off', |
147 |
| - 'no-fallthrough': 'error', |
148 |
| - 'no-invalid-regexp': 'error', |
149 |
| - 'no-invalid-this': 'off', |
150 |
| - 'no-irregular-whitespace': 'off', |
151 |
| - 'no-multiple-empty-lines': 'off', |
152 |
| - 'no-new-wrappers': 'error', |
153 |
| - 'no-redeclare': ['error', { builtinGlobals: false }], |
154 |
| - 'no-regex-spaces': 'error', |
155 |
| - 'no-return-await': 'error', |
156 |
| - 'no-shadow': [ |
157 |
| - 'off', |
158 |
| - { |
159 |
| - hoist: 'all', |
160 |
| - }, |
161 |
| - ], |
162 |
| - 'no-throw-literal': 'error', |
163 |
| - 'no-trailing-spaces': 'error', |
164 |
| - 'no-undef-init': 'error', |
165 |
| - 'no-underscore-dangle': 'off', |
166 |
| - 'no-unsafe-finally': 'error', |
167 |
| - 'no-unused-expressions': [ |
168 |
| - 'error', |
169 |
| - { |
170 |
| - allowTaggedTemplates: true, |
171 |
| - allowShortCircuit: true, |
172 |
| - }, |
173 |
| - ], |
174 |
| - 'no-unused-labels': 'error', |
175 |
| - 'no-var': 'error', |
176 |
| - 'object-shorthand': 'error', |
177 |
| - 'one-var': ['off', 'never'], |
178 |
| - 'prefer-arrow/prefer-arrow-functions': 'off', |
179 |
| - 'prefer-const': 'error', |
180 |
| - 'quote-props': 'off', |
181 |
| - radix: 'error', |
182 |
| - 'space-before-function-paren': 'off', |
183 |
| - 'use-isnan': 'error', |
184 |
| - 'valid-typeof': 'off', |
185 |
| - }, |
| 2 | + extends: './tools/.eslintrc.js' |
186 | 3 | };
|
0 commit comments