@lincy/eslint-config 3.4.0 → 3.5.0
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/README.md +14 -13
- package/dist/index.cjs +206 -7145
- package/dist/index.d.cts +60 -33
- package/dist/index.d.ts +60 -33
- package/dist/index.js +120 -6980
- package/package.json +17 -15
- package/dist/chunk-YG22WGT3.js +0 -40
- package/dist/main-4FJS3AFB.js +0 -1563
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { FlatESLintConfigItem } from 'eslint-define-config';
|
|
2
1
|
import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
3
2
|
import { ParserOptions } from '@typescript-eslint/parser';
|
|
4
3
|
import * as parser from '@typescript-eslint/parser';
|
|
5
4
|
export { parser as parserTs };
|
|
5
|
+
import { MergeIntersection, EslintRules, Unprefix, ReactRules, TypeScriptRules, RenamePrefix, VitestRules, YmlRules, NRules, Prefix, ImportRules, JsoncRules, VueRules, UnicornRules, EslintCommentsRules, RuleConfig, FlatESLintConfigItem } from '@antfu/eslint-define-config';
|
|
6
|
+
import { Rules as Rules$1 } from 'eslint-plugin-antfu';
|
|
6
7
|
export { default as pluginAntfu } from 'eslint-plugin-antfu';
|
|
7
8
|
export { default as pluginComments } from 'eslint-plugin-eslint-comments';
|
|
8
9
|
import * as eslintPluginI from 'eslint-plugin-i';
|
|
@@ -24,6 +25,24 @@ export { default as parserVue } from 'vue-eslint-parser';
|
|
|
24
25
|
export { default as parserYaml } from 'yaml-eslint-parser';
|
|
25
26
|
export { default as parserJsonc } from 'jsonc-eslint-parser';
|
|
26
27
|
|
|
28
|
+
type MergedRules = MergeIntersection<EslintRules & Unprefix<ReactRules, 'react/'> & Unprefix<TypeScriptRules, '@typescript-eslint/'>>;
|
|
29
|
+
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' | 'jsx-quotes' | 'key-spacing' | 'keyword-spacing' | 'linebreak-style' | 'lines-around-comment' | 'lines-around-directive' | 'lines-between-class-members' | 'max-len' | 'max-statements-per-line' | '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-property-newline' | 'one-var-declaration-per-line' | 'operator-linebreak' | 'padded-blocks' | 'padding-line-between-statements' | 'quote-props' | 'quotes' | 'rest-spread-spacing' | 'semi' | 'semi-spacing' | 'semi-style' | 'space-before-blocks' | 'space-before-function-paren' | 'space-in-parens' | 'space-infix-ops' | 'space-unary-ops' | 'spaced-comment' | 'switch-colon-spacing' | 'template-curly-spacing' | 'template-tag-spacing' | 'wrap-iife' | 'wrap-regex' | 'yield-star-spacing' | 'block-spacing' | 'brace-style' | 'comma-dangle' | 'comma-spacing' | 'func-call-spacing' | 'indent' | 'key-spacing' | 'keyword-spacing' | 'lines-around-comment' | 'lines-between-class-members' | 'member-delimiter-style' | 'object-curly-spacing' | 'padding-line-between-statements' | 'quotes' | 'semi' | 'space-before-blocks' | 'space-before-function-paren' | 'space-infix-ops' | 'type-annotation-spacing'>;
|
|
30
|
+
|
|
31
|
+
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, 'antfu/'> & ImportRules & EslintRules & JsoncRules & VueRules & UnicornRules & EslintCommentsRules & {
|
|
32
|
+
'test/no-only-tests': RuleConfig<[]>;
|
|
33
|
+
}>;
|
|
34
|
+
type ConfigItem = Omit<FlatESLintConfigItem<Rules, false>, 'plugins'> & {
|
|
35
|
+
/**
|
|
36
|
+
* Custom name of each config item
|
|
37
|
+
*/
|
|
38
|
+
name?: string;
|
|
39
|
+
/**
|
|
40
|
+
* An object containing a name-value mapping of plugin names to plugin objects. When `files` is specified, these plugins are only available to the matching files.
|
|
41
|
+
*
|
|
42
|
+
* @see [Using plugins in your configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-plugins-in-your-configuration)
|
|
43
|
+
*/
|
|
44
|
+
plugins?: Record<string, any>;
|
|
45
|
+
};
|
|
27
46
|
interface OptionsComponentExts {
|
|
28
47
|
/**
|
|
29
48
|
* Additional extensions for components.
|
|
@@ -55,12 +74,15 @@ interface OptionsStylistic {
|
|
|
55
74
|
interface StylisticConfig {
|
|
56
75
|
indent?: number | 'tab';
|
|
57
76
|
quotes?: 'single' | 'double';
|
|
77
|
+
jsx?: boolean;
|
|
58
78
|
}
|
|
59
79
|
interface StylisticOverridesConfig extends OptionsStylistic {
|
|
60
|
-
overrides?:
|
|
80
|
+
overrides?: ConfigItem['rules'];
|
|
61
81
|
}
|
|
62
82
|
interface OptionsOverrides {
|
|
63
|
-
overrides?:
|
|
83
|
+
overrides?: ConfigItem['rules'];
|
|
84
|
+
}
|
|
85
|
+
interface OptionsIgnores {
|
|
64
86
|
ignores?: string[];
|
|
65
87
|
}
|
|
66
88
|
interface OptionsIsInEditor {
|
|
@@ -84,6 +106,14 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
84
106
|
* @default auto-detect based on the dependencies
|
|
85
107
|
*/
|
|
86
108
|
typescript?: boolean | OptionsTypeScriptWithTypes;
|
|
109
|
+
/**
|
|
110
|
+
* Enable JSX related rules.
|
|
111
|
+
*
|
|
112
|
+
* Currently only stylistic rules are included.
|
|
113
|
+
*
|
|
114
|
+
* @default true
|
|
115
|
+
*/
|
|
116
|
+
jsx?: boolean;
|
|
87
117
|
/**
|
|
88
118
|
* Enable test support.
|
|
89
119
|
*
|
|
@@ -129,14 +159,14 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
129
159
|
* Provide overrides for rules for each integration.
|
|
130
160
|
*/
|
|
131
161
|
overrides?: {
|
|
132
|
-
javascript?:
|
|
133
|
-
typescript?:
|
|
134
|
-
stylistic?:
|
|
135
|
-
test?:
|
|
136
|
-
vue?:
|
|
137
|
-
jsonc?:
|
|
138
|
-
markdown?:
|
|
139
|
-
yaml?:
|
|
162
|
+
javascript?: ConfigItem['rules'];
|
|
163
|
+
typescript?: ConfigItem['rules'];
|
|
164
|
+
stylistic?: ConfigItem['rules'];
|
|
165
|
+
test?: ConfigItem['rules'];
|
|
166
|
+
vue?: ConfigItem['rules'];
|
|
167
|
+
jsonc?: ConfigItem['rules'];
|
|
168
|
+
markdown?: ConfigItem['rules'];
|
|
169
|
+
yaml?: ConfigItem['rules'];
|
|
140
170
|
ignores?: string[];
|
|
141
171
|
};
|
|
142
172
|
}
|
|
@@ -144,59 +174,56 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
144
174
|
/**
|
|
145
175
|
* Construct an array of ESLint flat config items.
|
|
146
176
|
*/
|
|
147
|
-
declare function lincy(options?: OptionsConfig &
|
|
177
|
+
declare function lincy(options?: OptionsConfig & ConfigItem, ...userConfigs: (ConfigItem | ConfigItem[])[]): ConfigItem[];
|
|
148
178
|
|
|
149
|
-
declare function comments():
|
|
179
|
+
declare function comments(): ConfigItem[];
|
|
150
180
|
|
|
151
|
-
declare function ignores(options?:
|
|
181
|
+
declare function ignores(options?: OptionsIgnores): ConfigItem[];
|
|
152
182
|
|
|
153
|
-
declare function imports(options?: OptionsStylistic):
|
|
183
|
+
declare function imports(options?: OptionsStylistic): ConfigItem[];
|
|
154
184
|
|
|
155
|
-
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides):
|
|
185
|
+
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): ConfigItem[];
|
|
156
186
|
|
|
157
|
-
declare function jsdoc(options?: OptionsStylistic):
|
|
187
|
+
declare function jsdoc(options?: OptionsStylistic): ConfigItem[];
|
|
158
188
|
|
|
159
|
-
declare function jsonc(options?: OptionsStylistic & OptionsOverrides):
|
|
189
|
+
declare function jsonc(options?: OptionsStylistic & OptionsOverrides): ConfigItem[];
|
|
160
190
|
|
|
161
|
-
declare function markdown(options?: OptionsComponentExts & OptionsOverrides):
|
|
191
|
+
declare function markdown(options?: OptionsComponentExts & OptionsOverrides): ConfigItem[];
|
|
162
192
|
|
|
163
|
-
declare function node():
|
|
193
|
+
declare function node(): ConfigItem[];
|
|
164
194
|
|
|
165
195
|
/**
|
|
166
196
|
* Sort package.json
|
|
167
197
|
*
|
|
168
198
|
* Requires `jsonc` config
|
|
169
199
|
*/
|
|
170
|
-
declare function sortPackageJson():
|
|
200
|
+
declare function sortPackageJson(): ConfigItem[];
|
|
171
201
|
/**
|
|
172
202
|
* Sort tsconfig.json
|
|
173
203
|
*
|
|
174
204
|
* Requires `jsonc` config
|
|
175
205
|
*/
|
|
176
|
-
declare function sortTsconfig():
|
|
206
|
+
declare function sortTsconfig(): ConfigItem[];
|
|
177
207
|
|
|
178
|
-
declare function stylistic(options?: StylisticOverridesConfig):
|
|
208
|
+
declare function stylistic(options?: StylisticOverridesConfig): ConfigItem[];
|
|
179
209
|
|
|
180
|
-
declare function typescript(options?: OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions):
|
|
210
|
+
declare function typescript(options?: OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions): ConfigItem[];
|
|
181
211
|
|
|
182
|
-
declare function unicorn():
|
|
212
|
+
declare function unicorn(): ConfigItem[];
|
|
183
213
|
|
|
184
|
-
declare function vue(options?: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic):
|
|
214
|
+
declare function vue(options?: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic): ConfigItem[];
|
|
185
215
|
|
|
186
|
-
declare function yaml(options?: OptionsOverrides & OptionsStylistic):
|
|
216
|
+
declare function yaml(options?: OptionsOverrides & OptionsStylistic): ConfigItem[];
|
|
187
217
|
|
|
188
|
-
declare function test(options?: OptionsIsInEditor & OptionsOverrides):
|
|
218
|
+
declare function test(options?: OptionsIsInEditor & OptionsOverrides): ConfigItem[];
|
|
189
219
|
|
|
190
220
|
/**
|
|
191
221
|
* Combine array and non-array configs into a single array.
|
|
192
222
|
*/
|
|
193
|
-
declare function combine(...configs: (
|
|
223
|
+
declare function combine(...configs: (ConfigItem | ConfigItem[])[]): ConfigItem[];
|
|
194
224
|
declare function renameRules(rules: Record<string, any>, from: string, to: string): {
|
|
195
225
|
[k: string]: any;
|
|
196
226
|
};
|
|
197
|
-
declare function recordRulesStateConfigs(configs: FlatESLintConfigItem[]): FlatESLintConfigItem[];
|
|
198
|
-
declare function recordRulesState(rules: FlatESLintConfigItem['rules']): FlatESLintConfigItem['rules'];
|
|
199
|
-
declare function warnUnnecessaryOffRules(): void;
|
|
200
227
|
|
|
201
228
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
202
229
|
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
@@ -220,4 +247,4 @@ declare const GLOB_TESTS: string[];
|
|
|
220
247
|
declare const GLOB_ALL_SRC: string[];
|
|
221
248
|
declare const GLOB_EXCLUDE: string[];
|
|
222
249
|
|
|
223
|
-
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, StylisticConfig, StylisticOverridesConfig, combine, comments, lincy as default, ignores, imports, javascript, jsdoc, jsonc, lincy, markdown, node,
|
|
250
|
+
export { ConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsHasTypeScript, OptionsIgnores, OptionsIsInEditor, OptionsOverrides, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, Rules, StylisticConfig, StylisticOverridesConfig, combine, comments, lincy as default, ignores, imports, javascript, jsdoc, jsonc, lincy, markdown, node, renameRules, sortPackageJson, sortTsconfig, stylistic, test, typescript, unicorn, vue, yaml };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { FlatESLintConfigItem } from 'eslint-define-config';
|
|
2
1
|
import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
3
2
|
import { ParserOptions } from '@typescript-eslint/parser';
|
|
4
3
|
import * as parser from '@typescript-eslint/parser';
|
|
5
4
|
export { parser as parserTs };
|
|
5
|
+
import { MergeIntersection, EslintRules, Unprefix, ReactRules, TypeScriptRules, RenamePrefix, VitestRules, YmlRules, NRules, Prefix, ImportRules, JsoncRules, VueRules, UnicornRules, EslintCommentsRules, RuleConfig, FlatESLintConfigItem } from '@antfu/eslint-define-config';
|
|
6
|
+
import { Rules as Rules$1 } from 'eslint-plugin-antfu';
|
|
6
7
|
export { default as pluginAntfu } from 'eslint-plugin-antfu';
|
|
7
8
|
export { default as pluginComments } from 'eslint-plugin-eslint-comments';
|
|
8
9
|
import * as eslintPluginI from 'eslint-plugin-i';
|
|
@@ -24,6 +25,24 @@ export { default as parserVue } from 'vue-eslint-parser';
|
|
|
24
25
|
export { default as parserYaml } from 'yaml-eslint-parser';
|
|
25
26
|
export { default as parserJsonc } from 'jsonc-eslint-parser';
|
|
26
27
|
|
|
28
|
+
type MergedRules = MergeIntersection<EslintRules & Unprefix<ReactRules, 'react/'> & Unprefix<TypeScriptRules, '@typescript-eslint/'>>;
|
|
29
|
+
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' | 'jsx-quotes' | 'key-spacing' | 'keyword-spacing' | 'linebreak-style' | 'lines-around-comment' | 'lines-around-directive' | 'lines-between-class-members' | 'max-len' | 'max-statements-per-line' | '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-property-newline' | 'one-var-declaration-per-line' | 'operator-linebreak' | 'padded-blocks' | 'padding-line-between-statements' | 'quote-props' | 'quotes' | 'rest-spread-spacing' | 'semi' | 'semi-spacing' | 'semi-style' | 'space-before-blocks' | 'space-before-function-paren' | 'space-in-parens' | 'space-infix-ops' | 'space-unary-ops' | 'spaced-comment' | 'switch-colon-spacing' | 'template-curly-spacing' | 'template-tag-spacing' | 'wrap-iife' | 'wrap-regex' | 'yield-star-spacing' | 'block-spacing' | 'brace-style' | 'comma-dangle' | 'comma-spacing' | 'func-call-spacing' | 'indent' | 'key-spacing' | 'keyword-spacing' | 'lines-around-comment' | 'lines-between-class-members' | 'member-delimiter-style' | 'object-curly-spacing' | 'padding-line-between-statements' | 'quotes' | 'semi' | 'space-before-blocks' | 'space-before-function-paren' | 'space-infix-ops' | 'type-annotation-spacing'>;
|
|
30
|
+
|
|
31
|
+
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, 'antfu/'> & ImportRules & EslintRules & JsoncRules & VueRules & UnicornRules & EslintCommentsRules & {
|
|
32
|
+
'test/no-only-tests': RuleConfig<[]>;
|
|
33
|
+
}>;
|
|
34
|
+
type ConfigItem = Omit<FlatESLintConfigItem<Rules, false>, 'plugins'> & {
|
|
35
|
+
/**
|
|
36
|
+
* Custom name of each config item
|
|
37
|
+
*/
|
|
38
|
+
name?: string;
|
|
39
|
+
/**
|
|
40
|
+
* An object containing a name-value mapping of plugin names to plugin objects. When `files` is specified, these plugins are only available to the matching files.
|
|
41
|
+
*
|
|
42
|
+
* @see [Using plugins in your configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-plugins-in-your-configuration)
|
|
43
|
+
*/
|
|
44
|
+
plugins?: Record<string, any>;
|
|
45
|
+
};
|
|
27
46
|
interface OptionsComponentExts {
|
|
28
47
|
/**
|
|
29
48
|
* Additional extensions for components.
|
|
@@ -55,12 +74,15 @@ interface OptionsStylistic {
|
|
|
55
74
|
interface StylisticConfig {
|
|
56
75
|
indent?: number | 'tab';
|
|
57
76
|
quotes?: 'single' | 'double';
|
|
77
|
+
jsx?: boolean;
|
|
58
78
|
}
|
|
59
79
|
interface StylisticOverridesConfig extends OptionsStylistic {
|
|
60
|
-
overrides?:
|
|
80
|
+
overrides?: ConfigItem['rules'];
|
|
61
81
|
}
|
|
62
82
|
interface OptionsOverrides {
|
|
63
|
-
overrides?:
|
|
83
|
+
overrides?: ConfigItem['rules'];
|
|
84
|
+
}
|
|
85
|
+
interface OptionsIgnores {
|
|
64
86
|
ignores?: string[];
|
|
65
87
|
}
|
|
66
88
|
interface OptionsIsInEditor {
|
|
@@ -84,6 +106,14 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
84
106
|
* @default auto-detect based on the dependencies
|
|
85
107
|
*/
|
|
86
108
|
typescript?: boolean | OptionsTypeScriptWithTypes;
|
|
109
|
+
/**
|
|
110
|
+
* Enable JSX related rules.
|
|
111
|
+
*
|
|
112
|
+
* Currently only stylistic rules are included.
|
|
113
|
+
*
|
|
114
|
+
* @default true
|
|
115
|
+
*/
|
|
116
|
+
jsx?: boolean;
|
|
87
117
|
/**
|
|
88
118
|
* Enable test support.
|
|
89
119
|
*
|
|
@@ -129,14 +159,14 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
129
159
|
* Provide overrides for rules for each integration.
|
|
130
160
|
*/
|
|
131
161
|
overrides?: {
|
|
132
|
-
javascript?:
|
|
133
|
-
typescript?:
|
|
134
|
-
stylistic?:
|
|
135
|
-
test?:
|
|
136
|
-
vue?:
|
|
137
|
-
jsonc?:
|
|
138
|
-
markdown?:
|
|
139
|
-
yaml?:
|
|
162
|
+
javascript?: ConfigItem['rules'];
|
|
163
|
+
typescript?: ConfigItem['rules'];
|
|
164
|
+
stylistic?: ConfigItem['rules'];
|
|
165
|
+
test?: ConfigItem['rules'];
|
|
166
|
+
vue?: ConfigItem['rules'];
|
|
167
|
+
jsonc?: ConfigItem['rules'];
|
|
168
|
+
markdown?: ConfigItem['rules'];
|
|
169
|
+
yaml?: ConfigItem['rules'];
|
|
140
170
|
ignores?: string[];
|
|
141
171
|
};
|
|
142
172
|
}
|
|
@@ -144,59 +174,56 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
144
174
|
/**
|
|
145
175
|
* Construct an array of ESLint flat config items.
|
|
146
176
|
*/
|
|
147
|
-
declare function lincy(options?: OptionsConfig &
|
|
177
|
+
declare function lincy(options?: OptionsConfig & ConfigItem, ...userConfigs: (ConfigItem | ConfigItem[])[]): ConfigItem[];
|
|
148
178
|
|
|
149
|
-
declare function comments():
|
|
179
|
+
declare function comments(): ConfigItem[];
|
|
150
180
|
|
|
151
|
-
declare function ignores(options?:
|
|
181
|
+
declare function ignores(options?: OptionsIgnores): ConfigItem[];
|
|
152
182
|
|
|
153
|
-
declare function imports(options?: OptionsStylistic):
|
|
183
|
+
declare function imports(options?: OptionsStylistic): ConfigItem[];
|
|
154
184
|
|
|
155
|
-
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides):
|
|
185
|
+
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): ConfigItem[];
|
|
156
186
|
|
|
157
|
-
declare function jsdoc(options?: OptionsStylistic):
|
|
187
|
+
declare function jsdoc(options?: OptionsStylistic): ConfigItem[];
|
|
158
188
|
|
|
159
|
-
declare function jsonc(options?: OptionsStylistic & OptionsOverrides):
|
|
189
|
+
declare function jsonc(options?: OptionsStylistic & OptionsOverrides): ConfigItem[];
|
|
160
190
|
|
|
161
|
-
declare function markdown(options?: OptionsComponentExts & OptionsOverrides):
|
|
191
|
+
declare function markdown(options?: OptionsComponentExts & OptionsOverrides): ConfigItem[];
|
|
162
192
|
|
|
163
|
-
declare function node():
|
|
193
|
+
declare function node(): ConfigItem[];
|
|
164
194
|
|
|
165
195
|
/**
|
|
166
196
|
* Sort package.json
|
|
167
197
|
*
|
|
168
198
|
* Requires `jsonc` config
|
|
169
199
|
*/
|
|
170
|
-
declare function sortPackageJson():
|
|
200
|
+
declare function sortPackageJson(): ConfigItem[];
|
|
171
201
|
/**
|
|
172
202
|
* Sort tsconfig.json
|
|
173
203
|
*
|
|
174
204
|
* Requires `jsonc` config
|
|
175
205
|
*/
|
|
176
|
-
declare function sortTsconfig():
|
|
206
|
+
declare function sortTsconfig(): ConfigItem[];
|
|
177
207
|
|
|
178
|
-
declare function stylistic(options?: StylisticOverridesConfig):
|
|
208
|
+
declare function stylistic(options?: StylisticOverridesConfig): ConfigItem[];
|
|
179
209
|
|
|
180
|
-
declare function typescript(options?: OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions):
|
|
210
|
+
declare function typescript(options?: OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions): ConfigItem[];
|
|
181
211
|
|
|
182
|
-
declare function unicorn():
|
|
212
|
+
declare function unicorn(): ConfigItem[];
|
|
183
213
|
|
|
184
|
-
declare function vue(options?: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic):
|
|
214
|
+
declare function vue(options?: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic): ConfigItem[];
|
|
185
215
|
|
|
186
|
-
declare function yaml(options?: OptionsOverrides & OptionsStylistic):
|
|
216
|
+
declare function yaml(options?: OptionsOverrides & OptionsStylistic): ConfigItem[];
|
|
187
217
|
|
|
188
|
-
declare function test(options?: OptionsIsInEditor & OptionsOverrides):
|
|
218
|
+
declare function test(options?: OptionsIsInEditor & OptionsOverrides): ConfigItem[];
|
|
189
219
|
|
|
190
220
|
/**
|
|
191
221
|
* Combine array and non-array configs into a single array.
|
|
192
222
|
*/
|
|
193
|
-
declare function combine(...configs: (
|
|
223
|
+
declare function combine(...configs: (ConfigItem | ConfigItem[])[]): ConfigItem[];
|
|
194
224
|
declare function renameRules(rules: Record<string, any>, from: string, to: string): {
|
|
195
225
|
[k: string]: any;
|
|
196
226
|
};
|
|
197
|
-
declare function recordRulesStateConfigs(configs: FlatESLintConfigItem[]): FlatESLintConfigItem[];
|
|
198
|
-
declare function recordRulesState(rules: FlatESLintConfigItem['rules']): FlatESLintConfigItem['rules'];
|
|
199
|
-
declare function warnUnnecessaryOffRules(): void;
|
|
200
227
|
|
|
201
228
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
202
229
|
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
@@ -220,4 +247,4 @@ declare const GLOB_TESTS: string[];
|
|
|
220
247
|
declare const GLOB_ALL_SRC: string[];
|
|
221
248
|
declare const GLOB_EXCLUDE: string[];
|
|
222
249
|
|
|
223
|
-
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, StylisticConfig, StylisticOverridesConfig, combine, comments, lincy as default, ignores, imports, javascript, jsdoc, jsonc, lincy, markdown, node,
|
|
250
|
+
export { ConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsHasTypeScript, OptionsIgnores, OptionsIsInEditor, OptionsOverrides, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, Rules, StylisticConfig, StylisticOverridesConfig, combine, comments, lincy as default, ignores, imports, javascript, jsdoc, jsonc, lincy, markdown, node, renameRules, sortPackageJson, sortTsconfig, stylistic, test, typescript, unicorn, vue, yaml };
|