@jsse/eslint-config 0.0.9 → 0.0.11

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.cjs CHANGED
@@ -616,7 +616,7 @@ var CAC = class extends import_events.EventEmitter {
616
616
  var cac = (name = "") => new CAC(name);
617
617
 
618
618
  // package.json
619
- var version = "0.0.9";
619
+ var version = "0.0.11";
620
620
 
621
621
  // src/cli.ts
622
622
  var cli = cac("jsselint");
package/dist/cli.d.cts CHANGED
@@ -1,2 +1,2 @@
1
1
 
2
- export { }
2
+ export { }
package/dist/cli.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
 
2
- export { }
2
+ export { }
package/dist/cli.js CHANGED
@@ -592,7 +592,7 @@ var CAC = class extends EventEmitter {
592
592
  var cac = (name = "") => new CAC(name);
593
593
 
594
594
  // package.json
595
- var version = "0.0.9";
595
+ var version = "0.0.11";
596
596
 
597
597
  // src/cli.ts
598
598
  var cli = cac("jsselint");
package/dist/index.cjs CHANGED
@@ -2368,6 +2368,7 @@ __export(src_exports, {
2368
2368
  node: () => node,
2369
2369
  parserJsonc: () => import_jsonc_eslint_parser.default,
2370
2370
  parserTs: () => parserTs,
2371
+ perfectionist: () => perfectionist,
2371
2372
  pluginEslintComments: () => import_eslint_plugin_eslint_comments.default,
2372
2373
  pluginImport: () => pluginImport,
2373
2374
  pluginJsdoc: () => import_eslint_plugin_jsdoc.default,
@@ -2375,6 +2376,7 @@ __export(src_exports, {
2375
2376
  pluginMarkdown: () => import_eslint_plugin_markdown.default,
2376
2377
  pluginNoOnlyTests: () => import_eslint_plugin_no_only_tests.default,
2377
2378
  pluginNode: () => import_eslint_plugin_n.default,
2379
+ pluginPerfectionist: () => import_eslint_plugin_perfectionist.default,
2378
2380
  pluginReact: () => import_eslint_plugin_react.default,
2379
2381
  pluginReactHooks: () => import_eslint_plugin_react_hooks.default,
2380
2382
  pluginReactRefresh: () => pluginReactRefresh,
@@ -2418,6 +2420,7 @@ var import_eslint_plugin_tailwindcss = __toESM(require("eslint-plugin-tailwindcs
2418
2420
  var import_eslint_plugin_vitest = __toESM(require("eslint-plugin-vitest"), 1);
2419
2421
  var import_jsonc_eslint_parser = __toESM(require("jsonc-eslint-parser"), 1);
2420
2422
  var import_eslint_plugin_markdown = __toESM(require("eslint-plugin-markdown"), 1);
2423
+ var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
2421
2424
 
2422
2425
  // src/configs/comments.ts
2423
2426
  function comments() {
@@ -2473,35 +2476,37 @@ var GLOB_ALL_SRC = [
2473
2476
  GLOB_HTML
2474
2477
  ];
2475
2478
  var GLOB_EXCLUDE = [
2476
- "**/node_modules",
2477
- "**/dist",
2478
- "**/package-lock.json",
2479
- "**/yarn.lock",
2480
- "**/pnpm-lock.yaml",
2481
- "**/bun.lockb",
2482
- "**/output",
2483
- "**/out",
2484
- "**/coverage",
2485
- "**/temp",
2486
- "**/.vitepress/cache",
2487
- "**/.nuxt",
2488
- "**/.next",
2489
- "**/.vercel",
2479
+ "**/__snapshots__",
2480
+ "**/.cache",
2490
2481
  "**/.changeset",
2482
+ "**/.history",
2491
2483
  "**/.idea",
2492
- "**/.cache",
2484
+ "**/.next",
2485
+ "**/.nuxt",
2493
2486
  "**/.output",
2487
+ "**/.temp",
2488
+ "**/.tmp",
2489
+ "**/.vercel",
2494
2490
  "**/.vite-inspect",
2495
- "**/CHANGELOG*.md",
2491
+ "**/.vitepress/cache",
2492
+ "**/*.bak",
2496
2493
  "**/*.min.*",
2497
- "**/LICENSE*",
2498
- "**/__snapshots__",
2499
2494
  "**/auto-import?(s).d.ts",
2495
+ "**/bun.lockb",
2496
+ "**/CHANGELOG*.md",
2500
2497
  "**/components.d.ts",
2501
- "**/*.bak",
2498
+ "**/coverage",
2499
+ "**/dist",
2500
+ "**/LICENSE*",
2501
+ "**/node_modules",
2502
+ "**/out",
2503
+ "**/output",
2504
+ "**/package-lock.json",
2505
+ "**/pnpm-lock.yaml",
2502
2506
  "**/scratch",
2507
+ "**/temp",
2503
2508
  "**/tmp",
2504
- "**/temp"
2509
+ "**/yarn.lock"
2505
2510
  ];
2506
2511
 
2507
2512
  // src/configs/ignores.ts
@@ -2836,7 +2841,7 @@ function jsdoc(options = {}) {
2836
2841
 
2837
2842
  // src/configs/jsonc.ts
2838
2843
  function jsonc(options = {}) {
2839
- const { stylistic: stylistic2 = true, overrides = {} } = options;
2844
+ const { overrides = {}, stylistic: stylistic2 = true } = options;
2840
2845
  const { indent = 2 } = typeof stylistic2 === "boolean" ? {} : stylistic2;
2841
2846
  return [
2842
2847
  {
@@ -3059,25 +3064,25 @@ function prettier() {
3059
3064
  var import_node_process = __toESM(require("process"), 1);
3060
3065
  function typescriptLanguageOptions(options) {
3061
3066
  const {
3062
- parserOptions = {},
3063
- tsconfig,
3067
+ componentExts = [],
3064
3068
  react: react2,
3065
- componentExts = []
3069
+ // parserOptionsOverride = {},
3070
+ tsconfig
3066
3071
  } = options || {};
3067
3072
  const tsOptions = tsconfig ? {
3068
3073
  project: Array.isArray(tsconfig) ? tsconfig : [tsconfig],
3069
3074
  tsconfigRootDir: import_node_process.default.cwd()
3070
3075
  } : {};
3076
+ const parserOptions = {
3077
+ ecmaFeatures: react2 ? { jsx: true, modules: true } : void 0,
3078
+ extraFileExtensions: componentExts.map((ext) => `.${ext}`),
3079
+ sourceType: "module",
3080
+ ...tsOptions,
3081
+ jsxPragma: react2 ? "React" : void 0
3082
+ };
3071
3083
  return {
3072
3084
  parser: parserTs,
3073
- parserOptions: {
3074
- ecmaFeatures: react2 ? { jsx: true, modules: true } : void 0,
3075
- extraFileExtensions: componentExts.map((ext) => `.${ext}`),
3076
- sourceType: "module",
3077
- ...tsOptions,
3078
- ...parserOptions,
3079
- jsxPragma: react2 ? "React" : void 0
3080
- }
3085
+ parserOptions
3081
3086
  };
3082
3087
  }
3083
3088
 
@@ -3314,11 +3319,11 @@ function reactRecomendedRules() {
3314
3319
  }
3315
3320
  function react(options) {
3316
3321
  const {
3322
+ componentExts,
3317
3323
  parserOptions = {},
3318
- tsconfig,
3319
3324
  react: react2,
3320
3325
  reactRefresh,
3321
- componentExts
3326
+ tsconfig
3322
3327
  } = options ?? {};
3323
3328
  const config = [
3324
3329
  {
@@ -4061,10 +4066,10 @@ function typescript(options) {
4061
4066
  componentExts = [],
4062
4067
  overrides = {},
4063
4068
  parserOptions = {},
4064
- tsconfig: tsconfigPath,
4065
- typeAware,
4069
+ prefix,
4066
4070
  react: react2,
4067
- prefix
4071
+ tsconfig: tsconfigPath,
4072
+ typeAware
4068
4073
  } = options ?? {};
4069
4074
  const tsPrefix = prefix?.from ?? "@typescript-eslint";
4070
4075
  const tsPrefixTo = prefix?.to ?? "@typescript-eslint";
@@ -4090,19 +4095,19 @@ function typescript(options) {
4090
4095
  }
4091
4096
  },
4092
4097
  {
4093
- name: "jsse:typescript:parser",
4094
4098
  // use ts parser for js files as well!
4095
4099
  files: [GLOB_SRC, ...componentExts.map((ext) => `**/*.${ext}`)],
4096
4100
  languageOptions: typescriptLanguageOptions({
4097
4101
  parserOptions,
4098
4102
  react: react2,
4099
4103
  tsconfig: tsconfigPath
4100
- })
4104
+ }),
4105
+ name: "jsse:typescript:parser"
4101
4106
  },
4102
4107
  {
4103
- name: "jsse:typescript:rules",
4104
4108
  // only apply ts rules to ts files!
4105
4109
  files: [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)],
4110
+ name: "jsse:typescript:rules",
4106
4111
  rules: renameRules(tsrules, tsPrefix, tsPrefixTo)
4107
4112
  },
4108
4113
  {
@@ -4233,6 +4238,18 @@ function unicorn() {
4233
4238
  ];
4234
4239
  }
4235
4240
 
4241
+ // src/configs/perfectionist.ts
4242
+ function perfectionist() {
4243
+ return [
4244
+ {
4245
+ name: "jsse:perfectionist",
4246
+ plugins: {
4247
+ perfectionist: import_eslint_plugin_perfectionist.default
4248
+ }
4249
+ }
4250
+ ];
4251
+ }
4252
+
4236
4253
  // src/factory.ts
4237
4254
  var import_node_fs3 = __toESM(require("fs"), 1);
4238
4255
  var import_eslint_config_flat_gitignore = __toESM(require("eslint-config-flat-gitignore"), 1);
@@ -11078,7 +11095,7 @@ function jsxStylistic({
11078
11095
  };
11079
11096
  }
11080
11097
  function stylistic(options = {}) {
11081
- const { indent = 2, quotes = "double", jsx = true } = options;
11098
+ const { indent = 2, jsx = true, quotes = "double" } = options;
11082
11099
  return [
11083
11100
  {
11084
11101
  name: "jsse:stylistic",
@@ -11162,19 +11179,19 @@ function normalizeOptions(options = {}) {
11162
11179
  function jsse(options = {}, ...userConfigs) {
11163
11180
  const normalizedOptions = normalizeOptions(options);
11164
11181
  const {
11165
- isInEditor: isInEditor2,
11166
- overrides = {},
11167
11182
  componentExts,
11168
- reportUnusedDisableDirectives,
11169
- tsPrefix,
11170
- typeAware,
11171
- off,
11172
11183
  debug,
11173
- typescript: enableTypeScript,
11174
11184
  gitignore: enableGitignore,
11185
+ isInEditor: isInEditor2,
11186
+ off,
11187
+ overrides = {},
11188
+ prettier: enablePrettier,
11175
11189
  react: enableReact,
11190
+ reportUnusedDisableDirectives,
11176
11191
  stylistic: stylisticOptions,
11177
- prettier: enablePrettier
11192
+ tsPrefix,
11193
+ typeAware,
11194
+ typescript: enableTypeScript
11178
11195
  } = normalizedOptions;
11179
11196
  if (debug) {
11180
11197
  console.log("@jsse/eslint-config debug=true");
@@ -11200,7 +11217,8 @@ function jsse(options = {}, ...userConfigs) {
11200
11217
  imports({
11201
11218
  stylistic: stylisticOptions
11202
11219
  }),
11203
- unicorn()
11220
+ unicorn(),
11221
+ perfectionist()
11204
11222
  );
11205
11223
  if (enableTypeScript) {
11206
11224
  configs.push(
@@ -11327,6 +11345,7 @@ function jsseReact() {
11327
11345
  node,
11328
11346
  parserJsonc,
11329
11347
  parserTs,
11348
+ perfectionist,
11330
11349
  pluginEslintComments,
11331
11350
  pluginImport,
11332
11351
  pluginJsdoc,
@@ -11334,6 +11353,7 @@ function jsseReact() {
11334
11353
  pluginMarkdown,
11335
11354
  pluginNoOnlyTests,
11336
11355
  pluginNode,
11356
+ pluginPerfectionist,
11337
11357
  pluginReact,
11338
11358
  pluginReactHooks,
11339
11359
  pluginReactRefresh,
package/dist/index.d.cts CHANGED
@@ -25,6 +25,7 @@ export { default as pluginTailwind } from 'eslint-plugin-tailwindcss';
25
25
  export { default as pluginVitest } from 'eslint-plugin-vitest';
26
26
  export { default as parserJsonc } from 'jsonc-eslint-parser';
27
27
  export { default as pluginMarkdown } from 'eslint-plugin-markdown';
28
+ export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
28
29
 
29
30
  type Rules = MergeIntersection<RenamePrefix<TypeScriptRules, "@typescript-eslint/", "ts/"> & RenamePrefix<VitestRules, "vitest/", "test/"> & RenamePrefix<YmlRules, "yml/", "yaml/"> & RenamePrefix<NRules, "n/", "node/"> & ImportRules & EslintRules & JsoncRules & VueRules & UnicornRules & EslintCommentsRules & {
30
31
  "test/no-only-tests": RuleConfig;
@@ -359,6 +360,13 @@ declare function typescript(options?: OptionsComponentExts & OptionsOverrides &
359
360
 
360
361
  declare function unicorn(): ConfigItem[];
361
362
 
363
+ /**
364
+ * Optional perfectionist plugin for props and items sorting.
365
+ *
366
+ * @see https://github.com/azat-io/eslint-plugin-perfectionist
367
+ */
368
+ declare function perfectionist(): ConfigItem[];
369
+
362
370
  /**
363
371
  * Construct an array of ESLint flat config items.
364
372
  */
@@ -396,4 +404,4 @@ declare function isInEditor(): boolean;
396
404
  declare function jssestd(): ConfigItem[];
397
405
  declare function jsseReact(): ConfigItem[];
398
406
 
399
- export { ConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_YAML, OptionsCommon, OptionsComponentExts, OptionsConfig, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsPrefix, OptionsReact, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, Rules, StylisticConfig, combine, comments, jsse as default, eslintConfigPrettierRules, ignores, imports, isCI, isInEditor, javascript, jsdoc, jsonc, jsse, jsseReact, jssestd, node, prettier, react, reactHooks, reactRules, renameRules, sortPackageJson, sortTsconfig, test, typescript, unicorn };
407
+ export { type ConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_YAML, type OptionsCommon, type OptionsComponentExts, type OptionsConfig, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsPrefix, type OptionsReact, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type Rules, type StylisticConfig, combine, comments, jsse as default, eslintConfigPrettierRules, ignores, imports, isCI, isInEditor, javascript, jsdoc, jsonc, jsse, jsseReact, jssestd, node, perfectionist, prettier, react, reactHooks, reactRules, renameRules, sortPackageJson, sortTsconfig, test, typescript, unicorn };
package/dist/index.d.ts CHANGED
@@ -25,6 +25,7 @@ export { default as pluginTailwind } from 'eslint-plugin-tailwindcss';
25
25
  export { default as pluginVitest } from 'eslint-plugin-vitest';
26
26
  export { default as parserJsonc } from 'jsonc-eslint-parser';
27
27
  export { default as pluginMarkdown } from 'eslint-plugin-markdown';
28
+ export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
28
29
 
29
30
  type Rules = MergeIntersection<RenamePrefix<TypeScriptRules, "@typescript-eslint/", "ts/"> & RenamePrefix<VitestRules, "vitest/", "test/"> & RenamePrefix<YmlRules, "yml/", "yaml/"> & RenamePrefix<NRules, "n/", "node/"> & ImportRules & EslintRules & JsoncRules & VueRules & UnicornRules & EslintCommentsRules & {
30
31
  "test/no-only-tests": RuleConfig;
@@ -359,6 +360,13 @@ declare function typescript(options?: OptionsComponentExts & OptionsOverrides &
359
360
 
360
361
  declare function unicorn(): ConfigItem[];
361
362
 
363
+ /**
364
+ * Optional perfectionist plugin for props and items sorting.
365
+ *
366
+ * @see https://github.com/azat-io/eslint-plugin-perfectionist
367
+ */
368
+ declare function perfectionist(): ConfigItem[];
369
+
362
370
  /**
363
371
  * Construct an array of ESLint flat config items.
364
372
  */
@@ -396,4 +404,4 @@ declare function isInEditor(): boolean;
396
404
  declare function jssestd(): ConfigItem[];
397
405
  declare function jsseReact(): ConfigItem[];
398
406
 
399
- export { ConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_YAML, OptionsCommon, OptionsComponentExts, OptionsConfig, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsPrefix, OptionsReact, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, Rules, StylisticConfig, combine, comments, jsse as default, eslintConfigPrettierRules, ignores, imports, isCI, isInEditor, javascript, jsdoc, jsonc, jsse, jsseReact, jssestd, node, prettier, react, reactHooks, reactRules, renameRules, sortPackageJson, sortTsconfig, test, typescript, unicorn };
407
+ export { type ConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_YAML, type OptionsCommon, type OptionsComponentExts, type OptionsConfig, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsPrefix, type OptionsReact, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type Rules, type StylisticConfig, combine, comments, jsse as default, eslintConfigPrettierRules, ignores, imports, isCI, isInEditor, javascript, jsdoc, jsonc, jsse, jsseReact, jssestd, node, perfectionist, prettier, react, reactHooks, reactRules, renameRules, sortPackageJson, sortTsconfig, test, typescript, unicorn };
package/dist/index.js CHANGED
@@ -2342,6 +2342,7 @@ import { default as default12 } from "eslint-plugin-tailwindcss";
2342
2342
  import { default as default13 } from "eslint-plugin-vitest";
2343
2343
  import { default as default14 } from "jsonc-eslint-parser";
2344
2344
  import { default as default15 } from "eslint-plugin-markdown";
2345
+ import { default as default16 } from "eslint-plugin-perfectionist";
2345
2346
 
2346
2347
  // src/configs/comments.ts
2347
2348
  function comments() {
@@ -2397,35 +2398,37 @@ var GLOB_ALL_SRC = [
2397
2398
  GLOB_HTML
2398
2399
  ];
2399
2400
  var GLOB_EXCLUDE = [
2400
- "**/node_modules",
2401
- "**/dist",
2402
- "**/package-lock.json",
2403
- "**/yarn.lock",
2404
- "**/pnpm-lock.yaml",
2405
- "**/bun.lockb",
2406
- "**/output",
2407
- "**/out",
2408
- "**/coverage",
2409
- "**/temp",
2410
- "**/.vitepress/cache",
2411
- "**/.nuxt",
2412
- "**/.next",
2413
- "**/.vercel",
2401
+ "**/__snapshots__",
2402
+ "**/.cache",
2414
2403
  "**/.changeset",
2404
+ "**/.history",
2415
2405
  "**/.idea",
2416
- "**/.cache",
2406
+ "**/.next",
2407
+ "**/.nuxt",
2417
2408
  "**/.output",
2409
+ "**/.temp",
2410
+ "**/.tmp",
2411
+ "**/.vercel",
2418
2412
  "**/.vite-inspect",
2419
- "**/CHANGELOG*.md",
2413
+ "**/.vitepress/cache",
2414
+ "**/*.bak",
2420
2415
  "**/*.min.*",
2421
- "**/LICENSE*",
2422
- "**/__snapshots__",
2423
2416
  "**/auto-import?(s).d.ts",
2417
+ "**/bun.lockb",
2418
+ "**/CHANGELOG*.md",
2424
2419
  "**/components.d.ts",
2425
- "**/*.bak",
2420
+ "**/coverage",
2421
+ "**/dist",
2422
+ "**/LICENSE*",
2423
+ "**/node_modules",
2424
+ "**/out",
2425
+ "**/output",
2426
+ "**/package-lock.json",
2427
+ "**/pnpm-lock.yaml",
2426
2428
  "**/scratch",
2429
+ "**/temp",
2427
2430
  "**/tmp",
2428
- "**/temp"
2431
+ "**/yarn.lock"
2429
2432
  ];
2430
2433
 
2431
2434
  // src/configs/ignores.ts
@@ -2760,7 +2763,7 @@ function jsdoc(options = {}) {
2760
2763
 
2761
2764
  // src/configs/jsonc.ts
2762
2765
  function jsonc(options = {}) {
2763
- const { stylistic: stylistic2 = true, overrides = {} } = options;
2766
+ const { overrides = {}, stylistic: stylistic2 = true } = options;
2764
2767
  const { indent = 2 } = typeof stylistic2 === "boolean" ? {} : stylistic2;
2765
2768
  return [
2766
2769
  {
@@ -2983,25 +2986,25 @@ function prettier() {
2983
2986
  import process2 from "process";
2984
2987
  function typescriptLanguageOptions(options) {
2985
2988
  const {
2986
- parserOptions = {},
2987
- tsconfig,
2989
+ componentExts = [],
2988
2990
  react: react2,
2989
- componentExts = []
2991
+ // parserOptionsOverride = {},
2992
+ tsconfig
2990
2993
  } = options || {};
2991
2994
  const tsOptions = tsconfig ? {
2992
2995
  project: Array.isArray(tsconfig) ? tsconfig : [tsconfig],
2993
2996
  tsconfigRootDir: process2.cwd()
2994
2997
  } : {};
2998
+ const parserOptions = {
2999
+ ecmaFeatures: react2 ? { jsx: true, modules: true } : void 0,
3000
+ extraFileExtensions: componentExts.map((ext) => `.${ext}`),
3001
+ sourceType: "module",
3002
+ ...tsOptions,
3003
+ jsxPragma: react2 ? "React" : void 0
3004
+ };
2995
3005
  return {
2996
3006
  parser: parserTs,
2997
- parserOptions: {
2998
- ecmaFeatures: react2 ? { jsx: true, modules: true } : void 0,
2999
- extraFileExtensions: componentExts.map((ext) => `.${ext}`),
3000
- sourceType: "module",
3001
- ...tsOptions,
3002
- ...parserOptions,
3003
- jsxPragma: react2 ? "React" : void 0
3004
- }
3007
+ parserOptions
3005
3008
  };
3006
3009
  }
3007
3010
 
@@ -3238,11 +3241,11 @@ function reactRecomendedRules() {
3238
3241
  }
3239
3242
  function react(options) {
3240
3243
  const {
3244
+ componentExts,
3241
3245
  parserOptions = {},
3242
- tsconfig,
3243
3246
  react: react2,
3244
3247
  reactRefresh,
3245
- componentExts
3248
+ tsconfig
3246
3249
  } = options ?? {};
3247
3250
  const config = [
3248
3251
  {
@@ -3985,10 +3988,10 @@ function typescript(options) {
3985
3988
  componentExts = [],
3986
3989
  overrides = {},
3987
3990
  parserOptions = {},
3988
- tsconfig: tsconfigPath,
3989
- typeAware,
3991
+ prefix,
3990
3992
  react: react2,
3991
- prefix
3993
+ tsconfig: tsconfigPath,
3994
+ typeAware
3992
3995
  } = options ?? {};
3993
3996
  const tsPrefix = prefix?.from ?? "@typescript-eslint";
3994
3997
  const tsPrefixTo = prefix?.to ?? "@typescript-eslint";
@@ -4014,19 +4017,19 @@ function typescript(options) {
4014
4017
  }
4015
4018
  },
4016
4019
  {
4017
- name: "jsse:typescript:parser",
4018
4020
  // use ts parser for js files as well!
4019
4021
  files: [GLOB_SRC, ...componentExts.map((ext) => `**/*.${ext}`)],
4020
4022
  languageOptions: typescriptLanguageOptions({
4021
4023
  parserOptions,
4022
4024
  react: react2,
4023
4025
  tsconfig: tsconfigPath
4024
- })
4026
+ }),
4027
+ name: "jsse:typescript:parser"
4025
4028
  },
4026
4029
  {
4027
- name: "jsse:typescript:rules",
4028
4030
  // only apply ts rules to ts files!
4029
4031
  files: [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)],
4032
+ name: "jsse:typescript:rules",
4030
4033
  rules: renameRules(tsrules, tsPrefix, tsPrefixTo)
4031
4034
  },
4032
4035
  {
@@ -4157,6 +4160,18 @@ function unicorn() {
4157
4160
  ];
4158
4161
  }
4159
4162
 
4163
+ // src/configs/perfectionist.ts
4164
+ function perfectionist() {
4165
+ return [
4166
+ {
4167
+ name: "jsse:perfectionist",
4168
+ plugins: {
4169
+ perfectionist: default16
4170
+ }
4171
+ }
4172
+ ];
4173
+ }
4174
+
4160
4175
  // src/factory.ts
4161
4176
  import fs2 from "fs";
4162
4177
  import gitignore from "eslint-config-flat-gitignore";
@@ -10999,7 +11014,7 @@ function jsxStylistic({
10999
11014
  };
11000
11015
  }
11001
11016
  function stylistic(options = {}) {
11002
- const { indent = 2, quotes = "double", jsx = true } = options;
11017
+ const { indent = 2, jsx = true, quotes = "double" } = options;
11003
11018
  return [
11004
11019
  {
11005
11020
  name: "jsse:stylistic",
@@ -11083,19 +11098,19 @@ function normalizeOptions(options = {}) {
11083
11098
  function jsse(options = {}, ...userConfigs) {
11084
11099
  const normalizedOptions = normalizeOptions(options);
11085
11100
  const {
11086
- isInEditor: isInEditor2,
11087
- overrides = {},
11088
11101
  componentExts,
11089
- reportUnusedDisableDirectives,
11090
- tsPrefix,
11091
- typeAware,
11092
- off,
11093
11102
  debug,
11094
- typescript: enableTypeScript,
11095
11103
  gitignore: enableGitignore,
11104
+ isInEditor: isInEditor2,
11105
+ off,
11106
+ overrides = {},
11107
+ prettier: enablePrettier,
11096
11108
  react: enableReact,
11109
+ reportUnusedDisableDirectives,
11097
11110
  stylistic: stylisticOptions,
11098
- prettier: enablePrettier
11111
+ tsPrefix,
11112
+ typeAware,
11113
+ typescript: enableTypeScript
11099
11114
  } = normalizedOptions;
11100
11115
  if (debug) {
11101
11116
  console.log("@jsse/eslint-config debug=true");
@@ -11121,7 +11136,8 @@ function jsse(options = {}, ...userConfigs) {
11121
11136
  imports({
11122
11137
  stylistic: stylisticOptions
11123
11138
  }),
11124
- unicorn()
11139
+ unicorn(),
11140
+ perfectionist()
11125
11141
  );
11126
11142
  if (enableTypeScript) {
11127
11143
  configs.push(
@@ -11248,6 +11264,7 @@ export {
11248
11264
  node,
11249
11265
  default14 as parserJsonc,
11250
11266
  parserTs,
11267
+ perfectionist,
11251
11268
  default4 as pluginEslintComments,
11252
11269
  pluginImport,
11253
11270
  default5 as pluginJsdoc,
@@ -11255,6 +11272,7 @@ export {
11255
11272
  default15 as pluginMarkdown,
11256
11273
  default7 as pluginNoOnlyTests,
11257
11274
  default6 as pluginNode,
11275
+ default16 as pluginPerfectionist,
11258
11276
  default8 as pluginReact,
11259
11277
  default9 as pluginReactHooks,
11260
11278
  pluginReactRefresh,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jsse/eslint-config",
3
3
  "type": "module",
4
- "version": "0.0.9",
4
+ "version": "0.0.11",
5
5
  "packageManager": "pnpm@8.8.0",
6
6
  "description": "jsse eslint config",
7
7
  "author": "jessekrubin <jessekrubin@gmail.com> (https://github.com/jessekrubin/)",
@@ -35,13 +35,13 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@antfu/eslint-define-config": "1.23.0-2",
38
- "@eslint/js": "~8.52.0",
39
- "@stylistic/eslint-plugin": "0.1.1",
38
+ "@eslint/js": "~8.53.0",
39
+ "@stylistic/eslint-plugin": "1.2.0",
40
40
  "@typescript-eslint/eslint-plugin": "^6.9.0",
41
41
  "@typescript-eslint/parser": "^6.9.0",
42
42
  "eslint-config-flat-gitignore": "^0.1.1",
43
43
  "eslint-define-config": "^1.24.1",
44
- "eslint-plugin-antfu": "1.0.0-beta.12",
44
+ "eslint-plugin-antfu": "1.0.9",
45
45
  "eslint-plugin-eslint-comments": "^3.2.0",
46
46
  "eslint-plugin-i": "^2.28.1",
47
47
  "eslint-plugin-jsdoc": "^46.8.2",
@@ -49,11 +49,12 @@
49
49
  "eslint-plugin-markdown": "^3.0.1",
50
50
  "eslint-plugin-n": "^16.2.0",
51
51
  "eslint-plugin-no-only-tests": "^3.1.0",
52
+ "eslint-plugin-perfectionist": "^2.3.0",
52
53
  "eslint-plugin-react": "~7.33.2",
53
54
  "eslint-plugin-react-hooks": "~4.6.0",
54
55
  "eslint-plugin-react-refresh": "~0.4.3",
55
56
  "eslint-plugin-tailwindcss": "^3.13.0",
56
- "eslint-plugin-unicorn": "^48.0.1",
57
+ "eslint-plugin-unicorn": "^49.0.0",
57
58
  "eslint-plugin-unused-imports": "^3.0.0",
58
59
  "eslint-plugin-vitest": "^0.3.8",
59
60
  "eslint-plugin-yml": "^1.10.0",
@@ -80,11 +81,11 @@
80
81
  "globals": "^13.23.0",
81
82
  "local-pkg": "^0.5.0",
82
83
  "microdiff": "~1.3.2",
83
- "prettier": "^3.0.3",
84
+ "prettier": "^3.1.0",
84
85
  "react": "~18.2.0",
85
86
  "rimraf": "^5.0.5",
86
87
  "tsup": "^7.2.0",
87
- "tsx": "^3.14.0",
88
+ "tsx": "^4.1.0",
88
89
  "typescript": "^5.2.2",
89
90
  "vitest": "^0.34.6"
90
91
  },