@ntnyq/eslint-config 2.0.0-beta.2 → 2.0.0-beta.21
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 +20 -0
- package/dist/index.cjs +1327 -0
- package/dist/index.d.cts +113 -0
- package/dist/index.d.ts +113 -0
- package/dist/index.js +1226 -0
- package/package.json +70 -41
- package/index.js +0 -9
- package/lib/astro.js +0 -24
- package/lib/eslint-comments.js +0 -14
- package/lib/js.js +0 -156
- package/lib/jsonc.js +0 -115
- package/lib/markdown.js +0 -44
- package/lib/presets.js +0 -24
- package/lib/prettier.js +0 -19
- package/lib/shared.js +0 -61
- package/lib/ts.js +0 -70
- package/lib/vue.js +0 -23
- package/lib/yml.js +0 -22
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { FlatESLintConfigItem } from 'eslint-define-config';
|
|
2
|
+
import * as eslintPluginYml from 'eslint-plugin-yml';
|
|
3
|
+
export { eslintPluginYml as pluginYaml };
|
|
4
|
+
import * as eslintPluginAstro from 'eslint-plugin-astro';
|
|
5
|
+
export { eslintPluginAstro as pluginAstro };
|
|
6
|
+
export { default as pluginNode } from 'eslint-plugin-n';
|
|
7
|
+
export { default as pluginImport } from 'eslint-plugin-i';
|
|
8
|
+
export { default as pluginVue } from 'eslint-plugin-vue';
|
|
9
|
+
export { default as pluginJsonc } from 'eslint-plugin-jsonc';
|
|
10
|
+
export { default as pluginReact } from 'eslint-plugin-react';
|
|
11
|
+
export { default as pluginUnoCSS } from '@unocss/eslint-plugin';
|
|
12
|
+
export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
|
|
13
|
+
export { default as pluginPrettier } from 'eslint-plugin-prettier';
|
|
14
|
+
export { default as pluginMarkdown } from 'eslint-plugin-markdown';
|
|
15
|
+
export { default as pluginReactHooks } from 'eslint-plugin-react-hooks';
|
|
16
|
+
export { default as pluginComments } from 'eslint-plugin-eslint-comments';
|
|
17
|
+
export { default as pluginTs } from '@typescript-eslint/eslint-plugin';
|
|
18
|
+
export { default as parserYaml } from 'yaml-eslint-parser';
|
|
19
|
+
export { default as parserVue } from 'vue-eslint-parser';
|
|
20
|
+
export { default as parserJsonc } from 'jsonc-eslint-parser';
|
|
21
|
+
export { default as parserAstro } from 'astro-eslint-parser';
|
|
22
|
+
import * as parser from '@typescript-eslint/parser';
|
|
23
|
+
export { parser as parserTs };
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @file shared constants
|
|
27
|
+
*/
|
|
28
|
+
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
29
|
+
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
30
|
+
declare const GLOB_JS = "**/*.?([cm])js";
|
|
31
|
+
declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
32
|
+
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
33
|
+
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
34
|
+
declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
35
|
+
declare const GLOB_CSS = "**/*.css";
|
|
36
|
+
declare const GLOB_LESS = "**/*.less";
|
|
37
|
+
declare const GLOB_SCSS = "**/*.scss";
|
|
38
|
+
declare const GLOB_JSON = "**/*.json";
|
|
39
|
+
declare const GLOB_JSON5 = "**/*.json5";
|
|
40
|
+
declare const GLOB_JSONC = "**/*.jsonc";
|
|
41
|
+
declare const GLOB_VUE = "**/*.vue";
|
|
42
|
+
declare const GLOB_ASTRO = "**/*.astro";
|
|
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
|
+
* only js and ts
|
|
58
|
+
*/
|
|
59
|
+
declare const basic: FlatESLintConfigItem[];
|
|
60
|
+
declare const common: FlatESLintConfigItem[];
|
|
61
|
+
/**
|
|
62
|
+
* all supported framework
|
|
63
|
+
*/
|
|
64
|
+
declare const all: FlatESLintConfigItem[];
|
|
65
|
+
/**
|
|
66
|
+
* custom framework support
|
|
67
|
+
*/
|
|
68
|
+
declare function ntnyq(config?: FlatESLintConfigItem | FlatESLintConfigItem[], { vue: enableVue, react: enableReact, astro: enableAstro, unocss: enableUnoCSS, }?: {
|
|
69
|
+
vue?: boolean | undefined;
|
|
70
|
+
react?: boolean | undefined;
|
|
71
|
+
astro?: boolean | undefined;
|
|
72
|
+
unocss?: boolean | undefined;
|
|
73
|
+
}): FlatESLintConfigItem[];
|
|
74
|
+
|
|
75
|
+
declare function getVueVersion(): number;
|
|
76
|
+
declare const vue: FlatESLintConfigItem[];
|
|
77
|
+
|
|
78
|
+
declare const yml: FlatESLintConfigItem[];
|
|
79
|
+
|
|
80
|
+
declare const node: FlatESLintConfigItem[];
|
|
81
|
+
|
|
82
|
+
declare const sortPackageJson: FlatESLintConfigItem[];
|
|
83
|
+
declare const sortTsConfig: FlatESLintConfigItem[];
|
|
84
|
+
|
|
85
|
+
declare const react: FlatESLintConfigItem[];
|
|
86
|
+
|
|
87
|
+
declare const astro: FlatESLintConfigItem[];
|
|
88
|
+
|
|
89
|
+
declare const jsonc: FlatESLintConfigItem[];
|
|
90
|
+
|
|
91
|
+
declare const imports: FlatESLintConfigItem[];
|
|
92
|
+
|
|
93
|
+
declare const unocss: FlatESLintConfigItem[];
|
|
94
|
+
|
|
95
|
+
declare const unicorn: FlatESLintConfigItem[];
|
|
96
|
+
|
|
97
|
+
declare const prettier: FlatESLintConfigItem[];
|
|
98
|
+
|
|
99
|
+
declare const markdown: FlatESLintConfigItem[];
|
|
100
|
+
|
|
101
|
+
declare const comments: FlatESLintConfigItem[];
|
|
102
|
+
|
|
103
|
+
declare const javascript: FlatESLintConfigItem[];
|
|
104
|
+
declare const jsx: FlatESLintConfigItem[];
|
|
105
|
+
|
|
106
|
+
declare const typescript: FlatESLintConfigItem[];
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @see https://eslint.org/docs/latest/use/configure/configuration-files-new#globally-ignoring-files-with-ignores
|
|
110
|
+
*/
|
|
111
|
+
declare const ignores: FlatESLintConfigItem[];
|
|
112
|
+
|
|
113
|
+
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, jsonc, jsx, markdown, node, ntnyq, prettier, react, sortPackageJson, sortTsConfig, typescript, unicorn, unocss, vue, yml };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { FlatESLintConfigItem } from 'eslint-define-config';
|
|
2
|
+
import * as eslintPluginYml from 'eslint-plugin-yml';
|
|
3
|
+
export { eslintPluginYml as pluginYaml };
|
|
4
|
+
import * as eslintPluginAstro from 'eslint-plugin-astro';
|
|
5
|
+
export { eslintPluginAstro as pluginAstro };
|
|
6
|
+
export { default as pluginNode } from 'eslint-plugin-n';
|
|
7
|
+
export { default as pluginImport } from 'eslint-plugin-i';
|
|
8
|
+
export { default as pluginVue } from 'eslint-plugin-vue';
|
|
9
|
+
export { default as pluginJsonc } from 'eslint-plugin-jsonc';
|
|
10
|
+
export { default as pluginReact } from 'eslint-plugin-react';
|
|
11
|
+
export { default as pluginUnoCSS } from '@unocss/eslint-plugin';
|
|
12
|
+
export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
|
|
13
|
+
export { default as pluginPrettier } from 'eslint-plugin-prettier';
|
|
14
|
+
export { default as pluginMarkdown } from 'eslint-plugin-markdown';
|
|
15
|
+
export { default as pluginReactHooks } from 'eslint-plugin-react-hooks';
|
|
16
|
+
export { default as pluginComments } from 'eslint-plugin-eslint-comments';
|
|
17
|
+
export { default as pluginTs } from '@typescript-eslint/eslint-plugin';
|
|
18
|
+
export { default as parserYaml } from 'yaml-eslint-parser';
|
|
19
|
+
export { default as parserVue } from 'vue-eslint-parser';
|
|
20
|
+
export { default as parserJsonc } from 'jsonc-eslint-parser';
|
|
21
|
+
export { default as parserAstro } from 'astro-eslint-parser';
|
|
22
|
+
import * as parser from '@typescript-eslint/parser';
|
|
23
|
+
export { parser as parserTs };
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @file shared constants
|
|
27
|
+
*/
|
|
28
|
+
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
29
|
+
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
30
|
+
declare const GLOB_JS = "**/*.?([cm])js";
|
|
31
|
+
declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
32
|
+
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
33
|
+
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
34
|
+
declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
35
|
+
declare const GLOB_CSS = "**/*.css";
|
|
36
|
+
declare const GLOB_LESS = "**/*.less";
|
|
37
|
+
declare const GLOB_SCSS = "**/*.scss";
|
|
38
|
+
declare const GLOB_JSON = "**/*.json";
|
|
39
|
+
declare const GLOB_JSON5 = "**/*.json5";
|
|
40
|
+
declare const GLOB_JSONC = "**/*.jsonc";
|
|
41
|
+
declare const GLOB_VUE = "**/*.vue";
|
|
42
|
+
declare const GLOB_ASTRO = "**/*.astro";
|
|
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
|
+
* only js and ts
|
|
58
|
+
*/
|
|
59
|
+
declare const basic: FlatESLintConfigItem[];
|
|
60
|
+
declare const common: FlatESLintConfigItem[];
|
|
61
|
+
/**
|
|
62
|
+
* all supported framework
|
|
63
|
+
*/
|
|
64
|
+
declare const all: FlatESLintConfigItem[];
|
|
65
|
+
/**
|
|
66
|
+
* custom framework support
|
|
67
|
+
*/
|
|
68
|
+
declare function ntnyq(config?: FlatESLintConfigItem | FlatESLintConfigItem[], { vue: enableVue, react: enableReact, astro: enableAstro, unocss: enableUnoCSS, }?: {
|
|
69
|
+
vue?: boolean | undefined;
|
|
70
|
+
react?: boolean | undefined;
|
|
71
|
+
astro?: boolean | undefined;
|
|
72
|
+
unocss?: boolean | undefined;
|
|
73
|
+
}): FlatESLintConfigItem[];
|
|
74
|
+
|
|
75
|
+
declare function getVueVersion(): number;
|
|
76
|
+
declare const vue: FlatESLintConfigItem[];
|
|
77
|
+
|
|
78
|
+
declare const yml: FlatESLintConfigItem[];
|
|
79
|
+
|
|
80
|
+
declare const node: FlatESLintConfigItem[];
|
|
81
|
+
|
|
82
|
+
declare const sortPackageJson: FlatESLintConfigItem[];
|
|
83
|
+
declare const sortTsConfig: FlatESLintConfigItem[];
|
|
84
|
+
|
|
85
|
+
declare const react: FlatESLintConfigItem[];
|
|
86
|
+
|
|
87
|
+
declare const astro: FlatESLintConfigItem[];
|
|
88
|
+
|
|
89
|
+
declare const jsonc: FlatESLintConfigItem[];
|
|
90
|
+
|
|
91
|
+
declare const imports: FlatESLintConfigItem[];
|
|
92
|
+
|
|
93
|
+
declare const unocss: FlatESLintConfigItem[];
|
|
94
|
+
|
|
95
|
+
declare const unicorn: FlatESLintConfigItem[];
|
|
96
|
+
|
|
97
|
+
declare const prettier: FlatESLintConfigItem[];
|
|
98
|
+
|
|
99
|
+
declare const markdown: FlatESLintConfigItem[];
|
|
100
|
+
|
|
101
|
+
declare const comments: FlatESLintConfigItem[];
|
|
102
|
+
|
|
103
|
+
declare const javascript: FlatESLintConfigItem[];
|
|
104
|
+
declare const jsx: FlatESLintConfigItem[];
|
|
105
|
+
|
|
106
|
+
declare const typescript: FlatESLintConfigItem[];
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @see https://eslint.org/docs/latest/use/configure/configuration-files-new#globally-ignoring-files-with-ignores
|
|
110
|
+
*/
|
|
111
|
+
declare const ignores: FlatESLintConfigItem[];
|
|
112
|
+
|
|
113
|
+
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, jsonc, jsx, markdown, node, ntnyq, prettier, react, sortPackageJson, sortTsConfig, typescript, unicorn, unocss, vue, yml };
|