@ntnyq/eslint-config 2.0.0-beta.9 → 2.0.1

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.
@@ -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,20 +1,37 @@
1
+ import * as eslint_define_config from 'eslint-define-config';
1
2
  import { FlatESLintConfig } from 'eslint-define-config';
2
- export { default as tsParser } from '@typescript-eslint/parser';
3
- export { default as tsPlugin } from '@typescript-eslint/eslint-plugin';
4
- export { default as vueParser } from 'vue-eslint-parser';
5
- export { default as vuePlugin } from 'eslint-plugin-vue';
6
- export { default as reactPlugin } from 'eslint-plugin-react';
7
- export { default as reactHooksPlugin } from 'eslint-plugin-react-hooks';
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 shared constants
27
+ * @file globs constants
11
28
  */
12
- declare const GLOB_SRC_EXT = "?([mt])[jt]s?(x)";
13
- declare const GLOB_SRC = "**/*.?([mt])[jt]s?(x)";
14
- declare const GLOB_JS = "**/*.?([mt])js";
15
- declare const GLOB_JSX = "**/*.?([mt])jsx";
16
- declare const GLOB_TS = "**/*.?([mt])ts";
17
- declare const GLOB_TSX = "**/*.?([mt])tsx";
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";
18
35
  declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
19
36
  declare const GLOB_CSS = "**/*.css";
20
37
  declare const GLOB_LESS = "**/*.less";
@@ -23,7 +40,6 @@ declare const GLOB_JSON = "**/*.json";
23
40
  declare const GLOB_JSON5 = "**/*.json5";
24
41
  declare const GLOB_JSONC = "**/*.jsonc";
25
42
  declare const GLOB_VUE = "**/*.vue";
26
- declare const GLOB_ASTRO = "**/*.astro";
27
43
  declare const GLOB_MARKDOWN = "**/*.md";
28
44
  declare const GLOB_YAML = "**/*.y?(a)ml";
29
45
  declare const GLOB_HTML = "**/*.htm?(l)";
@@ -34,47 +50,83 @@ declare const GLOB_LOCKFILE: string[];
34
50
  declare const GLOB_EXCLUDE: string[];
35
51
 
36
52
  /**
37
- * no framework
53
+ * @file presets
54
+ */
55
+
56
+ /**
57
+ * JavaScript preset
38
58
  */
39
- declare const basic: FlatESLintConfig[];
59
+ declare const presetJavaScript: FlatESLintConfig[];
40
60
  /**
41
- * all supported framework
61
+ * JavaScript & TypeScript
42
62
  */
43
- declare const all: FlatESLintConfig[];
63
+ declare const presetBasic: FlatESLintConfig[];
44
64
  /**
45
- * custom framework support
65
+ * JSON and sort json keys
46
66
  */
47
- declare function ntnyq(config?: FlatESLintConfig | FlatESLintConfig[], { vue: enableVue, react: enableReact, astro: enableAstro, prettier: enablePrettier, markdown: enableMarkdown, }?: {
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, }?: {
48
81
  vue?: boolean | undefined;
49
- react?: boolean | undefined;
50
- astro?: boolean | undefined;
82
+ unocss?: boolean | undefined;
51
83
  prettier?: boolean | undefined;
52
84
  markdown?: boolean | undefined;
53
85
  }): FlatESLintConfig[];
54
86
 
55
- declare const js: FlatESLintConfig[];
56
- declare const jsx: FlatESLintConfig[];
57
- declare const imports: FlatESLintConfig[];
58
- declare const unicorn: FlatESLintConfig[];
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[];
59
91
 
60
- declare const ts: FlatESLintConfig[];
92
+ declare const node: eslint_define_config.FlatESLintConfig[];
61
93
 
62
- declare function getVueVersion(): number;
63
- declare const vue: FlatESLintConfig[];
94
+ declare const jsdoc: eslint_define_config.FlatESLintConfig[];
95
+
96
+ declare const imports: eslint_define_config.FlatESLintConfig[];
64
97
 
65
- declare const yml: FlatESLintConfig[];
98
+ declare const unicorn: eslint_define_config.FlatESLintConfig[];
66
99
 
67
- declare const react: FlatESLintConfig[];
100
+ declare const prettier: FlatESLintConfig[];
68
101
 
69
- declare const astro: FlatESLintConfig[];
102
+ declare const comments: eslint_define_config.FlatESLintConfig[];
70
103
 
71
- declare const jsonc: FlatESLintConfig[];
72
- declare const pkgOrder: FlatESLintConfig[];
104
+ declare const javascript: eslint_define_config.FlatESLintConfig[];
105
+ declare const jsx: eslint_define_config.FlatESLintConfig[];
73
106
 
74
- declare const prettier: FlatESLintConfig[];
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[];
75
116
 
76
- declare const markdown: FlatESLintConfig[];
117
+ declare const jsonc: eslint_define_config.FlatESLintConfig[];
77
118
 
78
- declare const eslintComments: FlatESLintConfig[];
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>;
79
131
 
80
- 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, eslintComments, getVueVersion, imports, js, jsonc, jsx, markdown, ntnyq, pkgOrder, prettier, react, ts, unicorn, vue, yml };
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 };