@alextheman/eslint-plugin 5.6.2 → 5.7.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.cjs CHANGED
@@ -4842,61 +4842,6 @@ const internalComponents = [...internalJsdoc, { rules: {
4842
4842
  "jsdoc/require-returns": "off"
4843
4843
  } }];
4844
4844
 
4845
- //#endregion
4846
- //#region src/configs/helpers/restrictedImports/eslintPluginRestrictedImports.ts
4847
- const eslintPluginRestrictedImports = combineRestrictedImports(generalRestrictedImports, { paths: [
4848
- {
4849
- importNames: ["default"],
4850
- message: "Do not import the plugin directly from the config files. Please create a function that takes in the plugin and returns the config instead.",
4851
- name: "src/alexPlugin"
4852
- },
4853
- ...["src/index", "src"].map((name) => {
4854
- return {
4855
- message: "Do not import directly from the index file.",
4856
- name
4857
- };
4858
- }),
4859
- {
4860
- importNames: ["default"],
4861
- message: "Please import from \"src/configs/helpers/eslint-plugin-react-hooks\" instead.",
4862
- name: "eslint-plugin-react-hooks"
4863
- },
4864
- {
4865
- importNames: ["createRuleTester"],
4866
- message: "Please import createRuleTester from \"tests/rule-testers/createRuleTester\" instead.",
4867
- name: "eslint-vitest-rule-tester"
4868
- }
4869
- ] });
4870
-
4871
- //#endregion
4872
- //#region src/configs/internal/eslintPlugin.ts
4873
- function internalEslintPlugin(plugin) {
4874
- return [
4875
- ...combinedTypeScriptPackage(plugin),
4876
- {
4877
- name: "@alextheman/internal/eslint-plugin",
4878
- plugins: {
4879
- "@alextheman": plugin,
4880
- jsdoc: eslint_plugin_jsdoc.default,
4881
- perfectionist: eslint_plugin_perfectionist.default
4882
- },
4883
- rules: {
4884
- "@alextheman/no-plugin-configs-access-from-src-configs": "error",
4885
- "jsdoc/require-jsdoc": "off",
4886
- "no-restricted-imports": ["error", eslintPluginRestrictedImports]
4887
- }
4888
- },
4889
- {
4890
- files: ["src/rules/index.ts", "src/configs/**"],
4891
- rules: { "perfectionist/sort-objects": ["error", sortObjects] }
4892
- },
4893
- {
4894
- files: ["src/utility/public/**"],
4895
- rules: { "jsdoc/require-jsdoc": ["error", requireJsdocOptions] }
4896
- }
4897
- ];
4898
- }
4899
-
4900
4845
  //#endregion
4901
4846
  //#region src/configs/helpers/restrictedImports/neurosongsBackEndRestrictedImports.ts
