@alextheman/eslint-plugin 5.16.1 → 5.17.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.
Files changed (3) hide show
  1. package/dist/index.cjs +46 -45
  2. package/dist/index.js +45 -44
  3. package/package.json +21 -21
package/dist/index.cjs CHANGED
@@ -44,8 +44,6 @@ let eslint_plugin_perfectionist = require("eslint-plugin-perfectionist");
44
44
  eslint_plugin_perfectionist = __toESM(eslint_plugin_perfectionist, 1);
45
45
  let eslint_plugin_prettier = require("eslint-plugin-prettier");
46
46
  eslint_plugin_prettier = __toESM(eslint_plugin_prettier, 1);
47
- let typescript_eslint = require("typescript-eslint");
48
- typescript_eslint = __toESM(typescript_eslint, 1);
49
47
  let _eslint_react_eslint_plugin = require("@eslint-react/eslint-plugin");
50
48
  _eslint_react_eslint_plugin = __toESM(_eslint_react_eslint_plugin, 1);
51
49
  let _stylistic_eslint_plugin = require("@stylistic/eslint-plugin");
@@ -58,6 +56,8 @@ let eslint_plugin_react_hooks = require("eslint-plugin-react-hooks");
58
56
  eslint_plugin_react_hooks = __toESM(eslint_plugin_react_hooks, 1);
59
57
  let eslint_plugin_package_json = require("eslint-plugin-package-json");
60
58
  eslint_plugin_package_json = __toESM(eslint_plugin_package_json, 1);
59
+ let typescript_eslint = require("typescript-eslint");
60
+ typescript_eslint = __toESM(typescript_eslint, 1);
61
61
  let eslint_plugin_jsdoc = require("eslint-plugin-jsdoc");
62
62
  eslint_plugin_jsdoc = __toESM(eslint_plugin_jsdoc, 1);
63
63
  let _alextheman_utility_node = require("@alextheman/utility/node");
