@alextheman/eslint-plugin 5.6.1 → 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.1";
5503
+ var version = "5.7.0";
5481
5504
 
5482
5505
  //#endregion
5483
5506
  //#region src/alexPlugin.ts