@w5s/eslint-config 3.40.0 → 4.0.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.js CHANGED
@@ -6,28 +6,34 @@ import { eslintIgnores } from "@w5s/eslint-config-ignore";
6
6
  import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
7
7
  import tsPlugin from "@typescript-eslint/eslint-plugin";
8
8
  //#region src/glob.ts
9
- const sourceGlob = Project.extensionsToGlob(Project.sourceExtensions(), { nested: true });
10
- const esSourceGlob = Project.extensionsToGlob(Project.queryExtensions(["javascript", "javascriptreact"]), { nested: true });
11
- const jsxSourceGlob = Project.extensionsToGlob(Project.queryExtensions(["javascriptreact", "typescriptreact"]), { nested: true });
12
- const jsonSourceGlob = Project.extensionsToGlob([
13
- ".json",
14
- ".json5",
15
- ".jsonc"
16
- ], { nested: true });
17
- const tsSourceGlob = Project.extensionsToGlob(Project.queryExtensions(["typescript", "typescriptreact"]), { nested: true });
18
- const ymlSourceGlob = Project.extensionsToGlob(Project.queryExtensions(["yaml"]), { nested: true });
19
- //#endregion
20
- //#region src/internal/withDefaultFiles.ts
21
- /**
22
- * withDefaultFiles
23
- *
24
- * @param options The options to process.
25
- * @param defaultFiles The default files to apply.
26
- * @returns An array of strings representing the combined files.
27
- */
28
- function withDefaultFiles(options, defaultFiles) {
29
- return typeof options === "function" ? options(defaultFiles) : [...options == null ? [] : options.flat(), ...defaultFiles];
30
- }
9
+ const sourceGlob = Project.glob({
10
+ fileExtensions: [Project.sourceExtensions()],
11
+ nested: true
12
+ });
13
+ const esSourceGlob = Project.glob({
14
+ fileExtensions: [Project.queryExtensions(["javascript", "javascriptreact"])],
15
+ nested: true
16
+ });
17
+ const jsxSourceGlob = Project.glob({
18
+ fileExtensions: [Project.queryExtensions(["javascriptreact", "typescriptreact"])],
19
+ nested: true
20
+ });
21
+ const jsonSourceGlob = Project.glob({
22
+ fileExtensions: [[
23
+ ".json",
24
+ ".json5",
25
+ ".jsonc"
26
+ ]],
27
+ nested: true
28
+ });
29
+ const tsSourceGlob = Project.glob({
30
+ fileExtensions: [Project.queryExtensions(["typescript", "typescriptreact"])],
31
+ nested: true
32
+ });
33
+ const ymlSourceGlob = Project.glob({
34
+ fileExtensions: [Project.queryExtensions(["yaml"])],
35
+ nested: true
36
+ });
31
37
  //#endregion
32
38
  //#region src/type/StylisticConfig.ts
33
39
  const defaultConfig = {
@@ -61,6 +67,33 @@ const StylisticConfig = {
61
67
  }
62
68
  };
63
69
  //#endregion
70
+ //#region src/internal/defaultOptions.ts
71
+ /**
72
+ * Return a new plugin option object with default values
73
+ *
74
+ * @param options
75
+ */
76
+ function defaultPluginOptions(options) {
77
+ return {
78
+ ...options,
79
+ namespace: options.namespace ?? "w5s",
80
+ recommended: options.recommended ?? true,
81
+ stylistic: StylisticConfig.from(options.stylistic ?? true)
82
+ };
83
+ }
84
+ //#endregion
85
+ //#region src/internal/withDefaultFiles.ts
86
+ /**
87
+ * withDefaultFiles
88
+ *
89
+ * @param options The options to process.
90
+ * @param defaultFiles The default files to apply.
91
+ * @returns An array of strings representing the combined files.
92
+ */
93
+ function withDefaultFiles(options, defaultFiles) {
94
+ return typeof options === "function" ? options(defaultFiles) : [...options == null ? [] : options.flat(), ...defaultFiles];
95
+ }
96
+ //#endregion
64
97
  //#region src/config/e18e.ts
65
98
  const defaultFiles$11 = [sourceGlob];
66
99
  /**
@@ -69,14 +102,13 @@ const defaultFiles$11 = [sourceGlob];
69
102
  */
