@infernodesign/eslint-config 1.6.0 → 1.8.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/cli.js CHANGED
@@ -9,7 +9,7 @@ import parse from "parse-gitignore";
9
9
  import { execSync } from "node:child_process";
10
10
 
11
11
  //#region package.json
12
- var version = "1.6.0";
12
+ var version = "1.8.0";
13
13
 
14
14
  //#endregion
15
15
  //#region src/cli/constants.ts
package/dist/index.d.ts CHANGED
@@ -18334,10 +18334,11 @@ declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
18334
18334
  } ? U : T>;
18335
18335
  declare function isInEditorEnv(): boolean;
18336
18336
  declare function isInGitHooksOrLintStaged(): boolean;
18337
+ declare function isInVSCodeESLintExtension(): boolean;
18337
18338
  declare function isPackageInScope(name: string): boolean;
18338
18339
  declare function normalizeRules(rules: Record<string, any>): Record<string, any>;
18339
18340
  declare function renamePluginInConfigs(configs: TypedFlatConfigItem[], map: Record<string, string>): TypedFlatConfigItem[];
18340
18341
  declare function renameRules(rules: Record<string, any>, map: Record<string, string>): Record<string, any>;
18341
18342
  declare function toArray<T>(value: T | T[]): T[];
18342
18343
  //#endregion
