@ntnyq/eslint-config 2.0.0-beta.18 → 2.0.0-beta.19
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 +801 -741
- package/dist/index.d.cts +64 -29
- package/dist/index.d.ts +64 -29
- package/dist/index.js +779 -732
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FlatESLintConfigItem } from 'eslint-define-config';
|
|
2
|
+
import * as yamlEslintParser from 'yaml-eslint-parser';
|
|
3
|
+
export { yamlEslintParser as parserYml };
|
|
4
|
+
import * as vueEslintParser from 'vue-eslint-parser';
|
|
5
|
+
export { vueEslintParser as parserVue };
|
|
6
|
+
import * as jsoncEslintParser from 'jsonc-eslint-parser';
|
|
7
|
+
export { jsoncEslintParser as parserJsonc };
|
|
8
|
+
import * as astroEslintParser from 'astro-eslint-parser';
|
|
9
|
+
export { astroEslintParser as parserAstro };
|
|
2
10
|
import * as parser from '@typescript-eslint/parser';
|
|
3
|
-
export { parser as
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
|
|
11
|
+
export { parser as parserTypescript };
|
|
12
|
+
import * as eslintPluginYml from 'eslint-plugin-yml';
|
|
13
|
+
export { eslintPluginYml as pluginYml };
|
|
14
|
+
import * as eslintPluginAstro from 'eslint-plugin-astro';
|
|
15
|
+
export { eslintPluginAstro as pluginAstro };
|
|
16
|
+
import * as eslintPluginJsonc from 'eslint-plugin-jsonc';
|
|
17
|
+
export { eslintPluginJsonc as pluginJsonc };
|
|
18
|
+
import * as eslintPluginImport from 'eslint-plugin-import';
|
|
19
|
+
export { eslintPluginImport as pluginImport };
|
|
9
20
|
|
|
10
21
|
/**
|
|
11
22
|
* @file shared constants
|
|
@@ -34,50 +45,74 @@ declare const GLOB_DIST = "**/dist/**";
|
|
|
34
45
|
declare const GLOB_LOCKFILE: string[];
|
|
35
46
|
declare const GLOB_EXCLUDE: string[];
|
|
36
47
|
|
|
48
|
+
/**
|
|
49
|
+
* @file presets
|
|
50
|
+
*/
|
|
51
|
+
|
|
37
52
|
/**
|
|
38
53
|
* only js and ts
|
|
39
54
|
*/
|
|
40
|
-
declare const basic:
|
|
41
|
-
declare const common:
|
|
55
|
+
declare const basic: FlatESLintConfigItem[];
|
|
56
|
+
declare const common: FlatESLintConfigItem[];
|
|
42
57
|
/**
|
|
43
58
|
* all supported framework
|
|
44
59
|
*/
|
|
45
|
-
declare const all:
|
|
60
|
+
declare const all: FlatESLintConfigItem[];
|
|
46
61
|
/**
|
|
47
62
|
* custom framework support
|
|
48
63
|
*/
|
|
49
|
-
declare function ntnyq(config?:
|
|
64
|
+
declare function ntnyq(config?: FlatESLintConfigItem | FlatESLintConfigItem[], { vue: enableVue, react: enableReact, astro: enableAstro, unocss: enableUnoCSS, }?: {
|
|
50
65
|
vue?: boolean | undefined;
|
|
51
66
|
react?: boolean | undefined;
|
|
52
67
|
astro?: boolean | undefined;
|
|
53
68
|
unocss?: boolean | undefined;
|
|
54
|
-
}):
|
|
69
|
+
}): FlatESLintConfigItem[];
|
|
55
70
|
|
|
56
|
-
declare
|
|
57
|
-
declare const
|
|
58
|
-
declare const imports: FlatESLintConfig[];
|
|
59
|
-
declare const unicorn: FlatESLintConfig[];
|
|
71
|
+
declare function getVueVersion(): number;
|
|
72
|
+
declare const vue: FlatESLintConfigItem[];
|
|
60
73
|
|
|
61
|
-
declare const
|
|
74
|
+
declare const yml: FlatESLintConfigItem[];
|
|
62
75
|
|
|
63
|
-
declare
|
|
64
|
-
|
|
76
|
+
declare const react: FlatESLintConfigItem[];
|
|
77
|
+
|
|
78
|
+
declare const astro: FlatESLintConfigItem[];
|
|
79
|
+
|
|
80
|
+
declare const jsonc: FlatESLintConfigItem[];
|
|
81
|
+
declare const jsonOrder: FlatESLintConfigItem[];
|
|
65
82
|
|
|
66
|
-
declare const
|
|
83
|
+
declare const imports: FlatESLintConfigItem[];
|
|
67
84
|
|
|
68
|
-
declare const
|
|
85
|
+
declare const unocss: FlatESLintConfigItem[];
|
|
69
86
|
|
|
70
|
-
declare const
|
|
87
|
+
declare const unicorn: FlatESLintConfigItem[];
|
|
71
88
|
|
|
72
|
-
declare const
|
|
73
|
-
declare const jsonOrder: FlatESLintConfig[];
|
|
89
|
+
declare const prettier: FlatESLintConfigItem[];
|
|
74
90
|
|
|
75
|
-
declare const
|
|
91
|
+
declare const markdown: FlatESLintConfigItem[];
|
|
76
92
|
|
|
77
|
-
declare const
|
|
93
|
+
declare const comments: FlatESLintConfigItem[];
|
|
78
94
|
|
|
79
|
-
declare const
|
|
95
|
+
declare const javascript: FlatESLintConfigItem[];
|
|
96
|
+
declare const jsx: FlatESLintConfigItem[];
|
|
80
97
|
|
|
81
|
-
declare const
|
|
98
|
+
declare const typescript: FlatESLintConfigItem[];
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @see https://eslint.org/docs/latest/use/configure/configuration-files-new#globally-ignoring-files-with-ignores
|
|
102
|
+
*/
|
|
103
|
+
declare const ignores: FlatESLintConfigItem[];
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @file eslint plugins
|
|
107
|
+
*/
|
|
108
|
+
declare const pluginVue: any;
|
|
109
|
+
declare const pluginReact: any;
|
|
110
|
+
declare const pluginUnoCSS: any;
|
|
111
|
+
declare const pluginUnicorn: any;
|
|
112
|
+
declare const pluginPrettier: any;
|
|
113
|
+
declare const pluginMarkdown: any;
|
|
114
|
+
declare const pluginComments: any;
|
|
115
|
+
declare const pluginReactHooks: any;
|
|
116
|
+
declare const pluginTypescript: any;
|
|
82
117
|
|
|
83
|
-
export { GLOB_ALL_SRC, GLOB_ASTRO, 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, all, astro, basic,
|
|
118
|
+
export { GLOB_ALL_SRC, GLOB_ASTRO, 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, all, astro, basic, comments, common, getVueVersion, ignores, imports, javascript, jsonOrder, jsonc, jsx, markdown, ntnyq, pluginComments, pluginMarkdown, pluginPrettier, pluginReact, pluginReactHooks, pluginTypescript, pluginUnicorn, pluginUnoCSS, pluginVue, prettier, react, typescript, unicorn, unocss, vue, yml };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FlatESLintConfigItem } from 'eslint-define-config';
|
|
2
|
+
import * as yamlEslintParser from 'yaml-eslint-parser';
|
|
3
|
+
export { yamlEslintParser as parserYml };
|
|
4
|
+
import * as vueEslintParser from 'vue-eslint-parser';
|
|
5
|
+
export { vueEslintParser as parserVue };
|
|
6
|
+
import * as jsoncEslintParser from 'jsonc-eslint-parser';
|
|
7
|
+
export { jsoncEslintParser as parserJsonc };
|
|
8
|
+
import * as astroEslintParser from 'astro-eslint-parser';
|
|
9
|
+
export { astroEslintParser as parserAstro };
|
|
2
10
|
import * as parser from '@typescript-eslint/parser';
|
|
3
|
-
export { parser as
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
|
|
11
|
+
export { parser as parserTypescript };
|
|
12
|
+
import * as eslintPluginYml from 'eslint-plugin-yml';
|
|
13
|
+
export { eslintPluginYml as pluginYml };
|
|
14
|
+
import * as eslintPluginAstro from 'eslint-plugin-astro';
|
|
15
|
+
export { eslintPluginAstro as pluginAstro };
|
|
16
|
+
import * as eslintPluginJsonc from 'eslint-plugin-jsonc';
|
|
17
|
+
export { eslintPluginJsonc as pluginJsonc };
|
|
18
|
+
import * as eslintPluginImport from 'eslint-plugin-import';
|
|
19
|
+
export { eslintPluginImport as pluginImport };
|
|
9
20
|
|
|
10
21
|
/**
|
|
11
22
|
* @file shared constants
|
|
@@ -34,50 +45,74 @@ declare const GLOB_DIST = "**/dist/**";
|
|
|
34
45
|
declare const GLOB_LOCKFILE: string[];
|
|
35
46
|
declare const GLOB_EXCLUDE: string[];
|
|
36
47
|
|
|
48
|
+
/**
|
|
49
|
+
* @file presets
|
|
50
|
+
*/
|
|
51
|
+
|
|
37
52
|
/**
|
|
38
53
|
* only js and ts
|
|
39
54
|
*/
|
|
40
|
-
declare const basic:
|
|
41
|
-
declare const common:
|
|
55
|
+
declare const basic: FlatESLintConfigItem[];
|
|
56
|
+
declare const common: FlatESLintConfigItem[];
|
|
42
57
|
/**
|
|
43
58
|
* all supported framework
|
|
44
59
|
*/
|
|
45
|
-
declare const all:
|
|
60
|
+
declare const all: FlatESLintConfigItem[];
|
|
46
61
|
/**
|
|
47
62
|
* custom framework support
|
|
48
63
|
*/
|
|
49
|
-
declare function ntnyq(config?:
|
|
64
|
+
declare function ntnyq(config?: FlatESLintConfigItem | FlatESLintConfigItem[], { vue: enableVue, react: enableReact, astro: enableAstro, unocss: enableUnoCSS, }?: {
|
|
50
65
|
vue?: boolean | undefined;
|
|
51
66
|
react?: boolean | undefined;
|
|
52
67
|
astro?: boolean | undefined;
|
|
53
68
|
unocss?: boolean | undefined;
|
|
54
|
-
}):
|
|
69
|
+
}): FlatESLintConfigItem[];
|
|
55
70
|
|
|
56
|
-
declare
|
|
57
|
-
declare const
|
|
58
|
-
declare const imports: FlatESLintConfig[];
|
|
59
|
-
declare const unicorn: FlatESLintConfig[];
|
|
71
|
+
declare function getVueVersion(): number;
|
|
72
|
+
declare const vue: FlatESLintConfigItem[];
|
|
60
73
|
|
|
61
|
-
declare const
|
|
74
|
+
declare const yml: FlatESLintConfigItem[];
|
|
62
75
|
|
|
63
|
-
declare
|
|
64
|
-
|
|
76
|
+
declare const react: FlatESLintConfigItem[];
|
|
77
|
+
|
|
78
|
+
declare const astro: FlatESLintConfigItem[];
|
|
79
|
+
|
|
80
|
+
declare const jsonc: FlatESLintConfigItem[];
|
|
81
|
+
declare const jsonOrder: FlatESLintConfigItem[];
|
|
65
82
|
|
|
66
|
-
declare const
|
|
83
|
+
declare const imports: FlatESLintConfigItem[];
|
|
67
84
|
|
|
68
|
-
declare const
|
|
85
|
+
declare const unocss: FlatESLintConfigItem[];
|
|
69
86
|
|
|
70
|
-
declare const
|
|
87
|
+
declare const unicorn: FlatESLintConfigItem[];
|
|
71
88
|
|
|
72
|
-
declare const
|
|
73
|
-
declare const jsonOrder: FlatESLintConfig[];
|
|
89
|
+
declare const prettier: FlatESLintConfigItem[];
|
|
74
90
|
|
|
75
|
-
declare const
|
|
91
|
+
declare const markdown: FlatESLintConfigItem[];
|
|
76
92
|
|
|
77
|
-
declare const
|
|
93
|
+
declare const comments: FlatESLintConfigItem[];
|
|
78
94
|
|
|
79
|
-
declare const
|
|
95
|
+
declare const javascript: FlatESLintConfigItem[];
|
|
96
|
+
declare const jsx: FlatESLintConfigItem[];
|
|
80
97
|
|
|
81
|
-
declare const
|
|
98
|
+
declare const typescript: FlatESLintConfigItem[];
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @see https://eslint.org/docs/latest/use/configure/configuration-files-new#globally-ignoring-files-with-ignores
|
|
102
|
+
*/
|
|
103
|
+
declare const ignores: FlatESLintConfigItem[];
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @file eslint plugins
|
|
107
|
+
*/
|
|
108
|
+
declare const pluginVue: any;
|
|
109
|
+
declare const pluginReact: any;
|
|
110
|
+
declare const pluginUnoCSS: any;
|
|
111
|
+
declare const pluginUnicorn: any;
|
|
112
|
+
declare const pluginPrettier: any;
|
|
113
|
+
declare const pluginMarkdown: any;
|
|
114
|
+
declare const pluginComments: any;
|
|
115
|
+
declare const pluginReactHooks: any;
|
|
116
|
+
declare const pluginTypescript: any;
|
|
82
117
|
|
|
83
|
-
export { GLOB_ALL_SRC, GLOB_ASTRO, 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, all, astro, basic,
|
|
118
|
+
export { GLOB_ALL_SRC, GLOB_ASTRO, 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, all, astro, basic, comments, common, getVueVersion, ignores, imports, javascript, jsonOrder, jsonc, jsx, markdown, ntnyq, pluginComments, pluginMarkdown, pluginPrettier, pluginReact, pluginReactHooks, pluginTypescript, pluginUnicorn, pluginUnoCSS, pluginVue, prettier, react, typescript, unicorn, unocss, vue, yml };
|