@sxzz/eslint-config 3.12.0 → 3.13.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/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { FlatESLintConfig } from 'eslint-define-config';
1
+ import * as eslint from 'eslint';
2
+ import { Linter } from 'eslint';
2
3
  import * as _unocss_eslint_plugin from '@unocss/eslint-plugin';
3
4
  import * as eslint_plugin_n from 'eslint-plugin-n';
4
5
  import * as eslint_plugin_antfu from 'eslint-plugin-antfu';
@@ -6,8 +7,6 @@ import * as eslintPluginImportX from 'eslint-plugin-import-x';
6
7
  export { eslintPluginImportX as pluginImport };
7
8
  import * as eslintPluginJsonc from 'eslint-plugin-jsonc';
8
9
  export { eslintPluginJsonc as pluginJsonc };
9
- import * as eslintPluginUnusedImports from 'eslint-plugin-unused-imports';
10
- export { eslintPluginUnusedImports as pluginUnusedImports };
11
10
  import * as eslintPluginYml from 'eslint-plugin-yml';
12
11
  export { eslintPluginYml as pluginYml };
13
12
  import * as vueEslintParser from 'vue-eslint-parser';
@@ -19,42 +18,42 @@ export { jsoncEslintParser as parserJsonc };
19
18
  export { default as configCommand } from 'eslint-plugin-command/config';
20
19
  export { default as tseslint } from 'typescript-eslint';
21
20
 
22
- declare const command: FlatESLintConfig[];
21
+ declare const command: eslint.Linter.FlatConfig<eslint.Linter.RulesRecord>[];
23
22
 
24
- declare const comments: FlatESLintConfig[];
23
+ declare const comments: Linter.FlatConfig[];
25
24
 
26
- declare const ignores: FlatESLintConfig[];
25
+ declare const ignores: Linter.FlatConfig[];
27
26
 
28
- declare const imports: FlatESLintConfig[];
27
+ declare const imports: Linter.FlatConfig[];
29
28
 
30
29
  declare const restrictedSyntaxJs: string[];
31
- declare const javascript: FlatESLintConfig[];
30
+ declare const javascript: Linter.FlatConfig[];
32
31
 
33
- declare const jsonc: FlatESLintConfig[];
32
+ declare const jsonc: Linter.FlatConfig[];
34
33
 
35
- declare const markdown: FlatESLintConfig[];
34
+ declare const markdown: Linter.FlatConfig[];
36
35
 
37
- declare const node: FlatESLintConfig[];
36
+ declare const node: Linter.FlatConfig[];
38
37
 
39
- declare const sortKeys: FlatESLintConfig[];
38
+ declare const sortKeys: Linter.FlatConfig[];
40
39
 
41
- declare const prettier: FlatESLintConfig[];
40
+ declare const prettier: Linter.FlatConfig[];
42
41
 
43
- declare const sortPackageJson: FlatESLintConfig[];
44
- declare const sortTsconfig: FlatESLintConfig[];
42
+ declare const sortPackageJson: Linter.FlatConfig[];
43
+ declare const sortTsconfig: Linter.FlatConfig[];
45
44
 
46
- declare const typescriptCore: FlatESLintConfig[];
47
- declare const typescript: FlatESLintConfig[];
45
+ declare const typescriptCore: Linter.FlatConfig<Linter.RulesRecord>[];
46
+ declare const typescript: Linter.FlatConfig[];
48
47
 
49
- declare const unicorn: FlatESLintConfig[];
48
+ declare const unicorn: Linter.FlatConfig[];
50
49
 
51
- declare const unocss: FlatESLintConfig[];
50
+ declare const unocss: Linter.FlatConfig[];
52
51
 
53
52
  declare function getVueVersion(): number;
54
- declare const reactivityTransform: FlatESLintConfig[];
55
- declare const vue: FlatESLintConfig[];
53
+ declare const reactivityTransform: Linter.FlatConfig[];
54
+ declare const vue: Linter.FlatConfig[];
56
55
 
57
- declare const yml: FlatESLintConfig[];
56
+ declare const yml: Linter.FlatConfig[];
58
57
 
59
58
  declare const isInEditor: boolean;
60
59
  declare const hasTypeScript: boolean;