18343
- export { Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STORYBOOK, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSX, OptionsJSXA11y, OptionsNextjs, OptionsOverrides, OptionsProjectType, OptionsRegExp, OptionsStylistic, OptionsTailwindcss, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, StylisticOptions, TypedFlatConfigItem, astro, combine, command, comments, inferno as default, inferno, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, normalizeRules, packageExportsSortOrder, packageSortOrder, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, storybook, stylistic, svelte, tailwindcss, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
18344
+ export { Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STORYBOOK, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSX, OptionsJSXA11y, OptionsNextjs, OptionsOverrides, OptionsProjectType, OptionsRegExp, OptionsStylistic, OptionsTailwindcss, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, StylisticOptions, TypedFlatConfigItem, astro, combine, command, comments, inferno as default, inferno, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isInVSCodeESLintExtension, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, normalizeRules, packageExportsSortOrder, packageSortOrder, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, storybook, stylistic, svelte, tailwindcss, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
package/dist/index.js CHANGED
@@ -140,6 +140,10 @@ async function ensurePackages(packages) {
140
140
  if (process.env.CI || process.stdout.isTTY === false || isCwdInScope === false) return;
141
141
  const nonExistingPackages = packages.filter((i) => i && !isPackageInScope(i));
142
142
  if (nonExistingPackages.length === 0) return;
143
+ if (isInVSCodeESLintExtension()) {
144
+ console.error(`[@infernodesign/eslint-config] Detected running in VSCode ESLint extension, some required NPM dependencies are missing and must be manually installed: ${nonExistingPackages.join(", ")}`);
145
+ return;
146
+ }
143
147
  if (await (await import("@clack/prompts")).confirm({ message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?` })) await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, { dev: true }));
144
148
  }
145
149
  async function interopDefault(m) {
@@ -147,12 +151,17 @@ async function interopDefault(m) {
147
151
  return resolved.default || resolved;
148
152
  }
149
153
  function isInEditorEnv() {
150
- if (process.env.CI) return false;
151
- if (isInGitHooksOrLintStaged()) return false;
152
- return !!(process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.TERM_PROGRAM === "vscode" || process.env.TERM_PROGRAM === "cursor" || process.env.TERM_PROGRAM === "windsurf" || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM);
154
+ if (process.env.CI || isInGitHooksOrLintStaged()) return false;
155
+ return !!(process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM);
153
156
  }
154
157
  function isInGitHooksOrLintStaged() {
155
- return !!(process.env.GIT_PARAMS || process.env.VSCODE_GIT_COMMAND || process.env.npm_lifecycle_script?.startsWith("lint-staged"));
158
+ return !!(process.env.GIT_PARAMS || process.env.VSCODE_GIT_COMMAND || process.env.npm_lifecycle_script?.startsWith("lint-staged") || process.env.npm_lifecycle_script?.startsWith("lefthook pre-commit"));
159
+ }
160
+ /**
161
+ * Check if running in VSCode ESLint extension host process
162
+ */
163
+ function isInVSCodeESLintExtension() {
164
+ return !!(typeof process.send === "function" && (process.env.VSCODE_PID || process.env.VSCODE_CWD) || process.env.VSCODE_ESL_DEBUG);
156
165
  }
157
166
  function isPackageInScope(name) {
158
167
  return isPackageExists(name, { paths: [scopeUrl] });
@@ -1153,6 +1162,15 @@ async function perfectionist() {
1153
1162
  specialCharacters: "keep",
1154
1163
  type: "natural"
1155
1164
  }],
1165
+ "perfectionist/sort-interfaces": ["error", {
1166
+ fallbackSort: { type: "unsorted" },
1167
+ newlinesBetween: "ignore",
1168
+ order: "asc",
1169
+ partitionByComment: true,
1170
+ partitionByNewLine: true,
1171
+ specialCharacters: "keep",
1172
+ type: "natural"
1173
+ }],
1156
1174
  "perfectionist/sort-exports": ["error", {
1157
1175
  fallbackSort: { type: "unsorted" },
1158
1176
  newlinesBetween: "ignore",
@@ -1205,14 +1223,15 @@ async function perfectionist() {
1205
1223
  specialCharacters: "keep",
1206
1224
  type: "natural"
1207
1225
  }],
1208
- "perfectionist/sort-objects": ["error", {
1226
+ "perfectionist/sort-objects": "off",
1227
+ "perfectionist/sort-sets": ["error", {
1209
1228
  fallbackSort: { type: "unsorted" },
1210
1229
  newlinesBetween: "ignore",
1211
1230
  order: "asc",
1212
1231
  partitionByComment: true,
1213
1232
  partitionByNewLine: true,
1214
1233
  specialCharacters: "keep",
1215
- type: "natural"
1234
+ type: "alphabetical"
1216
1235
  }],
1217
1236
  "perfectionist/sort-union-types": ["error", {
1218
1237
  fallbackSort: { type: "unsorted" },
@@ -2634,4 +2653,4 @@ function resolveSubOptions(options, key) {
2634
2653
  var src_default = inferno;
2635
2654
 
2636
2655
  //#endregion
2637
- export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STORYBOOK, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, StylisticConfigDefaults, astro, combine, command, comments, src_default as default, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, inferno, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, normalizeRules, packageExportsSortOrder, packageSortOrder, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, storybook, stylistic, svelte, tailwindcss, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
2656
+ export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STORYBOOK, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, StylisticConfigDefaults, astro, combine, command, comments, src_default as default, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, inferno, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isInVSCodeESLintExtension, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, normalizeRules, packageExportsSortOrder, packageSortOrder, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, storybook, stylistic, svelte, tailwindcss, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@infernodesign/eslint-config",
3
3
  "description": "ESLint config for Inferno Design.",
4
- "version": "1.6.0",
4
+ "version": "1.8.0",
5
5
  "type": "module",
6
6
  "author": "Inferno Design <support@infernodesign.com>",
7
7
  "license": "MIT",
@@ -42,7 +42,7 @@
42
42
  "@stylistic/eslint-plugin": "^5.5.0",
43
43
  "@typescript-eslint/eslint-plugin": "^8.46.2",
44
44
  "@typescript-eslint/parser": "^8.46.2",
45
- "@vitest/eslint-plugin": "^1.3.23",
45
+ "@vitest/eslint-plugin": "^1.3.24",
46
46
  "ansis": "^4.2.0",
47
47
  "cac": "^6.7.14",
48
48
  "eslint-config-flat-gitignore": "^2.1.0",
@@ -52,7 +52,7 @@
52
52
  "eslint-plugin-better-tailwindcss": "^3.7.10",
53
53
  "eslint-plugin-command": "^3.3.1",
54
54
  "eslint-plugin-import-lite": "^0.3.0",
55
- "eslint-plugin-jsdoc": "^61.1.5",
55
+ "eslint-plugin-jsdoc": "^61.1.7",
56
56
  "eslint-plugin-jsonc": "^2.21.0",
57
57
  "eslint-plugin-n": "^17.23.1",
58
58
  "eslint-plugin-no-only-tests": "^3.3.0",
@@ -89,7 +89,7 @@
89
89
  "eslint-plugin-react-hooks": "^7.0.0",
90
90
  "eslint-plugin-react-refresh": "^0.4.24",
91
91
  "eslint-plugin-solid": "^0.14.5",
92
- "eslint-plugin-storybook": "^9.1.13",
92
+ "eslint-plugin-storybook": "^9.1.15",
93
93
  "eslint-plugin-svelte": "^3.12.5",
94
94
  "eslint-plugin-vuejs-accessibility": "^2.4.1",
95
95
  "eslint-typegen": "^2.3.0",
@@ -98,15 +98,15 @@
98
98
  "pnpm-workspace-yaml": "^1.3.0",
99
99
  "prettier-plugin-astro": "^0.14.1",
100
100
  "prettier-plugin-slidev": "^1.0.5",
101
- "svelte": "^5.41.2",
101
+ "svelte": "^5.41.3",
102
102
  "svelte-eslint-parser": "^1.4.0",
103
103
  "tinyglobby": "^0.2.15",
104
104
  "tsdown": "^0.15.9",
105
105
  "tsx": "^4.20.6",
106
106
  "typescript": "^5.9.3",
107
- "vitest": "^4.0.1",
107
+ "vitest": "^4.0.3",
108
108
  "vue": "^3.5.22",
109
- "@infernodesign/typescript-config": "1.2.0"
109
+ "@infernodesign/typescript-config": "1.3.0"
110
110
  },
111
111
  "peerDependencies": {
112
112
  "@eslint-react/eslint-plugin": "^2.2.3",
@@ -121,7 +121,7 @@
121
121
  "eslint-plugin-react-hooks": "^7.0.0",
122
122
  "eslint-plugin-react-refresh": "^0.4.24",
123
123
  "eslint-plugin-solid": "^0.14.5",
124
- "eslint-plugin-storybook": "^9.1.13",
124
+ "eslint-plugin-storybook": "^9.1.15",
125
125
  "eslint-plugin-svelte": "^3.12.5",
126
126
  "eslint-plugin-vuejs-accessibility": "^2.4.1",
127
127
  "prettier-plugin-astro": "^0.14.1",