Skip to content

Commit d807398

Browse files
committed
feat: add more disabled lines
1 parent f5a5e38 commit d807398

File tree

2 files changed

+106
-107
lines changed

2 files changed

+106
-107
lines changed

Diff for: src/eslint.ts

+103-105
Original file line numberDiff line numberDiff line change
@@ -44,113 +44,11 @@ export const mergeResults = (
4444
export const overrideConfig: Linter.Config<Linter.RulesRecord>[] = [
4545
{
4646
rules: {
47-
// The following rules can be used in some cases. See the README for more
48-
// information. These are marked with `0` instead of `"off"` so that a
49-
// script can distinguish them. Note that there are a few more of these
50-
// in the deprecated section below.
47+
"arrow-body-style": "off",
48+
"prefer-arrow-callback": "off",
5149
curly: "off",
5250
"no-unexpected-multiline": "off",
53-
"@typescript-eslint/lines-around-comment": "off",
54-
"@typescript-eslint/quotes": "off",
55-
"babel/quotes": "off",
56-
"unicorn/template-indent": "off",
57-
"vue/html-self-closing": "off",
58-
"vue/max-len": "off",
59-
60-
// The rest are rules that you never need to enable when using Prettier.
61-
"@babel/object-curly-spacing": "off",
62-
"@babel/semi": "off",
63-
"@typescript-eslint/block-spacing": "off",
64-
"@typescript-eslint/brace-style": "off",
65-
"@typescript-eslint/comma-dangle": "off",
66-
"@typescript-eslint/comma-spacing": "off",
67-
"@typescript-eslint/func-call-spacing": "off",
68-
"@typescript-eslint/indent": "off",
69-
"@typescript-eslint/key-spacing": "off",
70-
"@typescript-eslint/keyword-spacing": "off",
71-
"@typescript-eslint/member-delimiter-style": "off",
72-
"@typescript-eslint/no-extra-parens": "off",
73-
"@typescript-eslint/no-extra-semi": "off",
74-
"@typescript-eslint/object-curly-spacing": "off",
75-
"@typescript-eslint/semi": "off",
76-
"@typescript-eslint/space-before-blocks": "off",
77-
"@typescript-eslint/space-before-function-paren": "off",
78-
"@typescript-eslint/space-infix-ops": "off",
79-
"@typescript-eslint/type-annotation-spacing": "off",
80-
"babel/object-curly-spacing": "off",
81-
"babel/semi": "off",
82-
"flowtype/boolean-style": "off",
83-
"flowtype/delimiter-dangle": "off",
84-
"flowtype/generic-spacing": "off",
85-
"flowtype/object-type-curly-spacing": "off",
86-
"flowtype/object-type-delimiter": "off",
87-
"flowtype/quotes": "off",
88-
"flowtype/semi": "off",
89-
"flowtype/space-after-type-colon": "off",
90-
"flowtype/space-before-generic-bracket": "off",
91-
"flowtype/space-before-type-colon": "off",
92-
"flowtype/union-intersection-spacing": "off",
93-
"react/jsx-child-element-spacing": "off",
94-
"react/jsx-closing-bracket-location": "off",
95-
"react/jsx-closing-tag-location": "off",
96-
"react/jsx-curly-newline": "off",
97-
"react/jsx-curly-spacing": "off",
98-
"react/jsx-equals-spacing": "off",
99-
"react/jsx-first-prop-new-line": "off",
100-
"react/jsx-indent": "off",
101-
"react/jsx-indent-props": "off",
102-
"react/jsx-max-props-per-line": "off",
103-
"react/jsx-newline": "off",
104-
"react/jsx-one-expression-per-line": "off",
105-
"react/jsx-props-no-multi-spaces": "off",
106-
"react/jsx-tag-spacing": "off",
107-
"react/jsx-wrap-multilines": "off",
108-
"standard/array-bracket-even-spacing": "off",
109-
"standard/computed-property-even-spacing": "off",
110-
"standard/object-curly-even-spacing": "off",
111-
"unicorn/empty-brace-spaces": "off",
112-
"unicorn/no-nested-ternary": "off",
113-
"unicorn/number-literal-case": "off",
114-
"vue/array-bracket-newline": "off",
115-
"vue/array-bracket-spacing": "off",
116-
"vue/array-element-newline": "off",
117-
"vue/arrow-spacing": "off",
118-
"vue/block-spacing": "off",
119-
"vue/block-tag-newline": "off",
120-
"vue/brace-style": "off",
121-
"vue/comma-dangle": "off",
122-
"vue/comma-spacing": "off",
123-
"vue/comma-style": "off",
124-
"vue/dot-location": "off",
125-
"vue/func-call-spacing": "off",
126-
"vue/html-closing-bracket-newline": "off",
127-
"vue/html-closing-bracket-spacing": "off",
128-
"vue/html-end-tags": "off",
129-
"vue/html-indent": "off",
130-
"vue/html-quotes": "off",
131-
"vue/key-spacing": "off",
132-
"vue/keyword-spacing": "off",
133-
"vue/max-attributes-per-line": "off",
134-
"vue/multiline-html-element-content-newline": "off",
135-
"vue/multiline-ternary": "off",
136-
"vue/mustache-interpolation-spacing": "off",
137-
"vue/no-extra-parens": "off",
138-
"vue/no-multi-spaces": "off",
139-
"vue/no-spaces-around-equal-signs-in-attribute": "off",
140-
"vue/object-curly-newline": "off",
141-
"vue/object-curly-spacing": "off",
142-
"vue/object-property-newline": "off",
143-
"vue/operator-linebreak": "off",
144-
"vue/quote-props": "off",
145-
"vue/script-indent": "off",
146-
"vue/singleline-html-element-content-newline": "off",
147-
"vue/space-in-parens": "off",
148-
"vue/space-infix-ops": "off",
149-
"vue/space-unary-ops": "off",
150-
"vue/template-curly-spacing": "off",
15151

152-
// Removed in version 0.10.0.
153-
// https://eslint.org/docs/latest/rules/space-unary-word-ops
15452
"space-unary-word-ops": "off",
15553

15654
// Removed in version 1.0.0.
@@ -250,6 +148,104 @@ export const overrideConfig: Linter.Config<Linter.RulesRecord>[] = [
250148
// https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md#700---2017-05-06
251149
"react/jsx-space-before-closing": "off",
252150

151+
"@typescript-eslint/lines-around-comment": "off",
152+
"@typescript-eslint/quotes": "off",
153+
"@typescript-eslint/block-spacing": "off",
154+
"@typescript-eslint/brace-style": "off",
155+
"@typescript-eslint/comma-dangle": "off",
156+
"@typescript-eslint/comma-spacing": "off",
157+
"@typescript-eslint/func-call-spacing": "off",
158+
"@typescript-eslint/indent": "off",
159+
"@typescript-eslint/key-spacing": "off",
160+
"@typescript-eslint/keyword-spacing": "off",
161+
"@typescript-eslint/member-delimiter-style": "off",
162+
"@typescript-eslint/no-extra-parens": "off",
163+
"@typescript-eslint/no-extra-semi": "off",
164+
"@typescript-eslint/object-curly-spacing": "off",
165+
"@typescript-eslint/semi": "off",
166+
"@typescript-eslint/space-before-blocks": "off",
167+
"@typescript-eslint/space-before-function-paren": "off",
168+
"@typescript-eslint/space-infix-ops": "off",
169+
"@typescript-eslint/type-annotation-spacing": "off",
170+
171+
"unicorn/template-indent": "off",
172+
"unicorn/empty-brace-spaces": "off",
173+
"unicorn/no-nested-ternary": "off",
174+
"unicorn/number-literal-case": "off",
175+
176+
"react/jsx-child-element-spacing": "off",
177+
"react/jsx-closing-bracket-location": "off",
178+
"react/jsx-closing-tag-location": "off",
179+
"react/jsx-curly-newline": "off",
180+
"react/jsx-curly-spacing": "off",
181+
"react/jsx-equals-spacing": "off",
182+
"react/jsx-first-prop-new-line": "off",
183+
"react/jsx-indent": "off",
184+
"react/jsx-indent-props": "off",
185+
"react/jsx-max-props-per-line": "off",
186+
"react/jsx-newline": "off",
187+
"react/jsx-one-expression-per-line": "off",
188+
"react/jsx-props-no-multi-spaces": "off",
189+
"react/jsx-tag-spacing": "off",
190+
"react/jsx-wrap-multilines": "off",
191+
192+
// The rest are rules that you never need to enable when using Prettier.
193+
"@babel/object-curly-spacing": "off",
194+
"@babel/semi": "off",
195+
"babel/object-curly-spacing": "off",
196+
"babel/semi": "off",
197+
"flowtype/boolean-style": "off",
198+
"flowtype/delimiter-dangle": "off",
199+
"flowtype/generic-spacing": "off",
200+
"flowtype/object-type-curly-spacing": "off",
201+
"flowtype/object-type-delimiter": "off",
202+
"flowtype/quotes": "off",
203+
"flowtype/semi": "off",
204+
"flowtype/space-after-type-colon": "off",
205+
"flowtype/space-before-generic-bracket": "off",
206+
"flowtype/space-before-type-colon": "off",
207+
"flowtype/union-intersection-spacing": "off",
208+
"standard/array-bracket-even-spacing": "off",
209+
"standard/computed-property-even-spacing": "off",
210+
"standard/object-curly-even-spacing": "off",
211+
"vue/array-bracket-newline": "off",
212+
"vue/array-bracket-spacing": "off",
213+
"vue/array-element-newline": "off",
214+
"vue/arrow-spacing": "off",
215+
"vue/block-spacing": "off",
216+
"vue/block-tag-newline": "off",
217+
"vue/brace-style": "off",
218+
"vue/comma-dangle": "off",
219+
"vue/comma-spacing": "off",
220+
"vue/comma-style": "off",
221+
"vue/dot-location": "off",
222+
"vue/func-call-spacing": "off",
223+
"vue/html-closing-bracket-newline": "off",
224+
"vue/html-closing-bracket-spacing": "off",
225+
"vue/html-end-tags": "off",
226+
"vue/html-indent": "off",
227+
"vue/html-quotes": "off",
228+
"vue/key-spacing": "off",
229+
"vue/keyword-spacing": "off",
230+
"vue/max-attributes-per-line": "off",
231+
"vue/multiline-html-element-content-newline": "off",
232+
"vue/multiline-ternary": "off",
233+
"vue/mustache-interpolation-spacing": "off",
234+
"vue/no-extra-parens": "off",
235+
"vue/no-multi-spaces": "off",
236+
"vue/no-spaces-around-equal-signs-in-attribute": "off",
237+
"vue/object-curly-newline": "off",
238+
"vue/object-curly-spacing": "off",
239+
"vue/object-property-newline": "off",
240+
"vue/operator-linebreak": "off",
241+
"vue/quote-props": "off",
242+
"vue/script-indent": "off",
243+
"vue/singleline-html-element-content-newline": "off",
244+
"vue/space-in-parens": "off",
245+
"vue/space-infix-ops": "off",
246+
"vue/space-unary-ops": "off",
247+
"vue/template-curly-spacing": "off",
248+
253249
"constructor-super": "off",
254250
"default-case-last": "off",
255251
"default-param-last": "off",
@@ -320,7 +316,6 @@ export const overrideConfig: Linter.Config<Linter.RulesRecord>[] = [
320316
"no-var": "off",
321317
"no-with": "off",
322318
"one-var": "off",
323-
"prefer-arrow-callback": "off",
324319
"prefer-const": "off",
325320
"prefer-exponentiation-operator": "off",
326321
"prefer-numeric-literals": "off",
@@ -379,6 +374,8 @@ export const overrideConfig: Linter.Config<Linter.RulesRecord>[] = [
379374
"jsx-a11y/html-has-lang": "off",
380375
"jsx-a11y/iframe-has-title": "off",
381376
"jsx-a11y/img-redundant-alt": "off",
377+
"jsx-a11y/interactive-supports-focus": "off",
378+
"jsx-a11y/label-has-associated-control": "off",
382379
"jsx-a11y/lang": "off",
383380
"jsx-a11y/media-has-caption": "off",
384381
"jsx-a11y/mouse-events-have-key-events": "off",
@@ -407,6 +404,7 @@ export const overrideConfig: Linter.Config<Linter.RulesRecord>[] = [
407404
"react-hooks/exhaustive-deps": "off",
408405
"simple-import-sort/imports": "off",
409406
"stylistic/jsx-self-closing-comp": "off",
407+
"unicorn/new-for-builtins": "off",
410408
"unicorn/no-array-for-each": "off",
411409
"unicorn/no-instanceof-array": "off",
412410
"unicorn/no-static-only-class": "off",

Diff for: src/index.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const instance = yargs(hideBin(process.argv))
4444
try {
4545
const { files: files_, fix, only, debug } = args;
4646
const files = [files_];
47+
const eslintOnly = only === "eslint";
4748

4849
if (files.length === 0) {
4950
throw new Error("No files provided");
@@ -53,7 +54,7 @@ const instance = yargs(hideBin(process.argv))
5354
fix,
5455
stats: debug,
5556
cache: true,
56-
overrideConfig,
57+
overrideConfig: eslintOnly ? [] : overrideConfig,
5758
});
5859

5960
const eslintResults = await eslint.lintFiles(files);
@@ -64,7 +65,7 @@ const instance = yargs(hideBin(process.argv))
6465

6566
const formatter = await eslint.loadFormatter("stylish");
6667

67-
if (only === "eslint") {
68+
if (eslintOnly) {
6869
console.warn("Running only ESLint");
6970
const resultText = await formatter.format(eslintResults);
7071

0 commit comments

Comments
 (0)