@@ -98,15 +97,16 @@ declare const pluginPerfectionist: any;
98
97
  declare const pluginUnocss: typeof _unocss_eslint_plugin.default;
99
98
  declare const pluginPrettier: any;
100
99
  declare const configPrettier: any;
100
+ declare const pluginUnusedImports: any;
101
101
 
102
102
  /** Ignore common files and include javascript support */
103
- declare const presetJavaScript: FlatESLintConfig[];
103
+ declare const presetJavaScript: Linter.FlatConfig<Linter.RulesRecord>[];
104
104
  /** Includes basic json(c) file support and sorting json keys */
105
- declare const presetJsonc: FlatESLintConfig[];
105
+ declare const presetJsonc: Linter.FlatConfig<Linter.RulesRecord>[];
106
106
  /** Includes markdown, yaml + `presetJsonc` support */
107
- declare const presetLangsExtensions: FlatESLintConfig[];
107
+ declare const presetLangsExtensions: Linter.FlatConfig<Linter.RulesRecord>[];
108
108
  /** Includes `presetJavaScript` and typescript support */
109
- declare const presetBasic: FlatESLintConfig[];
109
+ declare const presetBasic: Linter.FlatConfig<Linter.RulesRecord>[];
110
110
  /**
111
111
  * Includes
112
112
  * - `presetBasic` (JS+TS) support
@@ -115,7 +115,7 @@ declare const presetBasic: FlatESLintConfig[];
115
115
  * - UnoCSS support (`uno.config.ts` is required)
116
116
  * - Prettier support
117
117
  */
118
- declare const presetAll: FlatESLintConfig[];
118
+ declare const presetAll: Linter.FlatConfig<Linter.RulesRecord>[];
119
119
 
120
120
  /**
121
121
  *
@@ -123,7 +123,7 @@ declare const presetAll: FlatESLintConfig[];
123
123
  * @param features
124
124
  * @returns
125
125
  */
126
- declare function sxzz(config?: FlatESLintConfig | FlatESLintConfig[], { command: enableCommand, markdown: enableMarkdown, prettier: enablePrettier, unocss: enableUnocss, vue: enableVue, }?: Partial<{
126
+ declare function sxzz(config?: Linter.FlatConfig | Linter.FlatConfig[], { command: enableCommand, markdown: enableMarkdown, prettier: enablePrettier, unocss: enableUnocss, vue: enableVue, }?: Partial<{
127
127
  /** Vue support. Auto-enable. */
128
128
  vue: boolean;
129
129
  /** Prettier support. Default: true */
@@ -134,6 +134,6 @@ declare function sxzz(config?: FlatESLintConfig | FlatESLintConfig[], { command:
134
134
  unocss: boolean;
135
135
  sortKeys: boolean;
136
136
  command: boolean;
137
- }>): FlatESLintConfig[];
137
+ }>): Linter.FlatConfig[];
138
138
 
139
- 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, presetAll as all, presetBasic as basic, command, comments, configPrettier, getVueVersion, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, node, pluginAntfu, pluginComments, pluginMarkdown, pluginNode, pluginPerfectionist, pluginPrettier, pluginUnicorn, pluginUnocss, pluginVue, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, restrictedSyntaxJs, sortKeys, sortPackageJson, sortTsconfig, sxzz, typescript, typescriptCore, unicorn, unocss, vue, yml };
139
+ 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, presetAll as all, presetBasic as basic, command, comments, configPrettier, getVueVersion, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, node, pluginAntfu, pluginComments, pluginMarkdown, pluginNode, pluginPerfectionist, pluginPrettier, pluginUnicorn, pluginUnocss, pluginUnusedImports, pluginVue, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, restrictedSyntaxJs, sortKeys, sortPackageJson, sortTsconfig, sxzz, typescript, typescriptCore, unicorn, unocss, vue, yml };
package/dist/index.js CHANGED
@@ -10,9 +10,9 @@ import * as _pluginPerfectionist from "eslint-plugin-perfectionist";
10
10
  import * as _pluginUnocss from "@unocss/eslint-plugin";
11
11
  import * as _pluginPrettier from "eslint-plugin-prettier";
12
12
  import * as _configPrettier from "eslint-config-prettier";