4902
4847
  const neurosongsBackEndRestrictedImports = combineRestrictedImports(personalRestrictedImports, { paths: [
@@ -5011,6 +4956,81 @@ function internalUtility(plugin) {
5011
4956
  }];
5012
4957
  }
5013
4958
 
4959
+ //#endregion
4960
+ //#region src/configs/helpers/restrictedImports/eslintPluginRestrictedImports.ts
4961
+ const eslintPluginRestrictedImports = combineRestrictedImports(generalRestrictedImports, { paths: [
4962
+ {
4963
+ importNames: ["default"],
4964
+ message: "Do not import the plugin directly from the config files. Please create a function that takes in the plugin and returns the config instead.",
4965
+ name: "src/alexPlugin"
4966
+ },
4967
+ ...["src/index", "src"].map((name) => {
4968
+ return {
4969
+ message: "Do not import directly from the index file.",
4970
+ name
4971
+ };
4972
+ }),
4973
+ {
4974
+ importNames: ["default"],
4975
+ message: "Please import from \"src/configs/helpers/eslint-plugin-react-hooks\" instead.",
4976
+ name: "eslint-plugin-react-hooks"
4977
+ },
4978
+ {
4979
+ importNames: ["createRuleTester"],
4980
+ message: "Please import createRuleTester from \"tests/rule-testers/createRuleTester\" instead.",
4981
+ name: "eslint-vitest-rule-tester"
4982
+ }
4983
+ ] });
4984
+
4985
+ //#endregion
4986
+ //#region src/configs/internal/eslintPlugin/base.ts
4987
+ function internalEslintPluginBase(plugin) {
4988
+ return [...combinedTypeScriptPackage(plugin), {
4989
+ name: "@alextheman/internal/eslint-plugin-base",
4990
+ plugins: {
4991
+ "@alextheman": plugin,
4992
+ jsdoc: eslint_plugin_jsdoc.default
4993
+ },
4994
+ rules: {
4995
+ "@alextheman/no-plugin-configs-access-from-src-configs": "error",
4996
+ "jsdoc/require-jsdoc": "off",
4997
+ "no-restricted-imports": ["error", eslintPluginRestrictedImports]
4998
+ }
4999
+ }];
5000
+ }
5001
+
5002
+ //#endregion
5003
+ //#region src/configs/internal/eslintPlugin/configs.ts
5004
+ function internalEslintPluginConfigs(plugin) {
5005
+ return [...internalEslintPluginBase(plugin), {
5006
+ files: ["**/*.ts"],
5007
+ name: "@alextheman/internal/eslint-plugin-configs",
5008
+ plugins: { perfectionist: eslint_plugin_perfectionist.default },
5009
+ rules: { "perfectionist/sort-objects": ["error", sortObjects] }
5010
+ }];
5011
+ }
5012
+
5013
+ //#endregion
5014
+ //#region src/configs/internal/eslintPlugin/rules.ts
5015
+ function internalEslintPluginRules(plugin) {
5016
+ return [...internalEslintPluginBase(plugin), {
5017
+ files: ["index.ts"],
5018
+ name: "@alextheman/internal/eslint-plugin-rules",
5019
+ plugins: { perfectionist: eslint_plugin_perfectionist.default },
5020
+ rules: { "perfectionist/sort-objects": ["error", sortObjects] }
5021
+ }];
5022
+ }
5023
+
5024
+ //#endregion
5025
+ //#region src/configs/internal/eslintPlugin/utility.ts
5026
+ function internalEslintPluginUtility(plugin) {
5027
+ return [...internalEslintPluginBase(plugin), {
5028
+ files: ["**/*.ts"],
5029
+ name: "@alextheman/internal/eslint-plugin-utility",
5030
+ rules: { "jsdoc/require-jsdoc": ["error", requireJsdocOptions] }
5031
+ }];
5032
+ }
5033
+
5014
5034
  //#endregion
5015
5035
  //#region src/configs/combined/typeScript.ts
5016
5036
  function combinedTypeScript(plugin) {
@@ -5048,13 +5068,13 @@ function combinedTypeScriptReact(plugin) {
5048
5068
  function createAlexPluginConfigs(plugin) {
5049
5069
  return flattenConfigs({
5050
5070
  combined: {
5051
- javascript: [...combinedJavaScript(plugin), ...generalPackageJson],
5052
- javascriptReact: [...combinedJavaScriptReact(plugin), ...generalPackageJson],
5053
- react: [...combinedReact, ...generalPackageJson],
5054
- tests: [...combinedTests(plugin), ...generalPackageJson],
5055
- typescript: [...combinedTypeScript(plugin), ...generalPackageJson],
5056
- typescriptPackage: [...combinedTypeScriptPackage(plugin), ...generalPackageJson],
5057
- typescriptReact: [...combinedTypeScriptReact(plugin), ...generalPackageJson]
5071
+ javascript: combinedJavaScript(plugin),
5072
+ javascriptReact: combinedJavaScriptReact(plugin),
5073
+ react: combinedReact,
5074
+ tests: combinedTests(plugin),
5075
+ typescript: combinedTypeScript(plugin),
5076
+ typescriptPackage: combinedTypeScriptPackage(plugin),
5077
+ typescriptReact: combinedTypeScriptReact(plugin)
5058
5078
  },
5059
5079
  general: {
5060
5080
  javascript: generalJavaScript,
@@ -5065,7 +5085,10 @@ function createAlexPluginConfigs(plugin) {
5065
5085
  internal: {
5066
5086
  alexCLine: internalAlexCLine(plugin),
5067
5087
  components: internalComponents,
5068
- eslintPlugin: internalEslintPlugin(plugin),
5088
+ eslintPluginBase: internalEslintPluginBase(plugin),
5089
+ eslintPluginConfigs: internalEslintPluginConfigs(plugin),
5090
+ eslintPluginRules: internalEslintPluginRules(plugin),
5091
+ eslintPluginUtility: internalEslintPluginUtility(plugin),
5069
5092
  javascript: internalJavaScript(plugin),
5070
5093
  jsdoc: internalJsdoc,
5071
5094
  neurosongsBackEnd: internalNeurosongsBackEnd,
@@ -5477,7 +5500,7 @@ var rules_default = {
5477
5500
  //#endregion
5478
5501
  //#region package.json
5479
5502
  var name = "@alextheman/eslint-plugin";
5480
- var version = "5.6.2";
5503
+ var version = "5.7.0";
5481
5504
 
5482
5505
  //#endregion
5483
5506
  //#region src/alexPlugin.ts
package/dist/index.d.cts CHANGED
@@ -28,7 +28,7 @@ type GetFlattenedConfigNames<ConfigObject extends { [K in keyof ConfigObject]: R
28
28
  //#region src/configs/AlexPluginConfigGroup.d.ts
29
29
  type GeneralConfig = "javascript" | "typescript" | "react" | "packageJson";
30
30
  type PluginConfig = "base" | "tests";
31
- type InternalConfig = "javascript" | "typescript" | "react" | "tests" | "eslintPlugin" | "neurosongsBackEnd" | "neurosongsFrontEnd" | "utility" | "alexCLine" | "jsdoc" | "components";
31
+ type InternalConfig = "javascript" | "typescript" | "react" | "tests" | "eslintPluginBase" | "eslintPluginConfigs" | "eslintPluginRules" | "eslintPluginUtility" | "neurosongsBackEnd" | "neurosongsFrontEnd" | "utility" | "alexCLine" | "jsdoc" | "components";
32
32
  type CombinedConfig = "javascript" | "typescript" | "react" | "tests" | "typescriptReact" | "javascriptReact" | "typescriptPackage";
33
33
  interface AlexPluginConfigObject {
34
34
  general: Record<GeneralConfig, Linter.Config[]>;
package/dist/index.d.ts CHANGED
@@ -28,7 +28,7 @@ type GetFlattenedConfigNames<ConfigObject extends { [K in keyof ConfigObject]: R
28
28
  //#region src/configs/AlexPluginConfigGroup.d.ts
29
29
  type GeneralConfig = "javascript" | "typescript" | "react" | "packageJson";
30
30
  type PluginConfig = "base" | "tests";
31
- type InternalConfig = "javascript" | "typescript" | "react" | "tests" | "eslintPlugin" | "neurosongsBackEnd" | "neurosongsFrontEnd" | "utility" | "alexCLine" | "jsdoc" | "components";
31
+ type InternalConfig = "javascript" | "typescript" | "react" | "tests" | "eslintPluginBase" | "eslintPluginConfigs" | "eslintPluginRules" | "eslintPluginUtility" | "neurosongsBackEnd" | "neurosongsFrontEnd" | "utility" | "alexCLine" | "jsdoc" | "components";
32
32
  type CombinedConfig = "javascript" | "typescript" | "react" | "tests" | "typescriptReact" | "javascriptReact" | "typescriptPackage";
33
33
  interface AlexPluginConfigObject {
34
34
  general: Record<GeneralConfig, Linter.Config[]>;
package/dist/index.js CHANGED
@@ -4826,61 +4826,6 @@ const internalComponents = [...internalJsdoc, { rules: {
4826
4826
  "jsdoc/require-returns": "off"
4827
4827
  } }];
4828
4828
 
4829
- //#endregion
4830
- //#region src/configs/helpers/restrictedImports/eslintPluginRestrictedImports.ts
4831
- const eslintPluginRestrictedImports = combineRestrictedImports(generalRestrictedImports, { paths: [
4832
- {
4833
- importNames: ["default"],
4834
- message: "Do not import the plugin directly from the config files. Please create a function that takes in the plugin and returns the config instead.",
4835
- name: "src/alexPlugin"
4836
- },
4837
- ...["src/index", "src"].map((name) => {
4838
- return {
4839
- message: "Do not import directly from the index file.",
4840
- name
4841
- };
4842
- }),
4843
- {
4844
- importNames: ["default"],
4845
- message: "Please import from \"src/configs/helpers/eslint-plugin-react-hooks\" instead.",
4846
- name: "eslint-plugin-react-hooks"
4847
- },
4848
- {
4849
- importNames: ["createRuleTester"],
4850
- message: "Please import createRuleTester from \"tests/rule-testers/createRuleTester\" instead.",
4851
- name: "eslint-vitest-rule-tester"
4852
- }
4853
- ] });
4854
-
4855
- //#endregion
4856
- //#region src/configs/internal/eslintPlugin.ts
4857
- function internalEslintPlugin(plugin) {
4858
- return [
4859
- ...combinedTypeScriptPackage(plugin),
4860
- {
4861
- name: "@alextheman/internal/eslint-plugin",
4862
- plugins: {
4863
- "@alextheman": plugin,
4864
- jsdoc,
4865
- perfectionist
4866
- },
4867
- rules: {
4868
- "@alextheman/no-plugin-configs-access-from-src-configs": "error",
4869
- "jsdoc/require-jsdoc": "off",
4870
- "no-restricted-imports": ["error", eslintPluginRestrictedImports]
4871
- }
4872
- },
4873
- {
4874
- files: ["src/rules/index.ts", "src/configs/**"],
4875
- rules: { "perfectionist/sort-objects": ["error", sortObjects] }
4876
- },
4877
- {
4878
- files: ["src/utility/public/**"],
4879
- rules: { "jsdoc/require-jsdoc": ["error", requireJsdocOptions] }
4880
- }
4881
- ];
4882
- }
4883
-
4884
4829
  //#endregion
4885
4830
  //#region src/configs/helpers/restrictedImports/neurosongsBackEndRestrictedImports.ts
4886
4831
  const neurosongsBackEndRestrictedImports = combineRestrictedImports(personalRestrictedImports, { paths: [
@@ -4995,6 +4940,81 @@ function internalUtility(plugin) {
4995
4940
  }];
4996
4941
  }
4997
4942
 
4943
+ //#endregion
4944
+ //#region src/configs/helpers/restrictedImports/eslintPluginRestrictedImports.ts
4945
+ const eslintPluginRestrictedImports = combineRestrictedImports(generalRestrictedImports, { paths: [
4946
+ {
4947
+ importNames: ["default"],
4948
+ message: "Do not import the plugin directly from the config files. Please create a function that takes in the plugin and returns the config instead.",
4949
+ name: "src/alexPlugin"
4950
+ },
4951
+ ...["src/index", "src"].map((name) => {
4952
+ return {
4953
+ message: "Do not import directly from the index file.",
4954
+ name
4955
+ };
4956
+ }),
4957
+ {
4958
+ importNames: ["default"],
4959
+ message: "Please import from \"src/configs/helpers/eslint-plugin-react-hooks\" instead.",
4960
+ name: "eslint-plugin-react-hooks"
4961
+ },
4962
+ {
4963
+ importNames: ["createRuleTester"],
4964
+ message: "Please import createRuleTester from \"tests/rule-testers/createRuleTester\" instead.",
4965
+ name: "eslint-vitest-rule-tester"
4966
+ }
4967
+ ] });
4968
+
4969
+ //#endregion
4970
+ //#region src/configs/internal/eslintPlugin/base.ts
4971
+ function internalEslintPluginBase(plugin) {
4972
+ return [...combinedTypeScriptPackage(plugin), {
4973
+ name: "@alextheman/internal/eslint-plugin-base",
4974
+ plugins: {
4975
+ "@alextheman": plugin,
4976
+ jsdoc
4977
+ },
4978
+ rules: {
4979
+ "@alextheman/no-plugin-configs-access-from-src-configs": "error",
4980
+ "jsdoc/require-jsdoc": "off",
4981
+ "no-restricted-imports": ["error", eslintPluginRestrictedImports]
4982
+ }
4983
+ }];
4984
+ }
4985
+
4986
+ //#endregion
4987
+ //#region src/configs/internal/eslintPlugin/configs.ts
4988
+ function internalEslintPluginConfigs(plugin) {
4989
+ return [...internalEslintPluginBase(plugin), {
4990
+ files: ["**/*.ts"],
4991
+ name: "@alextheman/internal/eslint-plugin-configs",
4992
+ plugins: { perfectionist },
4993
+ rules: { "perfectionist/sort-objects": ["error", sortObjects] }
4994
+ }];
4995
+ }
4996
+
4997
+ //#endregion
4998
+ //#region src/configs/internal/eslintPlugin/rules.ts
4999
+ function internalEslintPluginRules(plugin) {
5000
+ return [...internalEslintPluginBase(plugin), {
5001
+ files: ["index.ts"],
5002
+ name: "@alextheman/internal/eslint-plugin-rules",
5003
+ plugins: { perfectionist },
5004
+ rules: { "perfectionist/sort-objects": ["error", sortObjects] }
5005
+ }];
5006
+ }
5007
+
5008
+ //#endregion
5009
+ //#region src/configs/internal/eslintPlugin/utility.ts
5010
+ function internalEslintPluginUtility(plugin) {
5011
+ return [...internalEslintPluginBase(plugin), {
5012
+ files: ["**/*.ts"],
5013
+ name: "@alextheman/internal/eslint-plugin-utility",
5014
+ rules: { "jsdoc/require-jsdoc": ["error", requireJsdocOptions] }
5015
+ }];
5016
+ }
5017
+
4998
5018
  //#endregion
4999
5019
  //#region src/configs/combined/typeScript.ts
5000
5020
  function combinedTypeScript(plugin) {
@@ -5032,13 +5052,13 @@ function combinedTypeScriptReact(plugin) {
5032
5052
  function createAlexPluginConfigs(plugin) {
5033
5053
  return flattenConfigs({
5034
5054
  combined: {
5035
- javascript: [...combinedJavaScript(plugin), ...generalPackageJson],
5036
- javascriptReact: [...combinedJavaScriptReact(plugin), ...generalPackageJson],
5037
- react: [...combinedReact, ...generalPackageJson],
5038
- tests: [...combinedTests(plugin), ...generalPackageJson],
5039
- typescript: [...combinedTypeScript(plugin), ...generalPackageJson],
5040
- typescriptPackage: [...combinedTypeScriptPackage(plugin), ...generalPackageJson],
5041
- typescriptReact: [...combinedTypeScriptReact(plugin), ...generalPackageJson]
5055
+ javascript: combinedJavaScript(plugin),
5056
+ javascriptReact: combinedJavaScriptReact(plugin),
5057
+ react: combinedReact,
5058
+ tests: combinedTests(plugin),
5059
+ typescript: combinedTypeScript(plugin),
5060
+ typescriptPackage: combinedTypeScriptPackage(plugin),
5061
+ typescriptReact: combinedTypeScriptReact(plugin)
5042
5062
  },
5043
5063
  general: {
5044
5064
  javascript: generalJavaScript,
@@ -5049,7 +5069,10 @@ function createAlexPluginConfigs(plugin) {
5049
5069
  internal: {
5050
5070
  alexCLine: internalAlexCLine(plugin),
5051
5071
  components: internalComponents,
5052
- eslintPlugin: internalEslintPlugin(plugin),
5072
+ eslintPluginBase: internalEslintPluginBase(plugin),
5073
+ eslintPluginConfigs: internalEslintPluginConfigs(plugin),
5074
+ eslintPluginRules: internalEslintPluginRules(plugin),
5075
+ eslintPluginUtility: internalEslintPluginUtility(plugin),
5053
5076
  javascript: internalJavaScript(plugin),
5054
5077
  jsdoc: internalJsdoc,
5055
5078
  neurosongsBackEnd: internalNeurosongsBackEnd,
@@ -5461,7 +5484,7 @@ var rules_default = {
5461
5484
  //#endregion
5462
5485
  //#region package.json
5463
5486
  var name = "@alextheman/eslint-plugin";
5464
- var version = "5.6.2";
5487
+ var version = "5.7.0";
5465
5488
 
5466
5489
  //#endregion
5467
5490
  //#region src/alexPlugin.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "5.6.2",
3
+ "version": "5.7.0",
4
4
  "description": "A package to provide custom ESLint rules and configs.",
5
5
  "repository": {
6
6
  "type": "git",