@jsse/eslint-config 0.1.17 → 0.1.18

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
@@ -612,7 +612,7 @@ var CAC = class extends import_events.EventEmitter {
612
612
  var cac = (name = "") => new CAC(name);
613
613
 
614
614
  // package.json
615
- var version = "0.1.17";
615
+ var version = "0.1.18";
616
616
 
617
617
  // src/cli.ts
618
618
  var cli = cac("jsselint");
package/dist/cli.js CHANGED
@@ -588,7 +588,7 @@ var CAC = class extends EventEmitter {
588
588
  var cac = (name = "") => new CAC(name);
589
589
 
590
590
  // package.json
591
- var version = "0.1.17";
591
+ var version = "0.1.18";
592
592
 
593
593
  // src/cli.ts
594
594
  var cli = cac("jsselint");
package/dist/index.cjs CHANGED
@@ -2945,6 +2945,7 @@ __export(src_exports, {
2945
2945
  importPluginReactRefresh: () => importPluginReactRefresh,
2946
2946
  importPluginStylistic: () => importPluginStylistic,
2947
2947
  importPluginTailwind: () => importPluginTailwind,
2948
+ importPluginTsdoc: () => importPluginTsdoc,
2948
2949
  importReactPlugins: () => importReactPlugins,
2949
2950
  importYmlLibs: () => importYmlLibs,
2950
2951
  interopDefault: () => interopDefault2,
@@ -9991,6 +9992,12 @@ async function importPluginJsdoc() {
9991
9992
  pluginJsdoc
9992
9993
  };
9993
9994
  }
9995
+ async function importPluginTsdoc() {
9996
+ const pluginTsdoc = await interopDefault2(import("eslint-plugin-tsdoc"));
9997
+ return {
9998
+ pluginTsdoc
9999
+ };
10000
+ }
9994
10001
  async function importPluginStylistic() {
9995
10002
  const pluginStylistic = await interopDefault2(
9996
10003
  import("@stylistic/eslint-plugin")
@@ -10008,7 +10015,7 @@ async function importPluginTailwind() {
10008
10015
  var antfu = async () => {
10009
10016
  return [
10010
10017
  {
10011
- name: "jsse:antfu",
10018
+ name: "jsse/antfu",
10012
10019
  plugins: {
10013
10020
  antfu: import_eslint_plugin_antfu.default
10014
10021
  },
@@ -10020,7 +10027,7 @@ var antfu = async () => {
10020
10027
  },
10021
10028
  {
10022
10029
  files: ["**/src/**/*"],
10023
- name: "jsse:antfu:src",
10030
+ name: "jsse/antfu/src",
10024
10031
  // @ts-expect-error - antfu plugin types err
10025
10032
  rules: {
10026
10033
  "antfu/no-import-dist": "error"
@@ -10028,7 +10035,7 @@ var antfu = async () => {
10028
10035
  },
10029
10036
  {
10030
10037
  files: ["**/bin/**/*", `**/bin.${GLOB_SRC_EXT}`],
10031
- name: "jsse:antfu:bin",
10038
+ name: "jsse/antfu/bin",
10032
10039
  rules: {
10033
10040
  "antfu/no-import-dist": "off",
10034
10041
  "antfu/no-import-node-modules-by-path": "off"
@@ -10040,7 +10047,7 @@ var antfu = async () => {
10040
10047
  // src/configs/comments.ts
10041
10048
  var comments = async () => [
10042
10049
  {
10043
- name: "jsse:eslint-comments",
10050
+ name: "jsse/eslint-comments",
10044
10051
  plugins: {
10045
10052
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
10046
10053
  "eslint-comments": import_eslint_plugin_eslint_comments.default
@@ -10068,7 +10075,7 @@ var imports = async (options) => {
10068
10075
  const { stylistic: stylistic2 = true } = options ?? {};
10069
10076
  return [
10070
10077
  {
10071
- name: "jsse:import",
10078
+ name: "jsse/import",
10072
10079
  plugins: {
10073
10080
  import: pluginImport
10074
10081
  },
@@ -10124,7 +10131,7 @@ var javascript = async (options) => {
10124
10131
  linterOptions: {
10125
10132
  reportUnusedDisableDirectives
10126
10133
  },
10127
- name: "jsse:javascript",
10134
+ name: "jsse/javascript",
10128
10135
  plugins: {
10129
10136
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
10130
10137
  "unused-imports": import_eslint_plugin_unused_imports.default
@@ -10345,7 +10352,7 @@ var javascript = async (options) => {
10345
10352
  },
10346
10353
  {
10347
10354
  files: [`scripts/${GLOB_SRC}`, `cli.${GLOB_SRC_EXT}`],
10348
- name: "jsse:scripts-overrides",
10355
+ name: "jsse/scripts-overrides",
10349
10356
  rules: {
10350
10357
  "no-console": "off"
10351
10358
  }
@@ -10358,7 +10365,7 @@ var jsdoc = async () => {
10358
10365
  const { pluginJsdoc } = await importPluginJsdoc();
10359
10366
  return [
10360
10367
  {
10361
- name: "jsse:jsdoc",
10368
+ name: "jsse/jsdoc",
10362
10369
  plugins: {
10363
10370
  jsdoc: pluginJsdoc
10364
10371
  },
@@ -10385,6 +10392,23 @@ var jsdoc = async () => {
10385
10392
  ];
10386
10393
  };
10387
10394
 
10395
+ // src/configs/tsdoc.ts
10396
+ var tsdoc = async () => {
10397
+ const { pluginTsdoc } = await importPluginTsdoc();
10398
+ return [
10399
+ {
10400
+ files: ["*.ts", "*.tsx"],
10401
+ name: "jsse/tsdoc",
10402
+ plugins: {
10403
+ tsdoc: pluginTsdoc
10404
+ },
10405
+ rules: {
10406
+ "tsdoc/syntax": "warn"
10407
+ }
10408
+ }
10409
+ ];
10410
+ };
10411
+
10388
10412
  // src/configs/jsonc.ts
10389
10413
  var jsonc = async (options) => {
10390
10414
  const { overrides = {}, stylistic: stylistic2 = true } = options ?? {};
@@ -10392,7 +10416,7 @@ var jsonc = async (options) => {
10392
10416
  const { parserJsonc, pluginJsonc } = await importJsoncLibs();
10393
10417
  return [
10394
10418
  {
10395
- name: "jsse:jsonc:setup",
10419
+ name: "jsse/jsonc/setup",
10396
10420
  plugins: {
10397
10421
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
10398
10422
  jsonc: pluginJsonc
@@ -10404,7 +10428,7 @@ var jsonc = async (options) => {
10404
10428
  languageOptions: {
10405
10429
  parser: parserJsonc
10406
10430
  },
10407
- name: "jsse:jsonc:rules",
10431
+ name: "jsse/jsonc/rules",
10408
10432
  rules: {
10409
10433
  "jsonc/no-bigint-literals": "error",
10410
10434
  "jsonc/no-binary-expression": "error",
@@ -10915,7 +10939,7 @@ var markdown = async (options) => {
10915
10939
  );
10916
10940
  return [
10917
10941
  {
10918
- name: "jsse:markdown:setup",
10942
+ name: "jsse/markdown/setup",
10919
10943
  plugins: {
10920
10944
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
10921
10945
  markdown: pluginMarkdown
@@ -10923,7 +10947,7 @@ var markdown = async (options) => {
10923
10947
  },
10924
10948
  {
10925
10949
  files: [GLOB_MARKDOWN],
10926
- name: "jsse:markdown:processor",
10950
+ name: "jsse/markdown/processor",
10927
10951
  processor: "markdown/markdown"
10928
10952
  },
10929
10953
  {
@@ -10938,7 +10962,7 @@ var markdown = async (options) => {
10938
10962
  }
10939
10963
  }
10940
10964
  },
10941
- name: "jsse:markdown:rules",
10965
+ name: "jsse/markdown/rules",
10942
10966
  rules: {
10943
10967
  "@typescript-eslint/await-thenable": "off",
10944
10968
  "@typescript-eslint/consistent-type-imports": "off",
@@ -10987,7 +11011,7 @@ var markdown = async (options) => {
10987
11011
  var n = async () => {
10988
11012
  return [
10989
11013
  {
10990
- name: "jsse:n",
11014
+ name: "jsse/n",
10991
11015
  plugins: {
10992
11016
  n: import_eslint_plugin_n.default
10993
11017
  },
@@ -11009,7 +11033,7 @@ var n = async () => {
11009
11033
  var perfectionist = async () => {
11010
11034
  return [
11011
11035
  {
11012
- name: "jsse:perfectionist",
11036
+ name: "jsse/perfectionist",
11013
11037
  plugins: {
11014
11038
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
11015
11039
  perfectionist: import_eslint_plugin_perfectionist.default
@@ -11136,7 +11160,7 @@ function eslintConfigPrettierRules() {
11136
11160
  var prettier = async () => {
11137
11161
  return [
11138
11162
  {
11139
- name: "jsse:prettier:config",
11163
+ name: "jsse/prettier/config",
11140
11164
  rules: eslintConfigPrettierRules()
11141
11165
  }
11142
11166
  ];
@@ -11346,14 +11370,14 @@ function reactRefreshFlatConfigRules() {
11346
11370
  return [
11347
11371
  {
11348
11372
  files: [GLOB_SRC],
11349
- name: "jsse:react:refresh",
11373
+ name: "jsse/react/refresh",
11350
11374
  rules: {
11351
11375
  "react-refresh/only-export-components": "error"
11352
11376
  }
11353
11377
  },
11354
11378
  {
11355
11379
  files: ["**/*.stories.tsx"],
11356
- name: "jsse:react:refresh:stories",
11380
+ name: "jsse/react:refresh/stories",
11357
11381
  rules: {
11358
11382
  "react-refresh/only-export-components": "off"
11359
11383
  }
@@ -11406,7 +11430,7 @@ var react = async (options) => {
11406
11430
  react: react2,
11407
11431
  tsconfig
11408
11432
  }),
11409
- name: "jsse:react:setup",
11433
+ name: "jsse/react/setup",
11410
11434
  plugins: {
11411
11435
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
11412
11436
  react: pluginReact,
@@ -11443,7 +11467,7 @@ var sortPackageJson = async () => {
11443
11467
  return [
11444
11468
  {
11445
11469
  files: ["**/package.json"],
11446
- name: "jsse:sort:package-json",
11470
+ name: "jsse/sort/package-json",
11447
11471
  rules: {
11448
11472
  "jsonc/sort-array-values": [
11449
11473
  "error",
@@ -11529,7 +11553,7 @@ var sortTsconfig = async () => {
11529
11553
  return [
11530
11554
  {
11531
11555
  files: ["**/tsconfig.json", "**/tsconfig.*.json"],
11532
- name: "jsse:sort:tsconfig",
11556
+ name: "jsse/sort/tsconfig",
11533
11557
  rules: {
11534
11558
  "jsonc/sort-keys": [
11535
11559
  "error",
@@ -11673,7 +11697,7 @@ var stylistic = async (options) => {
11673
11697
  const { pluginStylistic } = await importPluginStylistic();
11674
11698
  return [
11675
11699
  {
11676
- name: "jsse:stylistic",
11700
+ name: "jsse/stylistic",
11677
11701
  plugins: {
11678
11702
  // eslint-disable-next-line @typescript-eslint/naming-convention
11679
11703
  "@stylistic": pluginStylistic
@@ -11718,7 +11742,7 @@ var tailwind = async (options) => {
11718
11742
  return [
11719
11743
  {
11720
11744
  files: [GLOB_SRC],
11721
- name: "jsse:tailwind:rules",
11745
+ name: "jsse/tailwind/rules",
11722
11746
  plugins: {
11723
11747
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
11724
11748
  tailwindcss: pluginTailwind
@@ -11744,7 +11768,7 @@ var noOnlyTests = async (options = {}) => {
11744
11768
  );
11745
11769
  return [
11746
11770
  {
11747
- name: "jsse:no-only-tests:setup",
11771
+ name: "jsse/no-only-tests/setup",
11748
11772
  plugins: {
11749
11773
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
11750
11774
  "no-only-tests": pluginNoOnlyTests
@@ -11752,7 +11776,7 @@ var noOnlyTests = async (options = {}) => {
11752
11776
  },
11753
11777
  {
11754
11778
  files: GLOB_TESTS,
11755
- name: "jsse:no-only-tests:rules",
11779
+ name: "jsse/no-only-tests/rules",
11756
11780
  rules: {
11757
11781
  "no-only-tests/no-only-tests": isInEditor2 ? "off" : isCI() ? "error" : "warn",
11758
11782
  "unicorn/no-null": "off",
@@ -11789,7 +11813,7 @@ var typescript = async (options) => {
11789
11813
  return [
11790
11814
  {
11791
11815
  // Install the plugins without globs, so they can be configured separately.
11792
- name: "jsse:typescript:setup",
11816
+ name: "jsse/typescript/setup",
11793
11817
  plugins: {
11794
11818
  import: pluginImport,
11795
11819
  [tsPrefixTo]: import_eslint_plugin.default
@@ -11804,17 +11828,17 @@ var typescript = async (options) => {
11804
11828
  react: react2,
11805
11829
  tsconfig: tsconfigPath
11806
11830
  }),
11807
- name: "jsse:typescript:parser"
11831
+ name: "jsse/typescript/parser"
11808
11832
  },
11809
11833
  {
11810
11834
  // only apply ts rules to ts files!
11811
11835
  files: [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)],
11812
- name: "jsse:typescript:rules",
11836
+ name: "jsse/typescript/rules",
11813
11837
  rules: renameRules(tsrules || {}, tsPrefix, tsPrefixTo)
11814
11838
  },
11815
11839
  {
11816
11840
  files: ["**/*.d.ts"],
11817
- name: "jsse:typescript:disables:dts",
11841
+ name: "jsse/typescript:disables/dts",
11818
11842
  rules: {
11819
11843
  "eslint-comments/no-unlimited-disable": "off",
11820
11844
  "import/no-duplicates": "off",
@@ -11824,7 +11848,7 @@ var typescript = async (options) => {
11824
11848
  },
11825
11849
  {
11826
11850
  files: ["**/*.{test,spec}.ts?(x)"],
11827
- name: "jsse:typescript:disable:test",
11851
+ name: "jsse/typescript:disable/test",
11828
11852
  rules: {
11829
11853
  "@typescript-eslint/no-unused-expressions": "off",
11830
11854
  "no-unused-expressions": "off"
@@ -11832,7 +11856,7 @@ var typescript = async (options) => {
11832
11856
  },
11833
11857
  {
11834
11858
  files: ["**/*.js", "**/*.cjs"],
11835
- name: "jsse:typescript:javascript-overrides",
11859
+ name: "jsse/typescript/javascript-overrides",
11836
11860
  rules: {
11837
11861
  "@typescript-eslint/no-require-imports": "off",
11838
11862
  "@typescript-eslint/no-var-requires": "off"
@@ -11864,7 +11888,7 @@ function unicornRecommended() {
11864
11888
  var unicorn = async () => {
11865
11889
  return [
11866
11890
  {
11867
- name: "jsse:unicorn",
11891
+ name: "jsse/unicorn",
11868
11892
  plugins: {
11869
11893
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
11870
11894
  unicorn: import_eslint_plugin_unicorn.default
@@ -11944,7 +11968,7 @@ var unicorn = async () => {
11944
11968
  },
11945
11969
  {
11946
11970
  files: GLOB_TESTS,
11947
- name: "jsse:unicorn:tests",
11971
+ name: "jsse/unicorn/tests",
11948
11972
  rules: {
11949
11973
  "unicorn/no-null": "off",
11950
11974
  "unicorn/no-unused-properties": "off"
@@ -11959,14 +11983,14 @@ var vitest = async (options = {}) => {
11959
11983
  const pluginVitest = await interopDefault2(import("eslint-plugin-vitest"));
11960
11984
  return [
11961
11985
  {
11962
- name: "jsse:vitest:setup",
11986
+ name: "jsse/vitest/setup",
11963
11987
  plugins: {
11964
11988
  vitest: pluginVitest
11965
11989
  }
11966
11990
  },
11967
11991
  {
11968
11992
  files: GLOB_TESTS,
11969
- name: "jsse:vitest:rules",
11993
+ name: "jsse/vitest/rules",
11970
11994
  rules: {
11971
11995
  "vitest/consistent-test-it": [
11972
11996
  "error",
@@ -11996,7 +12020,7 @@ var yml = async (options) => {
11996
12020
  ]);
11997
12021
  return [
11998
12022
  {
11999
- name: "jsse:yaml:setup",
12023
+ name: "jsse/yaml/setup",
12000
12024
  plugins: {
12001
12025
  yaml: pluginYaml
12002
12026
  }
@@ -12006,7 +12030,7 @@ var yml = async (options) => {
12006
12030
  languageOptions: {
12007
12031
  parser: parserYaml
12008
12032
  },
12009
- name: "antfu:yaml:rules",
12033
+ name: "antfu:yaml/rules",
12010
12034
  rules: {
12011
12035
  "style/spaced-comment": "off",
12012
12036
  "yaml/block-mapping": "error",
@@ -12174,7 +12198,7 @@ async function jsse(options = {}, ...userConfigs) {
12174
12198
  react: enableReact,
12175
12199
  typeAware
12176
12200
  });
12177
- configs.push(tscfg);
12201
+ configs.push(tscfg, tsdoc());
12178
12202
  }
12179
12203
  if (normalizedOptions.markdown) {
12180
12204
  configs.push(markdown());
@@ -12265,9 +12289,9 @@ async function jsse(options = {}, ...userConfigs) {
12265
12289
  }
12266
12290
  if (normalizedOptions.rootId !== "jsse") {
12267
12291
  combinedConfigs.forEach((config) => {
12268
- if (config.name && config.name.startsWith("jsse:")) {
12292
+ if (config.name && config.name.startsWith("jsse/")) {
12269
12293
  config.name = config.name.replace(
12270
- "jsse:",
12294
+ "jsse/",
12271
12295
  `${normalizedOptions.rootId}:`
12272
12296
  );
12273
12297
  }
@@ -12342,6 +12366,7 @@ function jsseReact() {
12342
12366
  importPluginReactRefresh,
12343
12367
  importPluginStylistic,
12344
12368
  importPluginTailwind,
12369
+ importPluginTsdoc,
12345
12370
  importReactPlugins,
12346
12371
  importYmlLibs,
12347
12372
  interopDefault,