@@ -4460,7 +4460,8 @@ const generalJavaScript = [
4460
4460
  "no-console": ["error", { allow: [
4461
4461
  "warn",
4462
4462
  "error",
4463
- "info"
4463
+ "info",
4464
+ "table"
4464
4465
  ] }],
4465
4466
  "no-eval": "error",
4466
4467
  "no-lonely-if": "error",
@@ -4484,38 +4485,6 @@ const generalJavaScript = [
4484
4485
  //#region src/configs/external/prettierConfig.ts
4485
4486
  const prettierConfig = { printWidth: 100 };
4486
4487
  //#endregion
4487
- //#region src/configs/helpers/reactLanguageOptions.ts
4488
- const reactLanguageOptions = {
4489
- ecmaVersion: 2020,
4490
- globals: import_globals.default.browser,
4491
- parserOptions: { ecmaFeatures: { jsx: true } }
4492
- };
4493
- //#endregion
4494
- //#region src/configs/helpers/typeScriptLanguageOptions.ts
4495
- const typeScriptLanguageOptions = {
4496
- parser: typescript_eslint.default.parser,
4497
- parserOptions: {
4498
- ecmaVersion: "latest",
4499
- projectService: true,
4500
- sourceType: "module",
4501
- tsconfigRootDir: process.cwd()
4502
- }
4503
- };
4504
- //#endregion
4505
- //#region src/configs/helpers/restrictedImports/personalRestrictedImports.ts
4506
- const personalRestrictedImports = combineRestrictedImports(generalRestrictedImports, { paths: [...["fs", "node:fs"].map((name) => {
4507
- return {
4508
- message: "Please use node:fs/promises instead.",
4509
- name
4510
- };
4511
- })] });
4512
- //#endregion
4513
- //#region src/configs/helpers/restrictedImports/reactRestrictedImports.ts
4514
- const reactRestrictedImports = combineRestrictedImports(generalRestrictedImports, { patterns: [{
4515
- message: "Please use `import Component from \"@mui/[package]/Component\"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.",
4516
- regex: "^@mui/[^/]+$"
4517
- }] });
4518
- //#endregion
4519
4488
  //#region src/configs/helpers/sorting/sortClasses.ts
4520
4489
  const sortClasses = {
4521
4490
  customGroups: [],
@@ -4615,6 +4584,14 @@ const sortObjects = {
4615
4584
  useConfigurationIf: {}
4616
4585
  };
4617
4586
  //#endregion
4587
+ //#region src/configs/helpers/restrictedImports/personalRestrictedImports.ts
4588
+ const personalRestrictedImports = combineRestrictedImports(generalRestrictedImports, { paths: [...["fs", "node:fs"].map((name) => {
4589
+ return {
4590
+ message: "Please use node:fs/promises instead.",
4591
+ name
4592
+ };
4593
+ })] });
4594
+ //#endregion
4618
4595
  //#region src/configs/helpers/sorting/sortNamedImports.ts
4619
4596
  const sortNamedImports = {
4620
4597
  fallbackSort: { type: "unsorted" },
@@ -4697,6 +4674,13 @@ const reactHooks = {
4697
4674
  }
4698
4675
  };
4699
4676
  //#endregion
4677
+ //#region src/configs/helpers/reactLanguageOptions.ts
4678
+ const reactLanguageOptions = {
4679
+ ecmaVersion: 2020,
4680
+ globals: import_globals.default.browser,
4681
+ parserOptions: { ecmaFeatures: { jsx: true } }
4682
+ };
4683
+ //#endregion
4700
4684
  //#region src/configs/general/react.ts
4701
4685
  const generalReact = [eslint_plugin_jsx_a11y_x.default.configs.recommended, {
4702
4686
  languageOptions: reactLanguageOptions,
@@ -4726,6 +4710,12 @@ const generalReact = [eslint_plugin_jsx_a11y_x.default.configs.recommended, {
4726
4710
  settings: { react: { version: "detect" } }
4727
4711
  }];
4728
4712
  //#endregion
4713
+ //#region src/configs/helpers/restrictedImports/reactRestrictedImports.ts
4714
+ const reactRestrictedImports = combineRestrictedImports(generalRestrictedImports, { patterns: [{
4715
+ message: "Please use `import Component from \"@mui/[package]/Component\"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.",
4716
+ regex: "^@mui/[^/]+$"
4717
+ }] });
4718
+ //#endregion
4729
4719
  //#region src/configs/internal/react.ts
4730
4720
  const internalReact = [{
4731
4721
  languageOptions: reactLanguageOptions,
@@ -4764,6 +4754,17 @@ const generalPackageJson = [eslint_plugin_package_json.default.configs.recommend
4764
4754
  rules: { "package-json/scripts-name-casing": "error" }
4765
4755
  }];
4766
4756
  //#endregion
4757
+ //#region src/configs/helpers/typeScriptLanguageOptions.ts
4758
+ const typeScriptLanguageOptions = {
4759
+ parser: typescript_eslint.default.parser,
4760
+ parserOptions: {
4761
+ ecmaVersion: "latest",
4762
+ projectService: true,
4763
+ sourceType: "module",
4764
+ tsconfigRootDir: process.cwd()
4765
+ }
4766
+ };
4767
+ //#endregion
4767
4768
  //#region src/configs/general/typeScript.ts
4768
4769
  const generalTypeScript = [
4769
4770
  ...typescript_eslint.default.configs.recommended,
@@ -5011,15 +5012,6 @@ function internalEslintPluginRules(plugin) {
5011
5012
  }];
5012
5013
  }
5013
5014
  //#endregion
5014
- //#region src/configs/internal/eslintPlugin/utility.ts
5015
- function internalEslintPluginUtility(plugin) {
5016
- return [...internalEslintPluginBase(plugin), {
5017
- files: ["**/*.ts"],
5018
- name: "@alextheman/internal/eslint-plugin-utility",
5019
- rules: { "jsdoc/require-jsdoc": ["error", requireJsdocOptions] }
5020
- }];
5021
- }
5022
- //#endregion
5023
5015
  //#region src/configs/internal/utility/base.ts
5024
5016
  function internalUtilityBase(plugin) {
5025
5017
  return [...combinedTypeScriptPackage(plugin), {
@@ -5077,6 +5069,15 @@ function combinedTypeScriptReact(plugin) {
5077
5069
  ];
5078
5070
  }
5079
5071
  //#endregion
5072
+ //#region src/configs/internal/eslintPlugin/utility.ts
5073
+ function internalEslintPluginUtility(plugin) {
5074
+ return [...internalEslintPluginBase(plugin), {
5075
+ files: ["**/*.ts"],
5076
+ name: "@alextheman/internal/eslint-plugin-utility",
5077
+ rules: { "jsdoc/require-jsdoc": ["error", requireJsdocOptions] }
5078
+ }];
5079
+ }
5080
+ //#endregion
5080
5081
  //#region src/configs/internal/packageJson.ts
5081
5082
  const internalPackageJson = [...generalPackageJson, {
5082
5083
  files: ["**/package.json"],
@@ -5515,7 +5516,7 @@ function parseUseObjectShorthandOptions(data) {
5515
5516
  const alexPlugin = {
5516
5517
  meta: {
5517
5518
  name: "@alextheman/eslint-plugin",
5518
- version: "5.16.1",
5519
+ version: "5.17.1",
5519
5520
  namespace: "alextheman"
5520
5521
  },
5521
5522
  configs: {},
package/dist/index.js CHANGED
@@ -9,13 +9,13 @@ import importPlugin from "eslint-plugin-import-x";
9
9
  import nodePlugin from "eslint-plugin-n";
10
10
  import perfectionist from "eslint-plugin-perfectionist";
11
11
  import prettierPlugin from "eslint-plugin-prettier";
12
- import tseslint from "typescript-eslint";
13
12
  import reactPlugin from "@eslint-react/eslint-plugin";
14
13
  import stylistic from "@stylistic/eslint-plugin";
15
14
  import jsxA11y from "eslint-plugin-jsx-a11y-x";
16
15
  import reactRefresh from "eslint-plugin-react-refresh";
17
16
  import reactHooksPlugin from "eslint-plugin-react-hooks";
18
17
  import packageJson from "eslint-plugin-package-json";
18
+ import tseslint from "typescript-eslint";
19
19
  import jsdoc from "eslint-plugin-jsdoc";
20
20
  import { normalizeImportPath } from "@alextheman/utility/node";
21
21
  //#region \0rolldown/runtime.js
@@ -4440,7 +4440,8 @@ const generalJavaScript = [
4440
4440
  "no-console": ["error", { allow: [
4441
4441
  "warn",
4442
4442
  "error",
4443
- "info"
4443
+ "info",
4444
+ "table"
4444
4445
  ] }],
4445
4446
  "no-eval": "error",
4446
4447
  "no-lonely-if": "error",
@@ -4464,38 +4465,6 @@ const generalJavaScript = [
4464
4465
  //#region src/configs/external/prettierConfig.ts
4465
4466
  const prettierConfig = { printWidth: 100 };
4466
4467
  //#endregion
4467
- //#region src/configs/helpers/reactLanguageOptions.ts
4468
- const reactLanguageOptions = {
4469
- ecmaVersion: 2020,
4470
- globals: import_globals.default.browser,
4471
- parserOptions: { ecmaFeatures: { jsx: true } }
4472
- };
4473
- //#endregion
4474
- //#region src/configs/helpers/typeScriptLanguageOptions.ts
4475
- const typeScriptLanguageOptions = {
4476
- parser: tseslint.parser,
4477
- parserOptions: {
4478
- ecmaVersion: "latest",
4479
- projectService: true,
4480
- sourceType: "module",
4481
- tsconfigRootDir: process.cwd()
4482
- }
4483
- };
4484
- //#endregion
4485
- //#region src/configs/helpers/restrictedImports/personalRestrictedImports.ts
4486
- const personalRestrictedImports = combineRestrictedImports(generalRestrictedImports, { paths: [...["fs", "node:fs"].map((name) => {
4487
- return {
4488
- message: "Please use node:fs/promises instead.",
4489
- name
4490
- };
4491
- })] });
4492
- //#endregion
4493
- //#region src/configs/helpers/restrictedImports/reactRestrictedImports.ts
4494
- const reactRestrictedImports = combineRestrictedImports(generalRestrictedImports, { patterns: [{
4495
- message: "Please use `import Component from \"@mui/[package]/Component\"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.",
4496
- regex: "^@mui/[^/]+$"
4497
- }] });
4498
- //#endregion
4499
4468
  //#region src/configs/helpers/sorting/sortClasses.ts
4500
4469
  const sortClasses = {
4501
4470
  customGroups: [],
@@ -4595,6 +4564,14 @@ const sortObjects = {
4595
4564
  useConfigurationIf: {}
4596
4565
  };
4597
4566
  //#endregion
4567
+ //#region src/configs/helpers/restrictedImports/personalRestrictedImports.ts
4568
+ const personalRestrictedImports = combineRestrictedImports(generalRestrictedImports, { paths: [...["fs", "node:fs"].map((name) => {
4569
+ return {
4570
+ message: "Please use node:fs/promises instead.",
4571
+ name
4572
+ };
4573
+ })] });
4574
+ //#endregion
4598
4575
  //#region src/configs/helpers/sorting/sortNamedImports.ts
4599
4576
  const sortNamedImports = {
4600
4577
  fallbackSort: { type: "unsorted" },
@@ -4677,6 +4654,13 @@ const reactHooks = {
4677
4654
  }
4678
4655
  };
4679
4656
  //#endregion
4657
+ //#region src/configs/helpers/reactLanguageOptions.ts
4658
+ const reactLanguageOptions = {
4659
+ ecmaVersion: 2020,
4660
+ globals: import_globals.default.browser,
4661
+ parserOptions: { ecmaFeatures: { jsx: true } }
4662
+ };
4663
+ //#endregion
4680
4664
  //#region src/configs/general/react.ts
4681
4665
  const generalReact = [jsxA11y.configs.recommended, {
4682
4666
  languageOptions: reactLanguageOptions,
@@ -4706,6 +4690,12 @@ const generalReact = [jsxA11y.configs.recommended, {
4706
4690
  settings: { react: { version: "detect" } }
4707
4691
  }];
4708
4692
  //#endregion
4693
+ //#region src/configs/helpers/restrictedImports/reactRestrictedImports.ts
4694
+ const reactRestrictedImports = combineRestrictedImports(generalRestrictedImports, { patterns: [{
4695
+ message: "Please use `import Component from \"@mui/[package]/Component\"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.",
4696
+ regex: "^@mui/[^/]+$"
4697
+ }] });
4698
+ //#endregion
4709
4699
  //#region src/configs/internal/react.ts
4710
4700
  const internalReact = [{
4711
4701
  languageOptions: reactLanguageOptions,
@@ -4744,6 +4734,17 @@ const generalPackageJson = [packageJson.configs.recommended, {
4744
4734
  rules: { "package-json/scripts-name-casing": "error" }
4745
4735
  }];
4746
4736
  //#endregion
4737
+ //#region src/configs/helpers/typeScriptLanguageOptions.ts
4738
+ const typeScriptLanguageOptions = {
4739
+ parser: tseslint.parser,
4740
+ parserOptions: {
4741
+ ecmaVersion: "latest",
4742
+ projectService: true,
4743
+ sourceType: "module",
4744
+ tsconfigRootDir: process.cwd()
4745
+ }
4746
+ };
4747
+ //#endregion
4747
4748
  //#region src/configs/general/typeScript.ts
4748
4749
  const generalTypeScript = [
4749
4750
  ...tseslint.configs.recommended,
@@ -4991,15 +4992,6 @@ function internalEslintPluginRules(plugin) {
4991
4992
  }];
4992
4993
  }
4993
4994
  //#endregion
4994
- //#region src/configs/internal/eslintPlugin/utility.ts
4995
- function internalEslintPluginUtility(plugin) {
4996
- return [...internalEslintPluginBase(plugin), {
4997
- files: ["**/*.ts"],
4998
- name: "@alextheman/internal/eslint-plugin-utility",
4999
- rules: { "jsdoc/require-jsdoc": ["error", requireJsdocOptions] }
5000
- }];
5001
- }
5002
- //#endregion
5003
4995
  //#region src/configs/internal/utility/base.ts
5004
4996
  function internalUtilityBase(plugin) {
5005
4997
  return [...combinedTypeScriptPackage(plugin), {
@@ -5057,6 +5049,15 @@ function combinedTypeScriptReact(plugin) {
5057
5049
  ];
5058
5050
  }
5059
5051
  //#endregion
5052
+ //#region src/configs/internal/eslintPlugin/utility.ts
5053
+ function internalEslintPluginUtility(plugin) {
5054
+ return [...internalEslintPluginBase(plugin), {
5055
+ files: ["**/*.ts"],
5056
+ name: "@alextheman/internal/eslint-plugin-utility",
5057
+ rules: { "jsdoc/require-jsdoc": ["error", requireJsdocOptions] }
5058
+ }];
5059
+ }
5060
+ //#endregion
5060
5061
  //#region src/configs/internal/packageJson.ts
5061
5062
  const internalPackageJson = [...generalPackageJson, {
5062
5063
  files: ["**/package.json"],
@@ -5495,7 +5496,7 @@ function parseUseObjectShorthandOptions(data) {
5495
5496
  const alexPlugin = {
5496
5497
  meta: {
5497
5498
  name: "@alextheman/eslint-plugin",
5498
- version: "5.16.1",
5499
+ version: "5.17.1",
5499
5500
  namespace: "alextheman"
5500
5501
  },
5501
5502
  configs: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "5.16.1",
3
+ "version": "5.17.1",
4
4
  "description": "A package to provide custom ESLint rules and configs.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,37 +37,37 @@
37
37
  "node": ">=22.3.0"
38
38
  },
39
39
  "dependencies": {
40
- "@alextheman/utility": "5.19.0",
40
+ "@alextheman/utility": "5.21.1",
41
41
  "@eslint/compat": "2.1.0",
42
- "@typescript-eslint/types": "8.59.4",
43
- "@typescript-eslint/utils": "8.59.4",
42
+ "@typescript-eslint/types": "8.61.0",
43
+ "@typescript-eslint/utils": "8.61.0",
44
44
  "common-tags": "1.8.2",
45
- "prettier": "3.8.3",
45
+ "prettier": "3.8.4",
46
46
  "zod": "4.4.3"
47
47
  },
48
48
  "devDependencies": {
49
- "@eslint-react/eslint-plugin": "5.8.4",
49
+ "@eslint-react/eslint-plugin": "5.9.0",
50
50
  "@eslint/js": "10.0.1",
51
51
  "@stylistic/eslint-plugin": "5.10.0",
52
52
  "@types/common-tags": "1.8.4",
53
53
  "@types/eslint": "9.6.1",
54
54
  "@types/eslint-plugin-jsx-a11y": "6.10.1",
55
- "@types/node": "25.9.1",
56
- "@typescript-eslint/rule-tester": "8.59.4",
57
- "alex-c-line": "2.8.1",
55
+ "@types/node": "25.9.3",
56
+ "@typescript-eslint/rule-tester": "8.61.0",
57
+ "alex-c-line": "2.9.3",
58
58
  "dotenv-cli": "11.0.0",
59
- "eslint": "10.4.0",
59
+ "eslint": "10.5.0",
60
60
  "eslint-config-prettier": "10.1.8",
61
- "eslint-import-resolver-typescript": "4.4.4",
61
+ "eslint-import-resolver-typescript": "4.4.5",
62
62
  "eslint-plugin-import-x": "4.16.2",
63
- "eslint-plugin-jsdoc": "63.0.0",
63
+ "eslint-plugin-jsdoc": "63.0.2",
64
64
  "eslint-plugin-jsx-a11y-x": "0.2.0",
65
- "eslint-plugin-n": "18.0.1",
66
- "eslint-plugin-package-json": "1.1.0",
65
+ "eslint-plugin-n": "18.1.0",
66
+ "eslint-plugin-package-json": "1.3.0",
67
67
  "eslint-plugin-perfectionist": "5.9.0",
68
- "eslint-plugin-prettier": "5.5.5",
68
+ "eslint-plugin-prettier": "5.5.6",
69
69
  "eslint-plugin-react-hooks": "7.1.1",
70
- "eslint-plugin-react-refresh": "0.5.2",
70
+ "eslint-plugin-react-refresh": "0.5.3",
71
71
  "eslint-vitest-rule-tester": "3.1.0",
72
72
  "execa": "9.6.1",
73
73
  "globals": "17.6.0",
@@ -75,12 +75,12 @@
75
75
  "jsdom": "29.1.1",
76
76
  "markdownlint-cli2": "0.22.1",
77
77
  "tempy": "3.2.0",
78
- "tsdown": "0.22.0",
79
- "tsx": "4.22.3",
78
+ "tsdown": "0.22.2",
79
+ "tsx": "4.22.4",
80
80
  "typescript": "6.0.3",
81
- "typescript-eslint": "8.59.4",
82
- "vite": "8.0.14",
83
- "vitest": "4.1.7"
81
+ "typescript-eslint": "8.61.0",
82
+ "vite": "8.0.16",
83
+ "vitest": "4.1.8"
84
84
  },
85
85
  "peerDependencies": {
86
86
  "@eslint-react/eslint-plugin": ">=5.8.4",