@so1ve/eslint-config 1.0.0-alpha.1 → 1.0.0-alpha.3
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 +1674 -6
- package/dist/index.d.ts +211 -1
- package/dist/index.mjs +1482 -94
- package/package.json +7 -5
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,211 @@
|
|
|
1
|
-
|
|
1
|
+
import { FlatESLintConfigItem } from 'eslint-define-config';
|
|
2
|
+
import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
3
|
+
export { default as pluginComments } from '@eslint-community/eslint-plugin-eslint-comments';
|
|
4
|
+
export { default as pluginHtml } from '@html-eslint/eslint-plugin';
|
|
5
|
+
export { default as parserHtml } from '@html-eslint/parser';
|
|
6
|
+
export { default as pluginSo1ve } from '@so1ve/eslint-plugin';
|
|
7
|
+
export { default as pluginSortImports } from '@so1ve/eslint-plugin-sort-imports';
|
|
8
|
+
export { default as pluginTs } from '@typescript-eslint/eslint-plugin';
|
|
9
|
+
export { default as parserTs } from '@typescript-eslint/parser';
|
|
10
|
+
export { default as parserMdx } from 'eslint-mdx';
|
|
11
|
+
export { default as pluginArrayFunc } from 'eslint-plugin-array-func';
|
|
12
|
+
export { default as pluginEtc } from 'eslint-plugin-etc';
|
|
13
|
+
export { default as pluginHtmlJsSupport } from 'eslint-plugin-html';
|
|
14
|
+
export { default as pluginImport } from 'eslint-plugin-i';
|
|
15
|
+
export { default as pluginJestFormatting } from 'eslint-plugin-jest-formatting';
|
|
16
|
+
export { default as pluginJsdoc } from 'eslint-plugin-jsdoc';
|
|
17
|
+
export { default as pluginJsonSchemaValidator } from 'eslint-plugin-json-schema-validator';
|
|
18
|
+
export { default as pluginJsonc } from 'eslint-plugin-jsonc';
|
|
19
|
+
export { default as pluginMdx } from 'eslint-plugin-mdx';
|
|
20
|
+
export { default as pluginNode } from 'eslint-plugin-n';
|
|
21
|
+
export { default as pluginNoOnlyTests } from 'eslint-plugin-no-only-tests';
|
|
22
|
+
export { default as pluginOnlyError } from 'eslint-plugin-only-error';
|
|
23
|
+
export { default as pluginPromise } from 'eslint-plugin-promise';
|
|
24
|
+
export { default as pluginRegexp } from 'eslint-plugin-regexp';
|
|
25
|
+
export { default as pluginSolid } from 'eslint-plugin-solid';
|
|
26
|
+
export { default as pluginToml } from 'eslint-plugin-toml';
|
|
27
|
+
export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
|
|
28
|
+
export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports';
|
|
29
|
+
export { default as pluginVitest } from 'eslint-plugin-vitest';
|
|
30
|
+
export { default as pluginVue } from 'eslint-plugin-vue';
|
|
31
|
+
export { default as pluginYaml } from 'eslint-plugin-yml';
|
|
32
|
+
export { default as parserJsonc } from 'jsonc-eslint-parser';
|
|
33
|
+
export { default as parserToml } from 'toml-eslint-parser';
|
|
34
|
+
export { default as parserVue } from 'vue-eslint-parser';
|
|
35
|
+
export { default as parserYaml } from 'yaml-eslint-parser';
|
|
36
|
+
|
|
37
|
+
declare const comments: () => FlatESLintConfigItem[];
|
|
38
|
+
|
|
39
|
+
declare const html: () => FlatESLintConfigItem[];
|
|
40
|
+
|
|
41
|
+
declare const ignores: () => FlatESLintConfigItem[];
|
|
42
|
+
|
|
43
|
+
interface OptionsComponentExts {
|
|
44
|
+
/**
|
|
45
|
+
* Additional extensions for components.
|
|
46
|
+
*/
|
|
47
|
+
componentExts?: string[];
|
|
48
|
+
}
|
|
49
|
+
interface OptionsTypeScriptWithTypes {
|
|
50
|
+
tsconfigPath: string;
|
|
51
|
+
tsconfigRootDir?: string;
|
|
52
|
+
}
|
|
53
|
+
interface OptionsHasTypeScript {
|
|
54
|
+
typescript?: boolean;
|
|
55
|
+
}
|
|
56
|
+
interface OptionsOverrides {
|
|
57
|
+
overrides?: FlatESLintConfigItem["rules"];
|
|
58
|
+
}
|
|
59
|
+
interface Options {
|
|
60
|
+
/**
|
|
61
|
+
* Enable gitignore support.
|
|
62
|
+
*
|
|
63
|
+
* Passing an object to configure the options.
|
|
64
|
+
*
|
|
65
|
+
* @default true
|
|
66
|
+
* @see https://github.com/antfu/eslint-config-flat-gitignore
|
|
67
|
+
*/
|
|
68
|
+
gitignore?: boolean | FlatGitignoreOptions;
|
|
69
|
+
/**
|
|
70
|
+
* Enable TypeScript support.
|
|
71
|
+
*
|
|
72
|
+
* Passing an object to enable TypeScript Language Server support.
|
|
73
|
+
*
|
|
74
|
+
* @default auto-detect based on the dependencies
|
|
75
|
+
*/
|
|
76
|
+
typescript?: boolean | OptionsTypeScriptWithTypes;
|
|
77
|
+
/**
|
|
78
|
+
* Enable test support.
|
|
79
|
+
*
|
|
80
|
+
* @default true
|
|
81
|
+
*/
|
|
82
|
+
test?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Enable Vue support.
|
|
85
|
+
*
|
|
86
|
+
* @default auto-detect based on the dependencies
|
|
87
|
+
*/
|
|
88
|
+
vue?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Enable Solid.js support.
|
|
91
|
+
*
|
|
92
|
+
* @default auto-detect based on the dependencies
|
|
93
|
+
*/
|
|
94
|
+
solid?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Enable JSONC support.
|
|
97
|
+
*
|
|
98
|
+
* @default true
|
|
99
|
+
*/
|
|
100
|
+
jsonc?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Enable YAML support.
|
|
103
|
+
*
|
|
104
|
+
* @default true
|
|
105
|
+
*/
|
|
106
|
+
yaml?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Enable TOML support.
|
|
109
|
+
*
|
|
110
|
+
* @default true
|
|
111
|
+
*/
|
|
112
|
+
toml?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Enable markdown and mdx support.
|
|
115
|
+
*
|
|
116
|
+
* @default true
|
|
117
|
+
*/
|
|
118
|
+
mdx?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Provide overrides for rules for each integration.
|
|
121
|
+
*/
|
|
122
|
+
overrides?: {
|
|
123
|
+
javascript?: FlatESLintConfigItem["rules"];
|
|
124
|
+
typescript?: FlatESLintConfigItem["rules"];
|
|
125
|
+
typescriptWithTypes?: FlatESLintConfigItem["rules"];
|
|
126
|
+
test?: FlatESLintConfigItem["rules"];
|
|
127
|
+
vue?: FlatESLintConfigItem["rules"];
|
|
128
|
+
solid?: FlatESLintConfigItem["rules"];
|
|
129
|
+
jsonc?: FlatESLintConfigItem["rules"];
|
|
130
|
+
mdx?: FlatESLintConfigItem["rules"];
|
|
131
|
+
yaml?: FlatESLintConfigItem["rules"];
|
|
132
|
+
toml?: FlatESLintConfigItem["rules"];
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
declare const imports: (options?: Options) => FlatESLintConfigItem[];
|
|
137
|
+
|
|
138
|
+
declare const javascript: ({ overrides, }?: OptionsOverrides) => FlatESLintConfigItem[];
|
|
139
|
+
|
|
140
|
+
declare const jsdoc: () => FlatESLintConfigItem[];
|
|
141
|
+
|
|
142
|
+
declare const jsonc: () => FlatESLintConfigItem[];
|
|
143
|
+
|
|
144
|
+
declare const mdx: ({ componentExts, overrides, }?: OptionsComponentExts & OptionsOverrides) => FlatESLintConfigItem[];
|
|
145
|
+
|
|
146
|
+
declare const node: () => FlatESLintConfigItem[];
|
|
147
|
+
|
|
148
|
+
declare const onlyError: () => FlatESLintConfigItem[];
|
|
149
|
+
|
|
150
|
+
declare const promise: () => FlatESLintConfigItem[];
|
|
151
|
+
|
|
152
|
+
declare const solid: ({ overrides, typescript, }?: OptionsHasTypeScript & OptionsOverrides) => FlatESLintConfigItem[];
|
|
153
|
+
|
|
154
|
+
declare const sortImports: () => FlatESLintConfigItem[];
|
|
155
|
+
|
|
156
|
+
declare const test: ({ overrides, }?: OptionsOverrides) => FlatESLintConfigItem[];
|
|
157
|
+
|
|
158
|
+
declare const toml: ({ overrides, }?: OptionsOverrides) => FlatESLintConfigItem[];
|
|
159
|
+
|
|
160
|
+
declare const typescript: ({ componentExts, overrides, }?: OptionsComponentExts & OptionsOverrides) => FlatESLintConfigItem[];
|
|
161
|
+
declare const typescriptWithTypes: ({ componentExts, tsconfigPath, tsconfigRootDir, overrides, }: OptionsTypeScriptWithTypes & OptionsComponentExts & OptionsOverrides) => FlatESLintConfigItem[];
|
|
162
|
+
|
|
163
|
+
declare const unicorn: () => FlatESLintConfigItem[];
|
|
164
|
+
|
|
165
|
+
declare const vue: ({ overrides, typescript, }?: OptionsHasTypeScript & OptionsOverrides) => FlatESLintConfigItem[];
|
|
166
|
+
|
|
167
|
+
declare const yaml: ({ overrides, }?: OptionsOverrides) => FlatESLintConfigItem[];
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Construct an array of ESLint flat config items.
|
|
171
|
+
*/
|
|
172
|
+
declare function so1ve(options?: Options, ...userConfigs: (FlatESLintConfigItem | FlatESLintConfigItem[])[]): FlatESLintConfigItem[];
|
|
173
|
+
|
|
174
|
+
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
175
|
+
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
176
|
+
declare const GLOB_JS = "**/*.?([cm])js";
|
|
177
|
+
declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
178
|
+
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
179
|
+
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
180
|
+
declare const GLOB_DTS = "**/*.d.?([cm])tsx";
|
|
181
|
+
declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
182
|
+
declare const GLOB_CSS = "**/*.css";
|
|
183
|
+
declare const GLOB_LESS = "**/*.less";
|
|
184
|
+
declare const GLOB_SCSS = "**/*.scss";
|
|
185
|
+
declare const GLOB_JSON = "**/*.json";
|
|
186
|
+
declare const GLOB_JSON5 = "**/*.json5";
|
|
187
|
+
declare const GLOB_JSONC = "**/*.jsonc";
|
|
188
|
+
declare const GLOB_ESLINTRC = "**/.eslintrc";
|
|
189
|
+
declare const GLOB_MARKDOWN = "**/*.{md,mdx}";
|
|
190
|
+
declare const GLOB_VUE = "**/*.vue";
|
|
191
|
+
declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
192
|
+
declare const GLOB_TOML = "**/*.toml";
|
|
193
|
+
declare const GLOB_HTML = "**/*.htm?(l)";
|
|
194
|
+
declare const GLOB_PACKAGEJSON = "**/package.json";
|
|
195
|
+
declare const GLOB_MARKDOWN_CODE = "**/*.{md,mdx}/**/*.?([cm])[jt]s?(x)";
|
|
196
|
+
declare const GLOB_TESTS: string[];
|
|
197
|
+
declare const GLOB_ALL_SRC: string[];
|
|
198
|
+
declare const GLOB_EXCLUDE: string[];
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Combine array and non-array configs into a single array.
|
|
202
|
+
*/
|
|
203
|
+
declare const combine: (...configs: (FlatESLintConfigItem | FlatESLintConfigItem[])[]) => FlatESLintConfigItem[];
|
|
204
|
+
declare const renameRules: (rules: Record<string, any>, from: string, to: string) => {
|
|
205
|
+
[k: string]: any;
|
|
206
|
+
};
|
|
207
|
+
declare function recordRulesStateConfigs(configs: FlatESLintConfigItem[]): FlatESLintConfigItem[];
|
|
208
|
+
declare function recordRulesState(rules: FlatESLintConfigItem["rules"]): FlatESLintConfigItem["rules"];
|
|
209
|
+
declare function warnUnnecessaryOffRules(): void;
|
|
210
|
+
|
|
211
|
+
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_DTS, GLOB_ESLINTRC, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_PACKAGEJSON, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, Options, OptionsComponentExts, OptionsHasTypeScript, OptionsOverrides, OptionsTypeScriptWithTypes, combine, comments, html, ignores, imports, javascript, jsdoc, jsonc, mdx, node, onlyError, promise, recordRulesState, recordRulesStateConfigs, renameRules, so1ve, solid, sortImports, test, toml, typescript, typescriptWithTypes, unicorn, vue, warnUnnecessaryOffRules, yaml };
|