@alextheman/eslint-plugin 2.7.2 → 2.7.4

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
@@ -3758,7 +3758,7 @@ module.exports = __toCommonJS(index_exports);
3758
3758
 
3759
3759
  // package.json
3760
3760
  var name = "@alextheman/eslint-plugin";
3761
- var version = "2.7.2";
3761
+ var version = "2.7.4";
3762
3762
 
3763
3763
  // src/configs/index.ts
3764
3764
  var import_eslint_plugin_package_json = __toESM(require("eslint-plugin-package-json"), 1);
@@ -4129,19 +4129,35 @@ var typeScriptBase = [
4129
4129
  var typeScriptBase_default = typeScriptBase;
4130
4130
 
4131
4131
  // src/configs/personal/eslintPlugin.ts
4132
+ var import_eslint_plugin_perfectionist2 = __toESM(require("eslint-plugin-perfectionist"), 1);
4132
4133
  function createPersonalEslintPluginConfig(plugin) {
4133
4134
  return [
4134
4135
  {
4135
4136
  plugins: {
4136
- "@alextheman": plugin
4137
+ "@alextheman": plugin,
4138
+ perfectionist: import_eslint_plugin_perfectionist2.default
4137
4139
  },
4138
4140
  rules: {
4139
- // When we pass the plugin into the config creator functions from the index, there's no guarantee that the configs will already be
4140
- // on the plugin when you access them from src/configs, since they're in the process of being created. It is generally better to import
4141
- // another creator function directly from the creator function should you need to refer to another config in the newly added config. */
4142
4141
  "@alextheman/no-plugin-configs-access-from-src-configs": "error"
4143
4142
  }
4144
4143
  },
4144
+ {
4145
+ files: ["src/configs/**"],
4146
+ rules: {
4147
+ "no-restricted-imports": [
4148
+ "error",
4149
+ {
4150
+ paths: ["src/alexPlugin", "src/index", "src"].map((name2) => {
4151
+ return {
4152
+ importNames: ["default"],
4153
+ 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.",
4154
+ name: name2
4155
+ };
4156
+ })
4157
+ }
4158
+ ]
4159
+ }
4160
+ },
4145
4161
  {
4146
4162
  // Since the object exported in the rules index serves the same function as the exports in other projects, it's best to sort them in alphabetical order
4147
4163
  // as well to make it easier to compare against the file directory.
package/dist/index.d.cts CHANGED
@@ -4,7 +4,7 @@ import { Config } from 'prettier';
4
4
  import z from 'zod';
5
5
 
6
6
  var name = "@alextheman/eslint-plugin";
7
- var version = "2.7.2";
7
+ var version = "2.7.4";
8
8
 
9
9
  type CamelToKebab<S extends string> = S extends `${IgnoreCase<"J">}avaScript${infer Rest}` ? Rest extends "" ? "javascript" : `javascript${CamelToKebab<Rest>}` : S extends `${IgnoreCase<"T">}ypeScript${infer Rest}` ? Rest extends "" ? "typescript" : `typescript${CamelToKebab<Rest>}` : S extends `${infer Head}${infer Tail}` ? Head extends Lowercase<Head> ? `${Head}${CamelToKebab<Tail>}` : `-${Lowercase<Head>}${CamelToKebab<Tail>}` : S;
10
10
 
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { Config } from 'prettier';
4
4
  import z from 'zod';
5
5
 
6
6
  var name = "@alextheman/eslint-plugin";
7
- var version = "2.7.2";
7
+ var version = "2.7.4";
8
8
 
9
9
  type CamelToKebab<S extends string> = S extends `${IgnoreCase<"J">}avaScript${infer Rest}` ? Rest extends "" ? "javascript" : `javascript${CamelToKebab<Rest>}` : S extends `${IgnoreCase<"T">}ypeScript${infer Rest}` ? Rest extends "" ? "typescript" : `typescript${CamelToKebab<Rest>}` : S extends `${infer Head}${infer Tail}` ? Head extends Lowercase<Head> ? `${Head}${CamelToKebab<Tail>}` : `-${Lowercase<Head>}${CamelToKebab<Tail>}` : S;
10
10
 
package/dist/index.js CHANGED
@@ -3743,7 +3743,7 @@ var require_src = __commonJS({
3743
3743
 
3744
3744
  // package.json
3745
3745
  var name = "@alextheman/eslint-plugin";
3746
- var version = "2.7.2";
3746
+ var version = "2.7.4";
3747
3747
 
3748
3748
  // src/configs/index.ts
3749
3749
  import packageJson from "eslint-plugin-package-json";
@@ -4114,19 +4114,35 @@ var typeScriptBase = [
4114
4114
  var typeScriptBase_default = typeScriptBase;
4115
4115
 
4116
4116
  // src/configs/personal/eslintPlugin.ts
4117
+ import perfectionist2 from "eslint-plugin-perfectionist";
4117
4118
  function createPersonalEslintPluginConfig(plugin) {
4118
4119
  return [
4119
4120
  {
4120
4121
  plugins: {
4121
- "@alextheman": plugin
4122
+ "@alextheman": plugin,
4123
+ perfectionist: perfectionist2
4122
4124
  },
4123
4125
  rules: {
4124
- // When we pass the plugin into the config creator functions from the index, there's no guarantee that the configs will already be
4125
- // on the plugin when you access them from src/configs, since they're in the process of being created. It is generally better to import
4126
- // another creator function directly from the creator function should you need to refer to another config in the newly added config. */
4127
4126
  "@alextheman/no-plugin-configs-access-from-src-configs": "error"
4128
4127
  }
4129
4128
  },
4129
+ {
4130
+ files: ["src/configs/**"],
4131
+ rules: {
4132
+ "no-restricted-imports": [
4133
+ "error",
4134
+ {
4135
+ paths: ["src/alexPlugin", "src/index", "src"].map((name2) => {
4136
+ return {
4137
+ importNames: ["default"],
4138
+ 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.",
4139
+ name: name2
4140
+ };
4141
+ })
4142
+ }
4143
+ ]
4144
+ }
4145
+ },
4130
4146
  {
4131
4147
  // Since the object exported in the rules index serves the same function as the exports in other projects, it's best to sort them in alphabetical order
4132
4148
  // as well to make it easier to compare against the file directory.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "2.7.2",
3
+ "version": "2.7.4",
4
4
  "description": "A package to provide custom ESLint rules and configs",
5
5
  "license": "ISC",
6
6
  "author": "alextheman",
@@ -11,7 +11,7 @@
11
11
  "dist"
12
12
  ],
13
13
  "scripts": {
14
- "build": "tsup",
14
+ "build": "tsup && npx tsx src/utility/hashConfigChanges.ts",
15
15
  "change-major": "npm version major -m \"Change version number to v%s\"",
16
16
  "change-minor": "npm version minor -m \"Change version number to v%s\"",
17
17
  "change-patch": "npm version patch -m \"Change version number to v%s\"",