@alextheman/eslint-plugin 1.2.6 → 1.2.8

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
@@ -3699,13 +3699,14 @@ var require_globals2 = __commonJS({
3699
3699
  // src/index.ts
3700
3700
  var index_exports = {};
3701
3701
  __export(index_exports, {
3702
- default: () => index_default
3702
+ default: () => index_default,
3703
+ prettierRules: () => prettierRules
3703
3704
  });
3704
3705
  module.exports = __toCommonJS(index_exports);
3705
3706
 
3706
3707
  // package.json
3707
3708
  var name = "@alextheman/eslint-plugin";
3708
- var version = "1.2.6";
3709
+ var version = "1.2.8";
3709
3710
 
3710
3711
  // src/create-rule.ts
3711
3712
  var import_utils = require("@typescript-eslint/utils");
@@ -3843,10 +3844,10 @@ var import_eslint_plugin_import = __toESM(require("eslint-plugin-import"), 1);
3843
3844
  var import_globals = __toESM(require_globals2(), 1);
3844
3845
  var import_eslint_config_prettier = __toESM(require("eslint-config-prettier"), 1);
3845
3846
  var import_eslint_plugin_prettier = __toESM(require("eslint-plugin-prettier"), 1);
3846
- var warnOnFixButErrorOnLint = (
3847
- // eslint-disable-next-line no-undef
3848
- process.env.ESLINT_MODE === "fix" ? "warn" : "error"
3849
- );
3847
+ var warnOnFixButErrorOnLint = process.env.ESLINT_MODE === "fix" ? "warn" : "error";
3848
+ var prettierRules = {
3849
+ printWidth: 100
3850
+ };
3850
3851
  var eslint_config_default = [
3851
3852
  import_js.default.configs.recommended,
3852
3853
  import_eslint_config_prettier.default,
@@ -3898,22 +3899,15 @@ var eslint_config_default = [
3898
3899
  ],
3899
3900
  // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3900
3901
  "no-unused-vars": "off",
3901
- "func-style": [
3902
- warnOnFixButErrorOnLint,
3903
- "declaration",
3904
- { allowArrowFunctions: false }
3905
- ],
3906
- "prefer-arrow-callback": [
3907
- warnOnFixButErrorOnLint,
3908
- { allowNamedFunctions: false }
3909
- ],
3902
+ "func-style": [warnOnFixButErrorOnLint, "declaration", { allowArrowFunctions: false }],
3903
+ "prefer-arrow-callback": [warnOnFixButErrorOnLint, { allowNamedFunctions: false }],
3910
3904
  "no-param-reassign": warnOnFixButErrorOnLint,
3911
3905
  "no-useless-rename": warnOnFixButErrorOnLint,
3912
3906
  "sort-vars": warnOnFixButErrorOnLint,
3913
3907
  "no-cond-assign": warnOnFixButErrorOnLint,
3914
3908
  "no-undef": warnOnFixButErrorOnLint,
3915
3909
  "@typescript-eslint/consistent-type-imports": warnOnFixButErrorOnLint,
3916
- "prettier/prettier": ["warn", { printWidth: 100 }]
3910
+ "prettier/prettier": ["warn", prettierRules]
3917
3911
  }
3918
3912
  }
3919
3913
  ];
@@ -3981,3 +3975,7 @@ plugin.configs.alexTypeScriptReactBase = [
3981
3975
  }
3982
3976
  ];
3983
3977
  var index_default = plugin;
3978
+ // Annotate the CommonJS export names for ESM import in node:
3979
+ 0 && (module.exports = {
3980
+ prettierRules
3981
+ });
package/dist/index.d.cts CHANGED
@@ -1,7 +1,10 @@
1
1
  import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
2
+ import { Config } from 'prettier';
2
3
 
3
4
  var name = "@alextheman/eslint-plugin";
4
- var version = "1.2.6";
5
+ var version = "1.2.8";
6
+
7
+ declare const prettierRules: Config;
5
8
 