70
103
  async function e18e(options = {}) {
71
104
  const [e18ePlugin] = await Promise.all([interopDefault(import("@e18e/eslint-plugin"))]);
72
- const { files, modernization = true, moduleReplacements = false, performanceImprovements = true, rules = {}, stylistic = true } = options;
73
- const { enabled: stylisticEnabled } = StylisticConfig.from(stylistic);
105
+ const { files, modernization = true, moduleReplacements = false, namespace, performanceImprovements = true, rules = {}, stylistic } = defaultPluginOptions(options);
74
106
  return [{
75
- name: "w5s/e18e/setup",
107
+ name: `${namespace}/e18e/setup`,
76
108
  plugins: { e18e: e18ePlugin }
77
109
  }, {
78
110
  files: withDefaultFiles(files, defaultFiles$11),
79
- name: "w5s/e18e/rules",
111
+ name: `${namespace}/e18e/rules`,
80
112
  rules: {
81
113
  ...modernization ? e18ePlugin.configs.modernization.rules : {},
82
114
  ...moduleReplacements ? e18ePlugin.configs.moduleReplacements.rules : {},
@@ -87,7 +119,7 @@ async function e18e(options = {}) {
87
119
  "e18e/prefer-array-to-sorted": "off",
88
120
  "e18e/prefer-array-to-spliced": "off",
89
121
  "e18e/prefer-spread-syntax": "off",
90
- ...stylisticEnabled ? {} : {},
122
+ ...stylistic.enabled ? {} : {},
91
123
  ...rules
92
124
  }
93
125
  }];
@@ -515,7 +547,7 @@ const esRules = lazy(() => ({
515
547
  //#region src/config/es.ts
516
548
  const defaultFiles$10 = [esSourceGlob];
517
549
  async function es(options) {
518
- const { defaultRestrictedGlobals = restrictedGlobals, defaultRestrictedImportPaths = restrictedImportPaths, defaultRestrictedSyntax = restrictedSyntax, recommended = true, restrictedImportPaths: paths, rules = {} } = options;
550
+ const { defaultRestrictedGlobals = restrictedGlobals, defaultRestrictedImportPaths = restrictedImportPaths, defaultRestrictedSyntax = restrictedSyntax, namespace, recommended, restrictedImportPaths: paths, rules = {} } = defaultPluginOptions(options);
519
551
  const resolvedGlobals = typeof options.restrictedGlobals === "function" ? options.restrictedGlobals(defaultRestrictedGlobals) : options.restrictedGlobals ?? defaultRestrictedGlobals;
520
552
  const resolvedPaths = typeof paths === "function" ? paths(defaultRestrictedImportPaths) : paths ?? defaultRestrictedImportPaths;
521
553
  const resolvedSyntax = typeof options.restrictedSyntax === "function" ? options.restrictedSyntax(defaultRestrictedSyntax) : options.restrictedSyntax ?? defaultRestrictedSyntax;
@@ -542,11 +574,11 @@ async function es(options) {
542
574
  sourceType: "module"
543
575
  },
544
576
  linterOptions: { reportUnusedDisableDirectives: true },
545
- name: "w5s/es/setup"
577
+ name: `${namespace}/es/setup`
546
578
  },
547
579
  {
548
580
  files: [sourceGlob],
549
- name: "w5s/source/restricted-rules",
581
+ name: `${namespace}/source/restricted-rules`,
550
582
  rules: {
551
583
  "no-restricted-globals": ["error", ...resolvedGlobals],
552
584
  "no-restricted-imports": ["error", { paths: resolvedPaths }],
@@ -555,7 +587,7 @@ async function es(options) {
555
587
  },
556
588
  {
557
589
  files: defaultFiles$10,
558
- name: "w5s/es/rules",
590
+ name: `${namespace}/es/rules`,
559
591
  rules: {
560
592
  ...recommended ? es.recommended : {},
561
593
  ...rules
@@ -578,17 +610,16 @@ async function ignores(options = {}) {
578
610
  //#endregion
579
611
  //#region src/config/imports.ts
580
612
  async function imports(options = {}) {
581
- const { recommended = true, rules = {}, stylistic = true } = options;
582
- const { enabled: stylisticEnabled } = StylisticConfig.from(stylistic);
613
+ const { namespace, recommended, rules = {}, stylistic } = defaultPluginOptions(options);
583
614
  const [importPlugin] = await Promise.all([interopDefault(import("eslint-plugin-import"))]);
584
615
  return [{
585
- name: "w5s/import/setup",
616
+ name: `${namespace}/import/setup`,
586
617
  plugins: { import: importPlugin }
587
618
  }, {
588
- name: "w5s/import/rules",
619
+ name: `${namespace}/import/rules`,
589
620
  rules: {
590
621
  ...recommended ? imports.recommended : {},
591
- ...stylisticEnabled ? imports.stylistic : {},
622
+ ...stylistic.enabled ? imports.stylistic : {},
592
623
  ...rules
593
624
  }
594
625
  }];
@@ -612,10 +643,9 @@ const defaultJsFiles = [esSourceGlob];
612
643
  const defaultTsFiles = [tsSourceGlob];
613
644
  async function jsdoc(options = {}) {
614
645
  const [jsdocPlugin] = await Promise.all([interopDefault(import("eslint-plugin-jsdoc"))]);
615
- const { files, recommended = true, rules = {}, stylistic = true } = options;
616
- const { enabled: stylisticEnabled } = StylisticConfig.from(stylistic);
646
+ const { files, namespace, recommended, rules = {}, stylistic } = defaultPluginOptions(options);
617
647
  const recommendedRules = recommended ? jsdocPlugin.configs["flat/recommended-typescript-flavor"].rules : {};
618
- const stylisticRules = stylisticEnabled ? {
648
+ const stylisticRules = stylistic.enabled ? {
619
649
  ...jsdocPlugin.configs["flat/stylistic-typescript-flavor"].rules,
620
650
  "jsdoc/check-alignment": "warn",
621
651
  "jsdoc/multiline-blocks": "warn",
@@ -627,12 +657,12 @@ async function jsdoc(options = {}) {
627
657
  } : {};
628
658
  return [
629
659
  {
630
- name: "w5s/jsdoc/setup",
660
+ name: `${namespace}/jsdoc/setup`,
631
661
  plugins: { jsdoc: jsdocPlugin }
632
662
  },
633
663
  {
634
664
  files: withDefaultFiles(files, defaultJsFiles),
635
- name: "w5s/jsdoc/rules-js",
665
+ name: `${namespace}/jsdoc/rules-js`,
636
666
  rules: {
637
667
  ...recommendedRules,
638
668
  ...recommended ? {
@@ -652,7 +682,7 @@ async function jsdoc(options = {}) {
652
682
  },
653
683
  {
654
684
  files: withDefaultFiles(files, defaultTsFiles),
655
- name: "w5s/jsdoc/rules-ts",
685
+ name: `${namespace}/jsdoc/rules-ts`,
656
686
  rules: {
657
687
  ...recommendedRules,
658
688
  ...recommended ? {
@@ -678,24 +708,23 @@ async function jsdoc(options = {}) {
678
708
  const defaultFiles$9 = [jsonSourceGlob];
679
709
  async function jsonc(options = {}) {
680
710
  const [jsoncPlugin, jsoncParser] = await Promise.all([interopDefault(import("eslint-plugin-jsonc")), interopDefault(import("jsonc-eslint-parser"))]);
681
- const { files, recommended = true, rules = {}, stylistic = true } = options;
682
- const { enabled: stylisticEnabled, indent } = StylisticConfig.from(stylistic);
711
+ const { files, namespace, recommended, rules = {}, stylistic } = defaultPluginOptions(options);
683
712
  return [
684
713
  {
685
- name: "w5s/jsonc/setup",
714
+ name: `${namespace}/jsonc/setup`,
686
715
  plugins: { jsonc: jsoncPlugin }
687
716
  },
688
717
  {
689
718
  files: withDefaultFiles(files, defaultFiles$9),
690
719
  languageOptions: { parser: jsoncParser },
691
- name: "w5s/jsonc/rules",
720
+ name: `${namespace}/jsonc/rules`,
692
721
  rules: {
693
722
  ...recommended ? jsoncPlugin.configs["flat/recommended-with-json"][0]?.rules : {},
694
- ...stylisticEnabled ? {
723
+ ...stylistic.enabled ? {
695
724
  "jsonc/array-bracket-spacing": ["error", "never"],
696
725
  "jsonc/comma-dangle": ["error", "never"],
697
726
  "jsonc/comma-style": ["error", "last"],
698
- "jsonc/indent": ["error", indent],
727
+ "jsonc/indent": ["error", stylistic.indent],
699
728
  "jsonc/key-spacing": ["error", {
700
729
  afterColon: true,
701
730
  beforeColon: false
@@ -712,8 +741,8 @@ async function jsonc(options = {}) {
712
741
  ...rules
713
742
  }
714
743
  },
715
- stylisticEnabled ? sortPackageJson() : {},
716
- stylisticEnabled ? sortTsconfigJson() : {}
744
+ stylistic.enabled ? sortPackageJson() : {},
745
+ stylistic.enabled ? sortTsconfigJson() : {}
717
746
  ];
718
747
  }
719
748
  function sortPackageJson() {
@@ -915,18 +944,18 @@ function sortTsconfigJson() {
915
944
  //#region src/config/jsx.ts
916
945
  const defaultFiles$8 = [jsxSourceGlob];
917
946
  async function jsx(options = {}) {
918
- const { files, jsxA11y = false, recommended = true, rules = {} } = options;
947
+ const { files, jsxA11y = false, namespace, recommended, rules = {} } = defaultPluginOptions(options);
919
948
  const [jsxA11yPlugin] = await Promise.all([jsxA11y ? interopDefault(import("eslint-plugin-jsx-a11y")) : void 0]);
920
949
  return [{
921
950
  languageOptions: {
922
951
  parserOptions: { ecmaFeatures: { jsx: true } },
923
952
  sourceType: "module"
924
953
  },
925
- name: "w5s/jsx/setup",
954
+ name: `${namespace}/jsx/setup`,
926
955
  plugins: { ...jsxA11yPlugin ? { "jsx-a11y": jsxA11yPlugin } : {} }
927
956
  }, {
928
957
  files: withDefaultFiles(files, defaultFiles$8),
929
- name: "w5s/jsx/rules",
958
+ name: `${namespace}/jsx/rules`,
930
959
  rules: {
931
960
  ...recommended && jsxA11yPlugin != null ? jsxA11yPlugin.configs.recommended.rules : {},
932
961
  ...rules
@@ -956,15 +985,17 @@ const looseRules = lazy(() => {
956
985
  });
957
986
  //#endregion
958
987
  //#region src/config/markdown.ts
959
- const defaultFiles$7 = [Project.extensionsToGlob(Project.queryExtensions(["markdown"]), { nested: true })];
988
+ const defaultFiles$7 = [Project.glob({
989
+ fileExtensions: [Project.queryExtensions(["markdown"])],
990
+ nested: true
991
+ })];
960
992
  async function markdown(options = {}) {
961
993
  const [markdownPlugin] = await Promise.all([interopDefault(import("@eslint/markdown"))]);
962
- const { files, language = "markdown/gfm", languageOptions, recommended = true, rules = {}, stylistic = true } = options;
963
- const { enabled: stylisticEnabled } = StylisticConfig.from(stylistic);
994
+ const { files, language = "markdown/gfm", languageOptions, namespace, recommended, rules = {}, stylistic } = defaultPluginOptions(options);
964
995
  const resolvedFiles = withDefaultFiles(files, defaultFiles$7);
965
996
  return [
966
997
  {
967
- name: "w5s/markdown/setup",
998
+ name: `${namespace}/markdown/setup`,
968
999
  plugins: { markdown: markdownPlugin }
969
1000
  },
970
1001
  {
@@ -974,11 +1005,11 @@ async function markdown(options = {}) {
974
1005
  frontmatter: "yaml",
975
1006
  ...languageOptions
976
1007
  },
977
- name: "w5s/markdown/rules",
1008
+ name: `${namespace}/markdown/rules`,
978
1009
  processor: mergeProcessors([markdownPlugin.processors.markdown, processorPassThrough]),
979
1010
  rules: {
980
1011
  ...recommended ? markdownPlugin.configs.recommended.at(0)?.rules : {},
981
- ...stylisticEnabled ? {} : {},
1012
+ ...stylistic.enabled ? {} : {},
982
1013
  ...rules
983
1014
  }
984
1015
  },
@@ -988,7 +1019,7 @@ async function markdown(options = {}) {
988
1019
  project: false,
989
1020
  projectService: false
990
1021
  } },
991
- name: "w5s/markdown/embed-code",
1022
+ name: `${namespace}/markdown/embed-code`,
992
1023
  rules: {
993
1024
  ...looseRules(),
994
1025
  "no-alert": "off",
@@ -1019,7 +1050,7 @@ async function markdown(options = {}) {
1019
1050
  const defaultFiles$6 = [sourceGlob];
1020
1051
  async function next(options = {}) {
1021
1052
  const [nextPlugin] = await Promise.all([interopDefault(import("@next/eslint-plugin-next"))]);
1022
- const { files, recommended = true, rules = {} } = options;
1053
+ const { files, recommended, rules = {} } = options;
1023
1054
  return [{
1024
1055
  name: "w5s/next/setup",
1025
1056
  plugins: { next: nextPlugin }
@@ -1069,17 +1100,16 @@ async function node(options = {}) {
1069
1100
  const defaultFiles$5 = [sourceGlob];
1070
1101
  async function perfectionist(options = {}) {
1071
1102
  const [perfectionistPlugin] = await Promise.all([interopDefault(import("eslint-plugin-perfectionist"))]);
1072
- const { files, recommended = true, rules = {}, stylistic = true } = options;
1073
- const { enabled: stylisticEnabled } = StylisticConfig.from(stylistic);
1103
+ const { files, namespace, recommended, rules = {}, stylistic } = defaultPluginOptions(options);
1074
1104
  return [{
1075
- name: "w5s/perfectionist/setup",
1105
+ name: `${namespace}/perfectionist/setup`,
1076
1106
  plugins: { perfectionist: perfectionistPlugin }
1077
1107
  }, {
1078
1108
  files: withDefaultFiles(files, defaultFiles$5),
1079
- name: "w5s/perfectionist/rules",
1109
+ name: `${namespace}/perfectionist/rules`,
1080
1110
  rules: {
1081
1111
  ...recommended ? perfectionistPlugin.configs["recommended-natural"].rules : {},
1082
- ...stylisticEnabled ? {} : {},
1112
+ ...stylistic.enabled ? {} : {},
1083
1113
  ...rules
1084
1114
  }
1085
1115
  }];
@@ -1089,9 +1119,9 @@ async function perfectionist(options = {}) {
1089
1119
  const defaultFiles$4 = [sourceGlob];
1090
1120
  async function react(options = {}) {
1091
1121
  const [reactPlugin] = await Promise.all([interopDefault(import("@eslint-react/eslint-plugin"))]);
1092
- const { files, recommended = true, rules = {} } = options;
1122
+ const { files, namespace, recommended, rules = {} } = defaultPluginOptions(options);
1093
1123
  return [{
1094
- name: "w5s/react/setup",
1124
+ name: `${namespace}/react/setup`,
1095
1125
  plugins: { react: reactPlugin }
1096
1126
  }, {
1097
1127
  files: withDefaultFiles(files, defaultFiles$4),
@@ -1099,7 +1129,7 @@ async function react(options = {}) {
1099
1129
  parserOptions: { ecmaFeatures: { jsx: true } },
1100
1130
  sourceType: "module"
1101
1131
  },
1102
- name: "w5s/react/rules",
1132
+ name: `${namespace}/react/rules`,
1103
1133
  rules: {
1104
1134
  ...recommended ? ESLintConfig.renameRules(reactPlugin.configs.recommended.rules, { "@eslint-react": "react" }) : {},
1105
1135
  ...rules
@@ -1158,14 +1188,13 @@ async function stylistic(options = {}) {
1158
1188
  const defaultFiles$3 = Project.extensionsToTestGlob(Project.sourceExtensions());
1159
1189
  async function test(options = {}) {
1160
1190
  const [vitestPlugin] = await Promise.all([interopDefault(import("@vitest/eslint-plugin"))]);
1161
- const { files, recommended = true, rules = {}, stylistic = true } = options;
1162
- const { enabled: stylisticEnabled } = StylisticConfig.from(stylistic);
1191
+ const { files, namespace, recommended, rules = {}, stylistic } = defaultPluginOptions(options);
1163
1192
  return [{
1164
- name: "w5s/test/setup",
1193
+ name: `${namespace}/test/setup`,
1165
1194
  plugins: { test: vitestPlugin }
1166
1195
  }, {
1167
1196
  files: withDefaultFiles(files, defaultFiles$3),
1168
- name: "w5s/test/rules",
1197
+ name: `${namespace}/test/rules`,
1169
1198
  rules: {
1170
1199
  ...recommended ? {
1171
1200
  ...ESLintConfig.renameRules(vitestPlugin.configs.recommended.rules, { vitest: "test" }),
@@ -1173,7 +1202,7 @@ async function test(options = {}) {
1173
1202
  "test/expect-expect": ["error", { assertFunctionNames: ["expect*", "assert*"] }],
1174
1203
  "test/valid-title": ESLintConfig.fixme(void 0)
1175
1204
  } : {},
1176
- ...stylisticEnabled ? {} : {},
1205
+ ...stylistic.enabled ? {} : {},
1177
1206
  ...rules
1178
1207
  }
1179
1208
  }];
@@ -1225,12 +1254,11 @@ const tsRenameMap = { "@typescript-eslint": "ts" };
1225
1254
  const defaultFiles$2 = [tsSourceGlob];
1226
1255
  async function ts(options = {}) {
1227
1256
  const [tsPlugin, tsParser] = await Promise.all([interopDefault(import("@typescript-eslint/eslint-plugin")), interopDefault(import("@typescript-eslint/parser"))]);
1228
- const { files, parserOptions = {}, recommended = true, rules = {}, stylistic = true, tsconfigPath = "./tsconfig.json", typeChecked = true } = options;
1229
- const { enabled: stylisticEnabled } = StylisticConfig.from(stylistic);
1257
+ const { files, namespace, parserOptions = {}, recommended, rules = {}, stylistic, tsconfigPath = "./tsconfig.json", typeChecked = true } = defaultPluginOptions(options);
1230
1258
  const tsCustomRules = tsRules();
1231
1259
  const resolvedFiles = withDefaultFiles(files, defaultFiles$2);
1232
1260
  return [{
1233
- name: "w5s/ts/setup",
1261
+ name: `${namespace}/ts/setup`,
1234
1262
  plugins: { ts: tsPlugin }
1235
1263
  }, {
1236
1264
  files: resolvedFiles,
@@ -1248,13 +1276,13 @@ async function ts(options = {}) {
1248
1276
  ...parserOptions
1249
1277
  }
1250
1278
  },
1251
- name: "w5s/ts/rules",
1279
+ name: `${namespace}/ts/rules`,
1252
1280
  rules: {
1253
1281
  ...recommended ? ESLintConfig.renameRules(tsPlugin.configs["eslint-recommended"].overrides[0].rules, tsRenameMap) : {},
1254
1282
  ...recommended ? ESLintConfig.renameRules(tsPlugin.configs["strict"].rules, tsRenameMap) : {},
1255
1283
  ...recommended && typeChecked ? ESLintConfig.renameRules(tsPlugin.configs["recommended-type-checked-only"].rules, tsRenameMap) : {},
1256
1284
  ...recommended ? tsCustomRules : {},
1257
- ...stylisticEnabled ? {
1285
+ ...stylistic.enabled ? {
1258
1286
  ...ESLintConfig.renameRules(tsPlugin.configs["stylistic"]?.rules, tsRenameMap),
1259
1287
  ...typeChecked ? ESLintConfig.renameRules(tsPlugin.configs["stylistic-type-checked-only"].rules, tsRenameMap) : {},
1260
1288
  "ts/array-type": ["error", { default: "generic" }],
@@ -1290,16 +1318,15 @@ async function ts(options = {}) {
1290
1318
  const defaultFiles$1 = [sourceGlob];
1291
1319
  async function unicorn(options = {}) {
1292
1320
  const [unicornPlugin] = await Promise.all([interopDefault(import("eslint-plugin-unicorn"))]);
1293
- const { files, recommended = true, rules = {}, stylistic = true } = options;
1294
- const { enabled: stylisticEnabled } = StylisticConfig.from(stylistic);
1321
+ const { files, namespace, recommended, rules = {}, stylistic } = defaultPluginOptions(options);
1295
1322
  return [
1296
1323
  {
1297
- name: "w5s/unicorn/setup",
1324
+ name: `${namespace}/unicorn/setup`,
1298
1325
  plugins: { unicorn: unicornPlugin }
1299
1326
  },
1300
1327
  {
1301
1328
  files: withDefaultFiles(files, defaultFiles$1),
1302
- name: "w5s/unicorn/rules",
1329
+ name: `${namespace}/unicorn/rules`,
1303
1330
  rules: {
1304
1331
  ...recommended && unicornPlugin.configs.unopinionated.rules,
1305
1332
  "unicorn/new-for-builtins": "off",
@@ -1313,13 +1340,13 @@ async function unicorn(options = {}) {
1313
1340
  "unicorn/prefer-default-parameters": "off",
1314
1341
  "unicorn/prefer-set-has": "off",
1315
1342
  "unicorn/throw-new-error": "off",
1316
- ...stylisticEnabled ? {} : {},
1343
+ ...stylistic.enabled ? {} : {},
1317
1344
  ...rules
1318
1345
  }
1319
1346
  },
1320
1347
  {
1321
1348
  files: ["**/*.config.cjs", "**/*.config.js"],
1322
- name: "w5s/unicorn/overrides",
1349
+ name: `${namespace}/unicorn/overrides`,
1323
1350
  rules: { "unicorn/prefer-module": "off" }
1324
1351
  }
1325
1352
  ];
@@ -1328,7 +1355,7 @@ async function unicorn(options = {}) {
1328
1355
  //#region src/config/unused-imports.ts
1329
1356
  async function unusedImports(options = {}) {
1330
1357
  const [unusedImportPlugin] = await Promise.all([interopDefault(import("eslint-plugin-unused-imports"))]);
1331
- const { files = [sourceGlob], recommended = true, rules = {} } = options;
1358
+ const { files = [sourceGlob], recommended, rules = {} } = defaultPluginOptions(options);
1332
1359
  return [{
1333
1360
  name: "w5s/unused-imports/setup",
1334
1361
  plugins: { "unused-imports": unusedImportPlugin }
@@ -1356,15 +1383,15 @@ async function unusedImports(options = {}) {
1356
1383
  const defaultFiles = [ymlSourceGlob];
1357
1384
  async function yml(options = {}) {
1358
1385
  const [ymlPlugin] = await Promise.all([interopDefault(import("eslint-plugin-yml"))]);
1359
- const { files, recommended = true, rules = {}, stylistic = true } = options;
1360
- const { enabled: stylisticEnabled, indent, quotes } = StylisticConfig.from(stylistic);
1386
+ const { files, namespace, recommended, rules = {}, stylistic } = defaultPluginOptions(options);
1387
+ const { enabled: stylisticEnabled, indent, quotes } = stylistic;
1361
1388
  return [{
1362
- name: "w5s/yml/setup",
1389
+ name: `${namespace}/yml/setup`,
1363
1390
  plugins: { yml: ymlPlugin }
1364
1391
  }, {
1365
1392
  files: withDefaultFiles(files, defaultFiles),
1366
1393
  language: "yml/yaml",
1367
- name: "w5s/yml/rules",
1394
+ name: `${namespace}/yml/rules`,
1368
1395
  rules: {
1369
1396
  ...recommended ? ymlPlugin.configs.recommended.reduce((acc, config) => ({
1370
1397
  ...acc,
@@ -1416,9 +1443,9 @@ async function defineConfig(options = {}) {
1416
1443
  //#endregion
1417
1444
  //#region src/meta.ts
1418
1445
  const meta = Object.freeze({
1419
- buildNumber: 1789649127,
1446
+ buildNumber: 1790065426,
1420
1447
  name: "@w5s/eslint-config",
1421
- version: "3.40.0"
1448
+ version: "4.0.0"
1422
1449
  });
1423
1450
  //#endregion
1424
1451
  export { StylisticConfig, defineConfig, e18e, es, ignores, imports, jsdoc, jsonc, jsx, markdown, meta, next, node, perfectionist, react, restrictedGlobals, restrictedImportPaths, restrictedSyntax, stylistic, test, ts, unicorn, unusedImports, yml };