@jsse/eslint-config 0.6.2 → 0.7.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.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as __exportAll, r as __toESM, t as __commonJSMin } from "./chunk-CSNpwdVU.js";
2
- import { n as DEBUG, r as SLOW_RULES, t as VERSION } from "./version-B1I0SM9v.js";
2
+ import { n as SLOW_RULES, r as VERSION, t as DEBUG } from "./const-7b74P6Qm.js";
3
3
  import { builtinModules, createRequire } from "node:module";
4
4
  import process$1 from "node:process";
5
5
  import fs, { realpathSync, statSync } from "node:fs";
@@ -11174,89 +11174,6 @@ function typescriptRulesTypeAware() {
11174
11174
  "@typescript-eslint/no-unnecessary-qualifier": "error",
11175
11175
  "@typescript-eslint/no-redundant-type-constituents": "warn",
11176
11176
  "@typescript-eslint/require-array-sort-compare": ["error", { ignoreStringArrays: true }],
11177
- "@typescript-eslint/naming-convention": [
11178
- "error",
11179
- {
11180
- selector: ["variable"],
11181
- modifiers: ["global"],
11182
- format: [
11183
- "camelCase",
11184
- "snake_case",
11185
- "UPPER_CASE",
11186
- "PascalCase"
11187
- ],
11188
- leadingUnderscore: "allowSingleOrDouble",
11189
- trailingUnderscore: "allow",
11190
- filter: {
11191
- regex: "[- ]",
11192
- match: false
11193
- }
11194
- },
11195
- {
11196
- selector: [
11197
- "classProperty",
11198
- "objectLiteralProperty",
11199
- "typeProperty",
11200
- "classMethod",
11201
- "objectLiteralMethod",
11202
- "typeMethod",
11203
- "accessor",
11204
- "enumMember"
11205
- ],
11206
- format: null,
11207
- modifiers: ["requiresQuotes"]
11208
- },
11209
- {
11210
- selector: [
11211
- "variable",
11212
- "function",
11213
- "classProperty",
11214
- "objectLiteralProperty",
11215
- "parameterProperty",
11216
- "classMethod",
11217
- "objectLiteralMethod",
11218
- "typeMethod",
11219
- "accessor"
11220
- ],
11221
- format: [
11222
- "camelCase",
11223
- "snake_case",
11224
- "PascalCase"
11225
- ],
11226
- leadingUnderscore: "allowSingleOrDouble",
11227
- trailingUnderscore: "allow",
11228
- filter: {
11229
- regex: "^[0-9]|[- ]|[/]",
11230
- match: false
11231
- }
11232
- },
11233
- {
11234
- selector: "typeLike",
11235
- format: ["PascalCase"]
11236
- },
11237
- {
11238
- selector: "variable",
11239
- types: ["boolean"],
11240
- format: ["PascalCase", "camelCase"],
11241
- prefix: [
11242
- "is",
11243
- "has",
11244
- "can",
11245
- "should",
11246
- "will",
11247
- "did"
11248
- ]
11249
- },
11250
- {
11251
- selector: "interface",
11252
- format: ["PascalCase"]
11253
- },
11254
- {
11255
- selector: "typeParameter",
11256
- filter: "^T$|^[A-Z][a-zA-Z]+$",
11257
- format: ["PascalCase"]
11258
- }
11259
- ],
11260
11177
  "@typescript-eslint/no-floating-promises": ["error", {
11261
11178
  ignoreVoid: true,
11262
11179
  ignoreIIFE: true
@@ -11387,8 +11304,10 @@ function typescriptRules(props) {
11387
11304
  ...props
11388
11305
  };
11389
11306
  dbg("building typescript rules: %O", normalized);
11307
+ const rulesFromPreset = normalized.includeTsEslintPresetRules ? tsPresetRules(normalized) : {};
11308
+ dbg("ts-eslint preset rules: %O", rulesFromPreset);
11390
11309
  return {
11391
- ...normalized.includeTsEslintPresetRules ? tsPresetRules(normalized) : {},
11310
+ ...rulesFromPreset,
11392
11311
  ...typescriptRulesTypeOblivious(),
11393
11312
  ...normalized.typeAware ? typescriptRulesTypeAware() : {}
11394
11313
  };
@@ -12212,8 +12131,8 @@ function autoUseParserService(options) {
12212
12131
  return !!(options.tsconfig && (typeof options.tsconfig === "string" && options.tsconfig === "tsconfig.json" || Array.isArray(options.tsconfig) && options.tsconfig.length === 1 && options.tsconfig[0] === "tsconfig.json"));
12213
12132
  }
12214
12133
  function typescriptParser(options) {
12215
- const { componentExts = [], filesTypeAware: files = [GLOB_TS, GLOB_TSX], ignoresTypeAware: ignores = [GLOB_MARKDOWN], name, parserOptions: parserOptionsOverride = {}, react, tsconfig, useProjectService = autoUseParserService(options) } = options;
12216
- const typeAware = !!tsconfig;
12134
+ const { componentExts = [], filesTypeAware: files = [GLOB_TS, GLOB_TSX], ignoresTypeAware: ignores = [GLOB_MARKDOWN], name, parserOptions: parserOptionsOverride = {}, react, tsconfig, typeAware: typeAwareOpt, useProjectService = autoUseParserService(options) } = options;
12135
+ const typeAware = typeAwareOpt === void 0 ? !!tsconfig : typeAwareOpt;
12217
12136
  if (useProjectService) {
12218
12137
  dbg("ts parser-options using `projectService`project service");
12219
12138
  return {
@@ -12228,7 +12147,7 @@ function typescriptParser(options) {
12228
12147
  ...typeAware ? {
12229
12148
  projectService: {
12230
12149
  allowDefaultProject: ["./*.js"],
12231
- defaultProject: (typeof tsconfig === "string" ? tsconfig : tsconfig[0]) ?? "tsconfig.json"
12150
+ defaultProject: (typeof tsconfig === "string" ? tsconfig : tsconfig?.[0]) ?? "tsconfig.json"
12232
12151
  },
12233
12152
  tsconfigRootDir: process$1.cwd()
12234
12153
  } : {},
@@ -12288,12 +12207,10 @@ const typescript = async (options) => {
12288
12207
  const tsPrefix = prefix?.from ?? "@typescript-eslint";
12289
12208
  const tsPrefixTo = prefix?.to ?? "@typescript-eslint";
12290
12209
  const tsRules = {
12291
- ...(pluginTs.configs["eslint-recommended"]?.overrides ?? [])[0]?.rules,
12292
- ...pluginTs.configs.strict?.rules,
12293
12210
  "no-invalid-this": "off",
12294
12211
  ...typescriptRules({
12295
12212
  strict,
12296
- typeAware
12213
+ typeAware: false
12297
12214
  }),
12298
12215
  ...overrides
12299
12216
  };
@@ -12628,6 +12545,8 @@ async function jsse(options = {}, ...userConfigs) {
12628
12545
  * ========================================================================
12629
12546
  */
12630
12547
  if (typescriptOptions) {
12548
+ const tsconfigProvided = typeof typescriptOptions === "object" && !!typescriptOptions.tsconfig;
12549
+ const effectiveTypeAware = options.typeAware === void 0 ? tsconfigProvided : typeAware;
12631
12550
  const tscfg = typescript({
12632
12551
  ...typeof typescriptOptions === "boolean" ? {} : typescriptOptions,
12633
12552
  componentExts,
@@ -12637,7 +12556,7 @@ async function jsse(options = {}, ...userConfigs) {
12637
12556
  to: tsPrefix ?? "@typescript-eslint"
12638
12557
  },
12639
12558
  react: enableReact,
12640
- typeAware
12559
+ typeAware: effectiveTypeAware
12641
12560
  });
12642
12561
  configs.push(tscfg, tsdoc());
12643
12562
  }
@@ -12675,7 +12594,7 @@ async function jsse(options = {}, ...userConfigs) {
12675
12594
  if (rootId !== "jsse") {
12676
12595
  for (const config of combinedConfigs) if (config.name && config.name.startsWith("jsse/")) config.name = config.name.replace("jsse/", `${rootId}/`);
12677
12596
  }
12678
- for (const config of combinedConfigs) {
12597
+ if (tsPrefix && tsPrefix !== "@typescript-eslint") for (const config of combinedConfigs) {
12679
12598
  if (config.plugins) {
12680
12599
  for (const [key, value] of Object.entries(config.plugins)) if (key.startsWith("@typescript-eslint/")) {
12681
12600
  delete config.plugins[key];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jsse/eslint-config",
3
3
  "type": "module",
4
- "version": "0.6.2",
4
+ "version": "0.7.1",
5
5
  "description": "@jsse/eslint-config ~ WYSIWYG",
6
6
  "author": "jessekrubin <jessekrubin@gmail.com> (https://github.com/jessekrubin/)",
7
7
  "license": "MIT",
@@ -63,48 +63,50 @@
63
63
  "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
64
64
  "@eslint/compat": "^2.0.3",
65
65
  "@eslint/js": "^9.39.4",
66
- "@eslint/markdown": "^7.5.1",
66
+ "@eslint/markdown": "^8.0.1",
67
67
  "@stylistic/eslint-plugin": "5.10.0",
68
- "@typescript-eslint/eslint-plugin": "^8.57.0",
69
- "@typescript-eslint/parser": "^8.57.0",
70
- "@typescript-eslint/rule-tester": "^8.57.0",
71
- "@vitest/eslint-plugin": "^1.6.10",
68
+ "@typescript-eslint/eslint-plugin": "^8.58.0",
69
+ "@typescript-eslint/parser": "^8.58.0",
70
+ "@typescript-eslint/rule-tester": "^8.58.0",
71
+ "@vitest/eslint-plugin": "^1.6.14",
72
72
  "debug": "^4.4.3",
73
- "eslint-config-flat-gitignore": "^2.2.1",
73
+ "eslint-config-flat-gitignore": "^2.3.0",
74
74
  "eslint-merge-processors": "^2.0.0",
75
75
  "eslint-plugin-antfu": "^3.2.2",
76
76
  "eslint-plugin-command": "^3.5.2",
77
77
  "eslint-plugin-de-morgan": "^2.1.1",
78
- "eslint-plugin-import-lite": "^0.5.2",
79
- "eslint-plugin-jsdoc": "^62.7.1",
80
- "eslint-plugin-jsonc": "^3.1.1",
78
+ "eslint-plugin-import-lite": "^0.6.0",
79
+ "eslint-plugin-jsdoc": "^62.9.0",
80
+ "eslint-plugin-jsonc": "^3.1.2",
81
81
  "eslint-plugin-n": "^17.24.0",
82
82
  "eslint-plugin-no-only-tests": "^3.3.0",
83
- "eslint-plugin-perfectionist": "^5.6.0",
83
+ "eslint-plugin-perfectionist": "^5.8.0",
84
84
  "eslint-plugin-pnpm": "^1.6.0",
85
85
  "eslint-plugin-react": "^7.37.5",
86
86
  "eslint-plugin-react-hooks": "^7.0.1",
87
87
  "eslint-plugin-react-refresh": "^0.5.2",
88
88
  "eslint-plugin-toml": "^1.3.1",
89
89
  "eslint-plugin-tsdoc": "^0.5.2",
90
- "eslint-plugin-unicorn": "^63.0.0",
90
+ "eslint-plugin-unicorn": "^64.0.0",
91
91
  "eslint-plugin-unused-imports": "^4.4.1",
92
92
  "eslint-plugin-yml": "^3.3.1",
93
93
  "jsonc-eslint-parser": "^3.1.0",
94
94
  "toml-eslint-parser": "^1.0.3",
95
- "typescript-eslint": "^8.57.0",
95
+ "typescript-eslint": "^8.58.0",
96
96
  "yaml-eslint-parser": "^2.0.0"
97
97
  },
98
98
  "devDependencies": {
99
99
  "@changesets/cli": "^2.30.0",
100
+ "@emnapi/core": "^1.9.2",
101
+ "@emnapi/runtime": "^1.9.2",
100
102
  "@jsse/prettier-config": "^1.0.2",
101
- "@jsse/tsconfig": "^0.4.0",
102
- "@types/debug": "^4.1.12",
103
+ "@jsse/tsconfig": "^0.4.1",
104
+ "@types/debug": "^4.1.13",
103
105
  "@types/fs-extra": "^11.0.4",
104
- "@types/node": "^25.4.0",
106
+ "@types/node": "^25.5.0",
105
107
  "cac": "^7.0.0",
106
108
  "eslint": "^9.39.4",
107
- "eslint-flat-config-utils": "^3.0.2",
109
+ "eslint-flat-config-utils": "^3.1.0",
108
110
  "eslint-typegen": "^2.3.1",
109
111
  "execa": "~9.6.1",
110
112
  "fast-equals": "^6.0.0",
@@ -112,26 +114,26 @@
112
114
  "fs-extra": "^11.3.4",
113
115
  "globals": "^17.4.0",
114
116
  "local-pkg": "^1.1.2",
115
- "oxfmt": "^0.38.0",
116
- "oxlint": "^1.53.0",
117
+ "oxfmt": "^0.43.0",
118
+ "oxlint": "^1.58.0",
117
119
  "picocolors": "^1.1.1",
118
120
  "prettier": "^3.8.1",
119
121
  "react": "~19.2.4",
120
122
  "rimraf": "^6.1.3",
121
- "tsdown": "^0.21.2",
123
+ "tsdown": "^0.21.7",
122
124
  "tsx": "^4.21.0",
123
125
  "typescript": "~5.9.3",
124
- "vitest": "^4.0.18"
126
+ "vitest": "^4.1.2"
125
127
  },
126
128
  "prettier": "@jsse/prettier-config",
127
129
  "scripts": {
128
130
  "build": "pnpm gen && pnpm build-fast --dts && pnpm build:tsc && eslint .",
129
131
  "build:tsc": "tsc -b tsconfig.build.json",
130
132
  "build-fast": "tsdown src/index.ts src/cli.ts --format esm --clean",
131
- "gen": "tsx scripts/gen.ts && prettier -w --cache src",
133
+ "gen": "tsx scripts/gen.ts && prettier -w --cache --object-wrap=collapse src/_generated",
132
134
  "dev": "tsdown src/index.ts --format esm,cjs --watch",
133
- "fmt": "prettier -w .",
134
- "fmtc": "prettier --check .",
135
+ "fmt": "prettier -w --object-wrap=collapse .",
136
+ "fmtc": "prettier --check --object-wrap=collapse .",
135
137
  "lint": "pnpm run build-fast && eslint .",
136
138
  "lint:self": "pnpm run build-fast && eslint --report-unused-disable-directives .",
137
139
  "oxlint": "oxlint",