6
9
  interface AlexPlugin {
7
10
  meta: {
@@ -12,6 +15,7 @@ interface AlexPlugin {
12
15
  configs: Record<string, any>;
13
16
  rules: Record<string, any>;
14
17
  }
18
+
15
19
  declare const plugin: {
16
20
  meta: {
17
21
  name: string;
@@ -30,4 +34,4 @@ declare const plugin: {
30
34
  };
31
35
  };
32
36
 
33
- export { type AlexPlugin, plugin as default };
37
+ export { type AlexPlugin, plugin as default, prettierRules };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
2
+ import { Config } from 'prettier';
2
3
 
3
4
  var name = "@alextheman/eslint-plugin";
4
- var version = "1.2.6";
5
+ var version = "1.2.8";
6
+
7
+ declare const prettierRules: Config;
5
8
 
6
9
  interface AlexPlugin {
7
10
  meta: {
@@ -12,6 +15,7 @@ interface AlexPlugin {
12
15
  configs: Record<string, any>;
13
16
  rules: Record<string, any>;
14
17
  }
18
+
15
19
  declare const plugin: {
16
20
  meta: {
17
21
  name: string;
@@ -30,4 +34,4 @@ declare const plugin: {
30
34
  };
31
35
  };
32
36
 
33
- export { type AlexPlugin, plugin as default };
37
+ export { type AlexPlugin, plugin as default, prettierRules };
package/dist/index.js CHANGED
@@ -3692,7 +3692,7 @@ var require_globals2 = __commonJS({
3692
3692
 
3693
3693
  // package.json
3694
3694
  var name = "@alextheman/eslint-plugin";
3695
- var version = "1.2.6";
3695
+ var version = "1.2.8";
3696
3696
 
3697
3697
  // src/create-rule.ts
3698
3698
  import { ESLintUtils } from "@typescript-eslint/utils";
@@ -3830,10 +3830,10 @@ import tsparser from "@typescript-eslint/parser";
3830
3830
  import importPlugin from "eslint-plugin-import";
3831
3831
  import prettierConfig from "eslint-config-prettier";
3832
3832
  import prettierPlugin from "eslint-plugin-prettier";
3833
- var warnOnFixButErrorOnLint = (
3834
- // eslint-disable-next-line no-undef
3835
- process.env.ESLINT_MODE === "fix" ? "warn" : "error"
3836
- );
3833
+ var warnOnFixButErrorOnLint = process.env.ESLINT_MODE === "fix" ? "warn" : "error";
3834
+ var prettierRules = {
3835
+ printWidth: 100
3836
+ };
3837
3837
  var eslint_config_default = [
3838
3838
  import_js.default.configs.recommended,
3839
3839
  prettierConfig,
@@ -3885,22 +3885,15 @@ var eslint_config_default = [
3885
3885
  ],
3886
3886
  // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3887
3887
  "no-unused-vars": "off",
3888
- "func-style": [
3889
- warnOnFixButErrorOnLint,
3890
- "declaration",
3891
- { allowArrowFunctions: false }
3892
- ],
3893
- "prefer-arrow-callback": [
3894
- warnOnFixButErrorOnLint,
3895
- { allowNamedFunctions: false }
3896
- ],
3888
+ "func-style": [warnOnFixButErrorOnLint, "declaration", { allowArrowFunctions: false }],
3889
+ "prefer-arrow-callback": [warnOnFixButErrorOnLint, { allowNamedFunctions: false }],
3897
3890
  "no-param-reassign": warnOnFixButErrorOnLint,
3898
3891
  "no-useless-rename": warnOnFixButErrorOnLint,
3899
3892
  "sort-vars": warnOnFixButErrorOnLint,
3900
3893
  "no-cond-assign": warnOnFixButErrorOnLint,
3901
3894
  "no-undef": warnOnFixButErrorOnLint,
3902
3895
  "@typescript-eslint/consistent-type-imports": warnOnFixButErrorOnLint,
3903
- "prettier/prettier": ["warn", { printWidth: 100 }]
3896
+ "prettier/prettier": ["warn", prettierRules]
3904
3897
  }
3905
3898
  }
3906
3899
  ];
@@ -3969,5 +3962,6 @@ plugin.configs.alexTypeScriptReactBase = [
3969
3962
  ];
3970
3963
  var index_default = plugin;
3971
3964
  export {
3972
- index_default as default
3965
+ index_default as default,
3966
+ prettierRules
3973
3967
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,8 +10,8 @@
10
10
  "scripts": {
11
11
  "test": "vitest run",
12
12
  "test-watch": "vitest",
13
- "format": "prettier --write --parser typescript 'src/**/*.ts' 'tests/**/*.ts' && ESLINT_MODE=fix eslint --fix 'src/**/*.ts' 'tests/**/*.ts'",
14
- "lint": "ESLINT_MODE=lint eslint 'src/**/*.ts' 'tests/**/*.ts' && prettier --check --parser typescript 'src/**/*.ts' 'tests/**/*.ts'",
13
+ "format": "prettier --write --parser typescript 'src/**/*.ts' 'tests/**/*.ts' 'eslint.config.ts' && ESLINT_MODE=fix eslint --fix 'src/**/*.ts' 'tests/**/*.ts' 'eslint.config.ts'",
14
+ "lint": "ESLINT_MODE=lint eslint 'src/**/*.ts' 'tests/**/*.ts' 'eslint.config.ts' && prettier --check --parser typescript 'src/**/*.ts' 'tests/**/*.ts' 'eslint.config.ts'",
15
15
  "update-dependencies": "npx npm-check-updates -u && npm install",
16
16
  "prepare": "husky",
17
17
  "build": "tsup",