13
+ import * as _pluginUnusedImports from "eslint-plugin-unused-imports";
13
14
  import * as pluginImport from "eslint-plugin-import-x";
14
15
  import * as pluginJsonc from "eslint-plugin-jsonc";
15
- import * as pluginUnusedImports from "eslint-plugin-unused-imports";
16
16
  import * as pluginYml from "eslint-plugin-yml";
17
17
  import * as parserVue from "vue-eslint-parser";
18
18
  import * as parserYml from "yaml-eslint-parser";
@@ -32,6 +32,7 @@ var pluginPerfectionist = /* @__PURE__ */ interopDefault(_pluginPerfectionist);
32
32
  var pluginUnocss = /* @__PURE__ */ interopDefault(_pluginUnocss);
33
33
  var pluginPrettier = /* @__PURE__ */ interopDefault(_pluginPrettier);
34
34
  var configPrettier = /* @__PURE__ */ interopDefault(_configPrettier);
35
+ var pluginUnusedImports = /* @__PURE__ */ interopDefault(_pluginUnusedImports);
35
36
 
36
37
  // src/configs/command.ts
37
38
  var command = [default2()];
@@ -790,7 +791,9 @@ var unicorn = [
790
791
  ];
791
792
 
792
793
  // src/configs/unocss.ts
793
- var unocss = [pluginUnocss.configs.flat];
794
+ var unocss = [
795
+ pluginUnocss.configs.flat
796
+ ];
794
797
 
795
798
  // src/configs/vue.ts
796
799
  import process2 from "node:process";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sxzz/eslint-config",
3
- "version": "3.12.0",
3
+ "version": "3.13.0",
4
4
  "description": "ESLint config for @sxzz.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -27,37 +27,37 @@
27
27
  "eslint": "^8.56.0 || ^9.0.0"
28
28
  },
29
29
  "dependencies": {
30
- "@unocss/eslint-plugin": "^0.60.4",
30
+ "@unocss/eslint-plugin": "^0.61.0",
31
31
  "eslint-config-prettier": "^9.1.0",
32
- "eslint-define-config": "^2.1.0",
33
32
  "eslint-plugin-antfu": "^2.3.3",
34
33
  "eslint-plugin-command": "^0.2.3",
35
34
  "eslint-plugin-eslint-comments": "^3.2.0",
36
35
  "eslint-plugin-import-x": "^0.5.1",
37
36
  "eslint-plugin-jsonc": "^2.16.0",
38
37
  "eslint-plugin-markdown": "^5.0.0",
39
- "eslint-plugin-n": "^17.7.0",
40
- "eslint-plugin-perfectionist": "^2.10.0",
38
+ "eslint-plugin-n": "^17.9.0",
39
+ "eslint-plugin-perfectionist": "^2.11.0",
41
40
  "eslint-plugin-prettier": "^5.1.3",
42
41
  "eslint-plugin-unicorn": "^53.0.0",
43
42
  "eslint-plugin-unused-imports": "^4.0.0",
44
43
  "eslint-plugin-vue": "^9.26.0",
45
44
  "eslint-plugin-yml": "^1.14.0",
46
- "globals": "^15.3.0",
45
+ "globals": "^15.4.0",
47
46
  "jsonc-eslint-parser": "^2.4.0",
48
47
  "local-pkg": "^0.5.0",
49
- "prettier": "^3.3.0",
50
- "typescript-eslint": "^7.11.0",
48
+ "prettier": "^3.3.2",
49
+ "typescript-eslint": "^7.13.0",
51
50
  "vue-eslint-parser": "^9.4.3",
52
51
  "yaml-eslint-parser": "^1.2.3"
53
52
  },
54
53
  "devDependencies": {
55
54
  "@sxzz/prettier-config": "^2.0.2",
56
- "@types/node": "^20.14.0",
55
+ "@types/eslint": "^8.56.10",
56
+ "@types/node": "^20.14.2",
57
57
  "bumpp": "^9.4.1",
58
58
  "eslint": "^9.4.0",
59
- "tsup": "^8.0.2",
60
- "tsx": "^4.11.0",
59
+ "tsup": "^8.1.0",
60
+ "tsx": "^4.15.4",
61
61
  "typescript": "^5.4.5"
62
62
  },
63
63
  "engines": {