@ntnyq/eslint-config 2.0.0-beta.8 → 2.0.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 +2 -1
- package/dist/index.cjs +1561 -0
- package/dist/index.d.cts +132 -0
- package/dist/index.d.ts +90 -37
- package/dist/index.js +887 -449
- package/package.json +57 -48
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import * as eslint_define_config from 'eslint-define-config';
|
|
2
|
+
import { FlatESLintConfig } from 'eslint-define-config';
|
|
3
|
+
export { default as pluginNode } from 'eslint-plugin-n';
|
|
4
|
+
export { default as pluginVue } from 'eslint-plugin-vue';
|
|
5
|
+
export { default as pluginUnoCSS } from '@unocss/eslint-plugin';
|
|
6
|
+
export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
|
|
7
|
+
export { default as pluginPrettier } from 'eslint-plugin-prettier';
|
|
8
|
+
export { default as pluginMarkdown } from 'eslint-plugin-markdown';
|
|
9
|
+
export { default as pluginComments } from 'eslint-plugin-eslint-comments';
|
|
10
|
+
export { default as pluginYaml } from 'eslint-plugin-yml';
|
|
11
|
+
export { default as pluginJsonc } from 'eslint-plugin-jsonc';
|
|
12
|
+
export { default as pluginImport } from 'eslint-plugin-import-x';
|
|
13
|
+
export { default as pluginJsdoc } from 'eslint-plugin-jsdoc';
|
|
14
|
+
import * as yamlEslintParser from 'yaml-eslint-parser';
|
|
15
|
+
export { yamlEslintParser as parserYaml };
|
|
16
|
+
import * as vueEslintParser from 'vue-eslint-parser';
|
|
17
|
+
export { vueEslintParser as parserVue };
|
|
18
|
+
import * as jsoncEslintParser from 'jsonc-eslint-parser';
|
|
19
|
+
export { jsoncEslintParser as parserJsonc };
|
|
20
|
+
export { default as tseslint } from 'typescript-eslint';
|
|
21
|
+
|
|
22
|
+
declare const hasTypeScript: boolean;
|
|
23
|
+
declare const hasVue: boolean;
|
|
24
|
+
declare const hasUnoCSS: boolean;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @file globs constants
|
|
28
|
+
*/
|
|
29
|
+
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
30
|
+
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
31
|
+
declare const GLOB_JS = "**/*.?([cm])js";
|
|
32
|
+
declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
33
|
+
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
34
|
+
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
35
|
+
declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
36
|
+
declare const GLOB_CSS = "**/*.css";
|
|
37
|
+
declare const GLOB_LESS = "**/*.less";
|
|
38
|
+
declare const GLOB_SCSS = "**/*.scss";
|
|
39
|
+
declare const GLOB_JSON = "**/*.json";
|
|
40
|
+
declare const GLOB_JSON5 = "**/*.json5";
|
|
41
|
+
declare const GLOB_JSONC = "**/*.jsonc";
|
|
42
|
+
declare const GLOB_VUE = "**/*.vue";
|
|
43
|
+
declare const GLOB_MARKDOWN = "**/*.md";
|
|
44
|
+
declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
45
|
+
declare const GLOB_HTML = "**/*.htm?(l)";
|
|
46
|
+
declare const GLOB_ALL_SRC: string[];
|
|
47
|
+
declare const GLOB_NODE_MODULES = "**/node_modules/**";
|
|
48
|
+
declare const GLOB_DIST = "**/dist/**";
|
|
49
|
+
declare const GLOB_LOCKFILE: string[];
|
|
50
|
+
declare const GLOB_EXCLUDE: string[];
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @file presets
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* JavaScript preset
|
|
58
|
+
*/
|
|
59
|
+
declare const presetJavaScript: FlatESLintConfig[];
|
|
60
|
+
/**
|
|
61
|
+
* JavaScript & TypeScript
|
|
62
|
+
*/
|
|
63
|
+
declare const presetBasic: FlatESLintConfig[];
|
|
64
|
+
/**
|
|
65
|
+
* JSON and sort json keys
|
|
66
|
+
*/
|
|
67
|
+
declare const presetJsonc: FlatESLintConfig[];
|
|
68
|
+
/**
|
|
69
|
+
* JSON YAML Markdown
|
|
70
|
+
*/
|
|
71
|
+
declare const presetLanguageExtensions: FlatESLintConfig[];
|
|
72
|
+
declare const presetCommon: FlatESLintConfig[];
|
|
73
|
+
/**
|
|
74
|
+
* All supported framework
|
|
75
|
+
*/
|
|
76
|
+
declare const presetAll: FlatESLintConfig[];
|
|
77
|
+
/**
|
|
78
|
+
* Custom framework support
|
|
79
|
+
*/
|
|
80
|
+
declare function ntnyq(config?: FlatESLintConfig | FlatESLintConfig[], { vue: enableVue, unocss: enableUnoCSS, prettier: enablePrettier, markdown: enableMarkdown, }?: {
|
|
81
|
+
vue?: boolean | undefined;
|
|
82
|
+
unocss?: boolean | undefined;
|
|
83
|
+
prettier?: boolean | undefined;
|
|
84
|
+
markdown?: boolean | undefined;
|
|
85
|
+
}): FlatESLintConfig[];
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @see https://eslint.org/docs/latest/use/configure/configuration-files-new#globally-ignoring-files-with-ignores
|
|
89
|
+
*/
|
|
90
|
+
declare const ignores: eslint_define_config.FlatESLintConfig[];
|
|
91
|
+
|
|
92
|
+
declare const node: eslint_define_config.FlatESLintConfig[];
|
|
93
|
+
|
|
94
|
+
declare const jsdoc: eslint_define_config.FlatESLintConfig[];
|
|
95
|
+
|
|
96
|
+
declare const imports: eslint_define_config.FlatESLintConfig[];
|
|
97
|
+
|
|
98
|
+
declare const unicorn: eslint_define_config.FlatESLintConfig[];
|
|
99
|
+
|
|
100
|
+
declare const prettier: FlatESLintConfig[];
|
|
101
|
+
|
|
102
|
+
declare const comments: eslint_define_config.FlatESLintConfig[];
|
|
103
|
+
|
|
104
|
+
declare const javascript: eslint_define_config.FlatESLintConfig[];
|
|
105
|
+
declare const jsx: eslint_define_config.FlatESLintConfig[];
|
|
106
|
+
|
|
107
|
+
declare const typescriptCore: FlatESLintConfig[];
|
|
108
|
+
declare const typescript: FlatESLintConfig[];
|
|
109
|
+
|
|
110
|
+
declare const unocss: eslint_define_config.FlatESLintConfig[];
|
|
111
|
+
|
|
112
|
+
declare const yml: eslint_define_config.FlatESLintConfig[];
|
|
113
|
+
|
|
114
|
+
declare const sortPackageJson: eslint_define_config.FlatESLintConfig[];
|
|
115
|
+
declare const sortTsConfig: eslint_define_config.FlatESLintConfig[];
|
|
116
|
+
|
|
117
|
+
declare const jsonc: eslint_define_config.FlatESLintConfig[];
|
|
118
|
+
|
|
119
|
+
declare const markdown: eslint_define_config.FlatESLintConfig[];
|
|
120
|
+
|
|
121
|
+
declare function getVueVersion(): number;
|
|
122
|
+
declare const vue: FlatESLintConfig[];
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @file plugins & parsers
|
|
126
|
+
*/
|
|
127
|
+
type InteropDefault<T> = T extends {
|
|
128
|
+
default: infer U;
|
|
129
|
+
} ? U : T;
|
|
130
|
+
declare function interopDefault<T>(m: T): InteropDefault<T>;
|
|
131
|
+
|
|
132
|
+
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropDefault, comments, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, markdown, node, ntnyq, presetAll, presetBasic, presetCommon, presetJavaScript, presetJsonc, presetLanguageExtensions, prettier, sortPackageJson, sortTsConfig, typescript, typescriptCore, unicorn, unocss, vue, yml };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,37 @@
|
|
|
1
|
+
import * as eslint_define_config from 'eslint-define-config';
|
|
1
2
|
import { FlatESLintConfig } from 'eslint-define-config';
|
|
2
|
-
export { default as
|
|
3
|
-
export { default as
|
|
4
|
-
export { default as
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as
|
|
7
|
-
export { default as
|
|
3
|
+
export { default as pluginNode } from 'eslint-plugin-n';
|
|
4
|
+
export { default as pluginVue } from 'eslint-plugin-vue';
|
|
5
|
+
export { default as pluginUnoCSS } from '@unocss/eslint-plugin';
|
|
6
|
+
export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
|
|
7
|
+
export { default as pluginPrettier } from 'eslint-plugin-prettier';
|
|
8
|
+
export { default as pluginMarkdown } from 'eslint-plugin-markdown';
|
|
9
|
+
export { default as pluginComments } from 'eslint-plugin-eslint-comments';
|
|
10
|
+
export { default as pluginYaml } from 'eslint-plugin-yml';
|
|
11
|
+
export { default as pluginJsonc } from 'eslint-plugin-jsonc';
|
|
12
|
+
export { default as pluginImport } from 'eslint-plugin-import-x';
|
|
13
|
+
export { default as pluginJsdoc } from 'eslint-plugin-jsdoc';
|
|
14
|
+
import * as yamlEslintParser from 'yaml-eslint-parser';
|
|
15
|
+
export { yamlEslintParser as parserYaml };
|
|
16
|
+
import * as vueEslintParser from 'vue-eslint-parser';
|
|
17
|
+
export { vueEslintParser as parserVue };
|
|
18
|
+
import * as jsoncEslintParser from 'jsonc-eslint-parser';
|
|
19
|
+
export { jsoncEslintParser as parserJsonc };
|
|
20
|
+
export { default as tseslint } from 'typescript-eslint';
|
|
21
|
+
|
|
22
|
+
declare const hasTypeScript: boolean;
|
|
23
|
+
declare const hasVue: boolean;
|
|
24
|
+
declare const hasUnoCSS: boolean;
|
|
8
25
|
|
|
9
26
|
/**
|
|
10
|
-
* @file
|
|
27
|
+
* @file globs constants
|
|
11
28
|
*/
|
|
12
|
-
declare const
|
|
13
|
-
declare const
|
|
14
|
-
declare const
|
|
15
|
-
declare const
|
|
16
|
-
declare const
|
|
29
|
+
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
30
|
+
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
31
|
+
declare const GLOB_JS = "**/*.?([cm])js";
|
|
32
|
+
declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
33
|
+
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
34
|
+
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
17
35
|
declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
18
36
|
declare const GLOB_CSS = "**/*.css";
|
|
19
37
|
declare const GLOB_LESS = "**/*.less";
|
|
@@ -22,7 +40,6 @@ declare const GLOB_JSON = "**/*.json";
|
|
|
22
40
|
declare const GLOB_JSON5 = "**/*.json5";
|
|
23
41
|
declare const GLOB_JSONC = "**/*.jsonc";
|
|
24
42
|
declare const GLOB_VUE = "**/*.vue";
|
|
25
|
-
declare const GLOB_ASTRO = "**/*.astro";
|
|
26
43
|
declare const GLOB_MARKDOWN = "**/*.md";
|
|
27
44
|
declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
28
45
|
declare const GLOB_HTML = "**/*.htm?(l)";
|
|
@@ -33,47 +50,83 @@ declare const GLOB_LOCKFILE: string[];
|
|
|
33
50
|
declare const GLOB_EXCLUDE: string[];
|
|
34
51
|
|
|
35
52
|
/**
|
|
36
|
-
*
|
|
53
|
+
* @file presets
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* JavaScript preset
|
|
37
58
|
*/
|
|
38
|
-
declare const
|
|
59
|
+
declare const presetJavaScript: FlatESLintConfig[];
|
|
39
60
|
/**
|
|
40
|
-
*
|
|
61
|
+
* JavaScript & TypeScript
|
|
41
62
|
*/
|
|
42
|
-
declare const
|
|
63
|
+
declare const presetBasic: FlatESLintConfig[];
|
|
43
64
|
/**
|
|
44
|
-
*
|
|
65
|
+
* JSON and sort json keys
|
|
45
66
|
*/
|
|
46
|
-
declare
|
|
67
|
+
declare const presetJsonc: FlatESLintConfig[];
|
|
68
|
+
/**
|
|
69
|
+
* JSON YAML Markdown
|
|
70
|
+
*/
|
|
71
|
+
declare const presetLanguageExtensions: FlatESLintConfig[];
|
|
72
|
+
declare const presetCommon: FlatESLintConfig[];
|
|
73
|
+
/**
|
|
74
|
+
* All supported framework
|
|
75
|
+
*/
|
|
76
|
+
declare const presetAll: FlatESLintConfig[];
|
|
77
|
+
/**
|
|
78
|
+
* Custom framework support
|
|
79
|
+
*/
|
|
80
|
+
declare function ntnyq(config?: FlatESLintConfig | FlatESLintConfig[], { vue: enableVue, unocss: enableUnoCSS, prettier: enablePrettier, markdown: enableMarkdown, }?: {
|
|
47
81
|
vue?: boolean | undefined;
|
|
48
|
-
|
|
49
|
-
astro?: boolean | undefined;
|
|
82
|
+
unocss?: boolean | undefined;
|
|
50
83
|
prettier?: boolean | undefined;
|
|
51
84
|
markdown?: boolean | undefined;
|
|
52
85
|
}): FlatESLintConfig[];
|
|
53
86
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
declare const
|
|
87
|
+
/**
|
|
88
|
+
* @see https://eslint.org/docs/latest/use/configure/configuration-files-new#globally-ignoring-files-with-ignores
|
|
89
|
+
*/
|
|
90
|
+
declare const ignores: eslint_define_config.FlatESLintConfig[];
|
|
58
91
|
|
|
59
|
-
declare const
|
|
92
|
+
declare const node: eslint_define_config.FlatESLintConfig[];
|
|
60
93
|
|
|
61
|
-
declare
|
|
62
|
-
|
|
94
|
+
declare const jsdoc: eslint_define_config.FlatESLintConfig[];
|
|
95
|
+
|
|
96
|
+
declare const imports: eslint_define_config.FlatESLintConfig[];
|
|
63
97
|
|
|
64
|
-
declare const
|
|
98
|
+
declare const unicorn: eslint_define_config.FlatESLintConfig[];
|
|
65
99
|
|
|
66
|
-
declare const
|
|
100
|
+
declare const prettier: FlatESLintConfig[];
|
|
67
101
|
|
|
68
|
-
declare const
|
|
102
|
+
declare const comments: eslint_define_config.FlatESLintConfig[];
|
|
69
103
|
|
|
70
|
-
declare const
|
|
71
|
-
declare const
|
|
104
|
+
declare const javascript: eslint_define_config.FlatESLintConfig[];
|
|
105
|
+
declare const jsx: eslint_define_config.FlatESLintConfig[];
|
|
72
106
|
|
|
73
|
-
declare const
|
|
107
|
+
declare const typescriptCore: FlatESLintConfig[];
|
|
108
|
+
declare const typescript: FlatESLintConfig[];
|
|
109
|
+
|
|
110
|
+
declare const unocss: eslint_define_config.FlatESLintConfig[];
|
|
111
|
+
|
|
112
|
+
declare const yml: eslint_define_config.FlatESLintConfig[];
|
|
113
|
+
|
|
114
|
+
declare const sortPackageJson: eslint_define_config.FlatESLintConfig[];
|
|
115
|
+
declare const sortTsConfig: eslint_define_config.FlatESLintConfig[];
|
|
74
116
|
|
|
75
|
-
declare const
|
|
117
|
+
declare const jsonc: eslint_define_config.FlatESLintConfig[];
|
|
76
118
|
|
|
77
|
-
declare const
|
|
119
|
+
declare const markdown: eslint_define_config.FlatESLintConfig[];
|
|
120
|
+
|
|
121
|
+
declare function getVueVersion(): number;
|
|
122
|
+
declare const vue: FlatESLintConfig[];
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @file plugins & parsers
|
|
126
|
+
*/
|
|
127
|
+
type InteropDefault<T> = T extends {
|
|
128
|
+
default: infer U;
|
|
129
|
+
} ? U : T;
|
|
130
|
+
declare function interopDefault<T>(m: T): InteropDefault<T>;
|
|
78
131
|
|
|
79
|
-
export { GLOB_ALL_SRC,
|
|
132
|
+
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropDefault, comments, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, markdown, node, ntnyq, presetAll, presetBasic, presetCommon, presetJavaScript, presetJsonc, presetLanguageExtensions, prettier, sortPackageJson, sortTsConfig, typescript, typescriptCore, unicorn, unocss, vue, yml };
|