@vinicunca/eslint-config 2.0.3 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +173 -181
- package/dist/index.d.cts +48 -47
- package/dist/index.d.ts +48 -47
- package/dist/index.js +206 -215
- package/package.json +10 -9
package/dist/index.d.cts
CHANGED
|
@@ -15,20 +15,21 @@ export { eslintPluginJsonc as pluginJsonc };
|
|
|
15
15
|
export { default as pluginMarkdown } from 'eslint-plugin-markdown';
|
|
16
16
|
export { default as pluginNode } from 'eslint-plugin-n';
|
|
17
17
|
export { default as pluginNoOnlyTests } from 'eslint-plugin-no-only-tests';
|
|
18
|
-
export { default as
|
|
19
|
-
export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports';
|
|
18
|
+
export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
|
|
20
19
|
export { default as pluginReact } from 'eslint-plugin-react';
|
|
21
20
|
export { default as pluginReactHooks } from 'eslint-plugin-react-hooks';
|
|
21
|
+
export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
|
|
22
|
+
export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports';
|
|
23
|
+
export { default as pluginVitest } from 'eslint-plugin-vitest';
|
|
22
24
|
export { default as pluginVue } from 'eslint-plugin-vue';
|
|
23
25
|
import * as eslintPluginYml from 'eslint-plugin-yml';
|
|
24
26
|
export { eslintPluginYml as pluginYaml };
|
|
25
|
-
export { default as pluginVitest } from 'eslint-plugin-vitest';
|
|
26
27
|
export { default as parserJsonc } from 'jsonc-eslint-parser';
|
|
27
28
|
export { default as parserVue } from 'vue-eslint-parser';
|
|
28
29
|
export { default as parserYaml } from 'yaml-eslint-parser';
|
|
29
30
|
|
|
30
31
|
type MergedRules = MergeIntersection<EslintRules & Unprefix<ReactRules, 'react/'> & Unprefix<TypeScriptRules, '@typescript-eslint/'>>;
|
|
31
|
-
type StylisticRules = Pick<MergedRules, 'array-bracket-newline' | 'array-bracket-spacing' | 'array-element-newline' | 'arrow-spacing' | 'block-spacing' | 'brace-style' | 'comma-dangle' | 'comma-spacing' | 'comma-style' | 'computed-property-spacing' | 'dot-location' | 'eol-last' | 'func-call-spacing' | 'function-call-argument-newline' | 'function-paren-newline' | 'generator-star-spacing' | 'implicit-arrow-linebreak' | 'indent' | '
|
|
32
|
+
type StylisticRules = Pick<MergedRules, 'array-bracket-newline' | 'array-bracket-spacing' | 'array-element-newline' | 'arrow-spacing' | 'block-spacing' | 'block-spacing' | 'brace-style' | 'brace-style' | 'comma-dangle' | 'comma-dangle' | 'comma-spacing' | 'comma-spacing' | 'comma-style' | 'computed-property-spacing' | 'dot-location' | 'eol-last' | 'func-call-spacing' | 'func-call-spacing' | 'function-call-argument-newline' | 'function-paren-newline' | 'generator-star-spacing' | 'implicit-arrow-linebreak' | 'indent' | 'indent' | 'jsx-child-element-spacing' | 'jsx-closing-bracket-location' | 'jsx-closing-tag-location' | 'jsx-curly-brace-presence' | 'jsx-curly-newline' | 'jsx-curly-spacing' | 'jsx-equals-spacing' | 'jsx-first-prop-new-line' | 'jsx-indent' | 'jsx-indent-props' | 'jsx-max-props-per-line' | 'jsx-newline' | 'jsx-one-expression-per-line' | 'jsx-props-no-multi-spaces' | 'jsx-quotes' | 'jsx-sort-props' | 'jsx-space-before-closing' | 'jsx-tag-spacing' | 'jsx-wrap-multilines' | 'key-spacing' | 'key-spacing' | 'keyword-spacing' | 'keyword-spacing' | 'linebreak-style' | 'lines-around-comment' | 'lines-around-comment' | 'lines-around-directive' | 'lines-between-class-members' | 'lines-between-class-members' | 'max-len' | 'max-statements-per-line' | 'member-delimiter-style' | 'multiline-ternary' | 'new-parens' | 'newline-after-var' | 'newline-before-return' | 'newline-per-chained-call' | 'no-confusing-arrow' | 'no-extra-parens' | 'no-extra-semi' | 'no-floating-decimal' | 'no-mixed-operators' | 'no-mixed-spaces-and-tabs' | 'no-multi-spaces' | 'no-multiple-empty-lines' | 'no-spaced-func' | 'no-tabs' | 'no-trailing-spaces' | 'no-whitespace-before-property' | 'nonblock-statement-body-position' | 'object-curly-newline' | 'object-curly-spacing' | 'object-curly-spacing' | 'object-property-newline' | 'one-var-declaration-per-line' | 'operator-linebreak' | 'padded-blocks' | 'padding-line-between-statements' | 'padding-line-between-statements' | 'quote-props' | 'quotes' | 'quotes' | 'rest-spread-spacing' | 'semi' | 'semi' | 'semi-spacing' | 'semi-style' | 'space-before-blocks' | 'space-before-blocks' | 'space-before-function-paren' | 'space-before-function-paren' | 'space-in-parens' | 'space-infix-ops' | 'space-infix-ops' | 'space-unary-ops' | 'spaced-comment' | 'switch-colon-spacing' | 'template-curly-spacing' | 'template-tag-spacing' | 'type-annotation-spacing' | 'wrap-iife' | 'wrap-regex' | 'yield-star-spacing'>;
|
|
32
33
|
|
|
33
34
|
type Rules = MergeIntersection<RenamePrefix<TypeScriptRules, '@typescript-eslint/', 'ts/'> & RenamePrefix<VitestRules, 'vitest/', 'test/'> & RenamePrefix<YmlRules, 'yml/', 'yaml/'> & RenamePrefix<NRules, 'n/', 'node/'> & Prefix<StylisticRules, 'style/'> & Prefix<Rules$1, 'vinicunca/'> & ImportRules & EslintRules & JsoncRules & VueRules & UnicornRules & EslintCommentsRules & {
|
|
34
35
|
'test/no-only-tests': RuleConfig<[]>;
|
|
@@ -51,15 +52,16 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
51
52
|
*/
|
|
52
53
|
ignores?: OptionsIgnores;
|
|
53
54
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
|
|
55
|
+
* Control to disable some rules in editors.
|
|
56
|
+
* @default auto-detect based on the process.env
|
|
57
|
+
*/
|
|
58
|
+
isInEditor?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Enable JSONC support.
|
|
57
61
|
*
|
|
58
|
-
* @default
|
|
62
|
+
* @default true
|
|
59
63
|
*/
|
|
60
|
-
|
|
61
|
-
enabled?: boolean;
|
|
62
|
-
};
|
|
64
|
+
jsonc?: boolean;
|
|
63
65
|
/**
|
|
64
66
|
* Enable JSX related rules.
|
|
65
67
|
*
|
|
@@ -69,66 +71,65 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
69
71
|
*/
|
|
70
72
|
jsx?: boolean;
|
|
71
73
|
/**
|
|
72
|
-
* Enable
|
|
74
|
+
* Enable Markdown support.
|
|
73
75
|
*
|
|
74
76
|
* @default true
|
|
75
77
|
*/
|
|
76
|
-
|
|
78
|
+
markdown?: boolean;
|
|
77
79
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
* @default auto-detect based on the dependencies
|
|
80
|
+
* Provide overrides for rules for each integration.
|
|
81
81
|
*/
|
|
82
|
-
|
|
82
|
+
overrides?: {
|
|
83
|
+
javascript?: ConfigItem['rules'];
|
|
84
|
+
jsonc?: ConfigItem['rules'];
|
|
85
|
+
markdown?: ConfigItem['rules'];
|
|
86
|
+
react?: ConfigItem['rules'];
|
|
87
|
+
test?: ConfigItem['rules'];
|
|
88
|
+
typescript?: ConfigItem['rules'];
|
|
89
|
+
vue?: ConfigItem['rules'];
|
|
90
|
+
yaml?: ConfigItem['rules'];
|
|
91
|
+
};
|
|
83
92
|
/**
|
|
84
|
-
* Enable
|
|
93
|
+
* Enable react support.
|
|
94
|
+
* In This plugin, react is not supported as a first class citizen. 😎
|
|
85
95
|
*
|
|
86
|
-
* @default
|
|
96
|
+
* @default false
|
|
87
97
|
*/
|
|
88
|
-
|
|
98
|
+
react?: boolean;
|
|
89
99
|
/**
|
|
90
|
-
* Enable
|
|
100
|
+
* Enable stylistic rules.
|
|
91
101
|
*
|
|
92
102
|
* @default true
|
|
93
103
|
*/
|
|
94
|
-
|
|
104
|
+
stylistic?: boolean;
|
|
95
105
|
/**
|
|
96
|
-
* Enable
|
|
106
|
+
* Enable test support.
|
|
97
107
|
*
|
|
98
108
|
* @default true
|
|
99
109
|
*/
|
|
100
|
-
|
|
110
|
+
test?: boolean;
|
|
101
111
|
/**
|
|
102
|
-
* Enable
|
|
112
|
+
* Enable TypeScript support.
|
|
103
113
|
*
|
|
104
|
-
*
|
|
105
|
-
*/
|
|
106
|
-
stylistic?: boolean;
|
|
107
|
-
/**
|
|
108
|
-
* Enable react support.
|
|
109
|
-
* In This plugin, react is not supported as a first class citizen. 😎
|
|
114
|
+
* Passing an object to enable TypeScript Language Server support.
|
|
110
115
|
*
|
|
111
|
-
* @default
|
|
116
|
+
* @default auto-detect based on the dependencies
|
|
112
117
|
*/
|
|
113
|
-
|
|
118
|
+
typescript?: OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions & {
|
|
119
|
+
enabled?: boolean;
|
|
120
|
+
};
|
|
114
121
|
/**
|
|
115
|
-
*
|
|
116
|
-
*
|
|
122
|
+
* Enable Vue support.
|
|
123
|
+
*
|
|
124
|
+
* @default auto-detect based on the dependencies
|
|
117
125
|
*/
|
|
118
|
-
|
|
126
|
+
vue?: boolean;
|
|
119
127
|
/**
|
|
120
|
-
*
|
|
128
|
+
* Enable YAML support.
|
|
129
|
+
*
|
|
130
|
+
* @default true
|
|
121
131
|
*/
|
|
122
|
-
|
|
123
|
-
javascript?: ConfigItem['rules'];
|
|
124
|
-
typescript?: ConfigItem['rules'];
|
|
125
|
-
test?: ConfigItem['rules'];
|
|
126
|
-
vue?: ConfigItem['rules'];
|
|
127
|
-
jsonc?: ConfigItem['rules'];
|
|
128
|
-
markdown?: ConfigItem['rules'];
|
|
129
|
-
yaml?: ConfigItem['rules'];
|
|
130
|
-
react?: ConfigItem['rules'];
|
|
131
|
-
};
|
|
132
|
+
yaml?: boolean;
|
|
132
133
|
}
|
|
133
134
|
interface OptionsOverrides {
|
|
134
135
|
overrides?: ConfigItem['rules'];
|
package/dist/index.d.ts
CHANGED
|
@@ -15,20 +15,21 @@ export { eslintPluginJsonc as pluginJsonc };
|
|
|
15
15
|
export { default as pluginMarkdown } from 'eslint-plugin-markdown';
|
|
16
16
|
export { default as pluginNode } from 'eslint-plugin-n';
|
|
17
17
|
export { default as pluginNoOnlyTests } from 'eslint-plugin-no-only-tests';
|
|
18
|
-
export { default as
|
|
19
|
-
export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports';
|
|
18
|
+
export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
|
|
20
19
|
export { default as pluginReact } from 'eslint-plugin-react';
|
|
21
20
|
export { default as pluginReactHooks } from 'eslint-plugin-react-hooks';
|
|
21
|
+
export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
|
|
22
|
+
export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports';
|
|
23
|
+
export { default as pluginVitest } from 'eslint-plugin-vitest';
|
|
22
24
|
export { default as pluginVue } from 'eslint-plugin-vue';
|
|
23
25
|
import * as eslintPluginYml from 'eslint-plugin-yml';
|
|
24
26
|
export { eslintPluginYml as pluginYaml };
|
|
25
|
-
export { default as pluginVitest } from 'eslint-plugin-vitest';
|
|
26
27
|
export { default as parserJsonc } from 'jsonc-eslint-parser';
|
|
27
28
|
export { default as parserVue } from 'vue-eslint-parser';
|
|
28
29
|
export { default as parserYaml } from 'yaml-eslint-parser';
|
|
29
30
|
|
|
30
31
|
type MergedRules = MergeIntersection<EslintRules & Unprefix<ReactRules, 'react/'> & Unprefix<TypeScriptRules, '@typescript-eslint/'>>;
|
|
31
|
-
type StylisticRules = Pick<MergedRules, 'array-bracket-newline' | 'array-bracket-spacing' | 'array-element-newline' | 'arrow-spacing' | 'block-spacing' | 'brace-style' | 'comma-dangle' | 'comma-spacing' | 'comma-style' | 'computed-property-spacing' | 'dot-location' | 'eol-last' | 'func-call-spacing' | 'function-call-argument-newline' | 'function-paren-newline' | 'generator-star-spacing' | 'implicit-arrow-linebreak' | 'indent' | '
|
|
32
|
+
type StylisticRules = Pick<MergedRules, 'array-bracket-newline' | 'array-bracket-spacing' | 'array-element-newline' | 'arrow-spacing' | 'block-spacing' | 'block-spacing' | 'brace-style' | 'brace-style' | 'comma-dangle' | 'comma-dangle' | 'comma-spacing' | 'comma-spacing' | 'comma-style' | 'computed-property-spacing' | 'dot-location' | 'eol-last' | 'func-call-spacing' | 'func-call-spacing' | 'function-call-argument-newline' | 'function-paren-newline' | 'generator-star-spacing' | 'implicit-arrow-linebreak' | 'indent' | 'indent' | 'jsx-child-element-spacing' | 'jsx-closing-bracket-location' | 'jsx-closing-tag-location' | 'jsx-curly-brace-presence' | 'jsx-curly-newline' | 'jsx-curly-spacing' | 'jsx-equals-spacing' | 'jsx-first-prop-new-line' | 'jsx-indent' | 'jsx-indent-props' | 'jsx-max-props-per-line' | 'jsx-newline' | 'jsx-one-expression-per-line' | 'jsx-props-no-multi-spaces' | 'jsx-quotes' | 'jsx-sort-props' | 'jsx-space-before-closing' | 'jsx-tag-spacing' | 'jsx-wrap-multilines' | 'key-spacing' | 'key-spacing' | 'keyword-spacing' | 'keyword-spacing' | 'linebreak-style' | 'lines-around-comment' | 'lines-around-comment' | 'lines-around-directive' | 'lines-between-class-members' | 'lines-between-class-members' | 'max-len' | 'max-statements-per-line' | 'member-delimiter-style' | 'multiline-ternary' | 'new-parens' | 'newline-after-var' | 'newline-before-return' | 'newline-per-chained-call' | 'no-confusing-arrow' | 'no-extra-parens' | 'no-extra-semi' | 'no-floating-decimal' | 'no-mixed-operators' | 'no-mixed-spaces-and-tabs' | 'no-multi-spaces' | 'no-multiple-empty-lines' | 'no-spaced-func' | 'no-tabs' | 'no-trailing-spaces' | 'no-whitespace-before-property' | 'nonblock-statement-body-position' | 'object-curly-newline' | 'object-curly-spacing' | 'object-curly-spacing' | 'object-property-newline' | 'one-var-declaration-per-line' | 'operator-linebreak' | 'padded-blocks' | 'padding-line-between-statements' | 'padding-line-between-statements' | 'quote-props' | 'quotes' | 'quotes' | 'rest-spread-spacing' | 'semi' | 'semi' | 'semi-spacing' | 'semi-style' | 'space-before-blocks' | 'space-before-blocks' | 'space-before-function-paren' | 'space-before-function-paren' | 'space-in-parens' | 'space-infix-ops' | 'space-infix-ops' | 'space-unary-ops' | 'spaced-comment' | 'switch-colon-spacing' | 'template-curly-spacing' | 'template-tag-spacing' | 'type-annotation-spacing' | 'wrap-iife' | 'wrap-regex' | 'yield-star-spacing'>;
|
|
32
33
|
|
|
33
34
|
type Rules = MergeIntersection<RenamePrefix<TypeScriptRules, '@typescript-eslint/', 'ts/'> & RenamePrefix<VitestRules, 'vitest/', 'test/'> & RenamePrefix<YmlRules, 'yml/', 'yaml/'> & RenamePrefix<NRules, 'n/', 'node/'> & Prefix<StylisticRules, 'style/'> & Prefix<Rules$1, 'vinicunca/'> & ImportRules & EslintRules & JsoncRules & VueRules & UnicornRules & EslintCommentsRules & {
|
|
34
35
|
'test/no-only-tests': RuleConfig<[]>;
|
|
@@ -51,15 +52,16 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
51
52
|
*/
|
|
52
53
|
ignores?: OptionsIgnores;
|
|
53
54
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
|
|
55
|
+
* Control to disable some rules in editors.
|
|
56
|
+
* @default auto-detect based on the process.env
|
|
57
|
+
*/
|
|
58
|
+
isInEditor?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Enable JSONC support.
|
|
57
61
|
*
|
|
58
|
-
* @default
|
|
62
|
+
* @default true
|
|
59
63
|
*/
|
|
60
|
-
|
|
61
|
-
enabled?: boolean;
|
|
62
|
-
};
|
|
64
|
+
jsonc?: boolean;
|
|
63
65
|
/**
|
|
64
66
|
* Enable JSX related rules.
|
|
65
67
|
*
|
|
@@ -69,66 +71,65 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
69
71
|
*/
|
|
70
72
|
jsx?: boolean;
|
|
71
73
|
/**
|
|
72
|
-
* Enable
|
|
74
|
+
* Enable Markdown support.
|
|
73
75
|
*
|
|
74
76
|
* @default true
|
|
75
77
|
*/
|
|
76
|
-
|
|
78
|
+
markdown?: boolean;
|
|
77
79
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
* @default auto-detect based on the dependencies
|
|
80
|
+
* Provide overrides for rules for each integration.
|
|
81
81
|
*/
|
|
82
|
-
|
|
82
|
+
overrides?: {
|
|
83
|
+
javascript?: ConfigItem['rules'];
|
|
84
|
+
jsonc?: ConfigItem['rules'];
|
|
85
|
+
markdown?: ConfigItem['rules'];
|
|
86
|
+
react?: ConfigItem['rules'];
|
|
87
|
+
test?: ConfigItem['rules'];
|
|
88
|
+
typescript?: ConfigItem['rules'];
|
|
89
|
+
vue?: ConfigItem['rules'];
|
|
90
|
+
yaml?: ConfigItem['rules'];
|
|
91
|
+
};
|
|
83
92
|
/**
|
|
84
|
-
* Enable
|
|
93
|
+
* Enable react support.
|
|
94
|
+
* In This plugin, react is not supported as a first class citizen. 😎
|
|
85
95
|
*
|
|
86
|
-
* @default
|
|
96
|
+
* @default false
|
|
87
97
|
*/
|
|
88
|
-
|
|
98
|
+
react?: boolean;
|
|
89
99
|
/**
|
|
90
|
-
* Enable
|
|
100
|
+
* Enable stylistic rules.
|
|
91
101
|
*
|
|
92
102
|
* @default true
|
|
93
103
|
*/
|
|
94
|
-
|
|
104
|
+
stylistic?: boolean;
|
|
95
105
|
/**
|
|
96
|
-
* Enable
|
|
106
|
+
* Enable test support.
|
|
97
107
|
*
|
|
98
108
|
* @default true
|
|
99
109
|
*/
|
|
100
|
-
|
|
110
|
+
test?: boolean;
|
|
101
111
|
/**
|
|
102
|
-
* Enable
|
|
112
|
+
* Enable TypeScript support.
|
|
103
113
|
*
|
|
104
|
-
*
|
|
105
|
-
*/
|
|
106
|
-
stylistic?: boolean;
|
|
107
|
-
/**
|
|
108
|
-
* Enable react support.
|
|
109
|
-
* In This plugin, react is not supported as a first class citizen. 😎
|
|
114
|
+
* Passing an object to enable TypeScript Language Server support.
|
|
110
115
|
*
|
|
111
|
-
* @default
|
|
116
|
+
* @default auto-detect based on the dependencies
|
|
112
117
|
*/
|
|
113
|
-
|
|
118
|
+
typescript?: OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions & {
|
|
119
|
+
enabled?: boolean;
|
|
120
|
+
};
|
|
114
121
|
/**
|
|
115
|
-
*
|
|
116
|
-
*
|
|
122
|
+
* Enable Vue support.
|
|
123
|
+
*
|
|
124
|
+
* @default auto-detect based on the dependencies
|
|
117
125
|
*/
|
|
118
|
-
|
|
126
|
+
vue?: boolean;
|
|
119
127
|
/**
|
|
120
|
-
*
|
|
128
|
+
* Enable YAML support.
|
|
129
|
+
*
|
|
130
|
+
* @default true
|
|
121
131
|
*/
|
|
122
|
-
|
|
123
|
-
javascript?: ConfigItem['rules'];
|
|
124
|
-
typescript?: ConfigItem['rules'];
|
|
125
|
-
test?: ConfigItem['rules'];
|
|
126
|
-
vue?: ConfigItem['rules'];
|
|
127
|
-
jsonc?: ConfigItem['rules'];
|
|
128
|
-
markdown?: ConfigItem['rules'];
|
|
129
|
-
yaml?: ConfigItem['rules'];
|
|
130
|
-
react?: ConfigItem['rules'];
|
|
131
|
-
};
|
|
132
|
+
yaml?: boolean;
|
|
132
133
|
}
|
|
133
134
|
interface OptionsOverrides {
|
|
134
135
|
overrides?: ConfigItem['rules'];
|