@alextheman/eslint-plugin 1.1.0 → 1.1.2

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
@@ -3697,13 +3697,89 @@ var require_globals2 = __commonJS({
3697
3697
  var index_exports = {};
3698
3698
  __export(index_exports, {
3699
3699
  default: () => index_default,
3700
- eslintConfigTypeScriptBase: () => eslint_config_typescript_base_default
3700
+ eslintConfigTypeScriptBase: () => eslint_config_typescript_base_default,
3701
+ meta: () => meta
3701
3702
  });
3702
3703
  module.exports = __toCommonJS(index_exports);
3703
3704
 
3705
+ // src/configs/eslint-config-typescript-base.ts
3706
+ var import_js = __toESM(require_src(), 1);
3707
+ var import_eslint_plugin = __toESM(require("@typescript-eslint/eslint-plugin"), 1);
3708
+ var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
3709
+ var import_eslint_plugin_import = __toESM(require("eslint-plugin-import"), 1);
3710
+ var import_globals = __toESM(require_globals2(), 1);
3711
+ var warnOnFixButErrorOnLint = process.env.ESLINT_MODE === "fix" ? "warn" : "error";
3712
+ var eslint_config_typescript_base_default = [
3713
+ import_js.default.configs.recommended,
3714
+ {
3715
+ name: "@alextheman/eslint-config-typescript-base",
3716
+ files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
3717
+ languageOptions: {
3718
+ parser: import_parser.default,
3719
+ parserOptions: {
3720
+ ecmaVersion: "latest",
3721
+ sourceType: "module"
3722
+ },
3723
+ globals: __spreadValues(__spreadValues(__spreadValues({}, import_globals.default.jest), import_globals.default.node), import_globals.default.browser)
3724
+ },
3725
+ settings: {
3726
+ "import/resolver": {
3727
+ typescript: true,
3728
+ node: true
3729
+ }
3730
+ },
3731
+ ignores: ["dist"],
3732
+ plugins: {
3733
+ "@typescript-eslint": import_eslint_plugin.default,
3734
+ import: import_eslint_plugin_import.default,
3735
+ "@alextheman": index_default
3736
+ },
3737
+ rules: {
3738
+ "import/no-unresolved": warnOnFixButErrorOnLint,
3739
+ eqeqeq: warnOnFixButErrorOnLint,
3740
+ "no-console": "warn",
3741
+ "no-restricted-imports": [
3742
+ warnOnFixButErrorOnLint,
3743
+ {
3744
+ paths: [
3745
+ {
3746
+ name: "@mui/material",
3747
+ message: 'Please use `import Component from "@mui/material/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
3748
+ }
3749
+ ],
3750
+ patterns: [
3751
+ {
3752
+ group: ["./", "../"],
3753
+ message: "Relative imports are not allowed"
3754
+ }
3755
+ ]
3756
+ }
3757
+ ],
3758
+ "@typescript-eslint/no-unused-vars": [
3759
+ warnOnFixButErrorOnLint,
3760
+ {
3761
+ argsIgnorePattern: "^_",
3762
+ varsIgnorePattern: "^_",
3763
+ caughtErrorsIgnorePattern: "^_"
3764
+ }
3765
+ ],
3766
+ // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3767
+ "no-unused-vars": "off",
3768
+ "func-style": ["error", "declaration", { allowArrowFunctions: false }],
3769
+ "prefer-arrow-callback": ["error", { allowNamedFunctions: false }],
3770
+ "no-param-reassign": "error",
3771
+ "no-useless-rename": "error",
3772
+ "sort-vars": "error",
3773
+ "no-cond-assign": "error",
3774
+ "no-undef": warnOnFixButErrorOnLint,
3775
+ "@alextheman/no-namespace-imports": "error"
3776
+ }
3777
+ }
3778
+ ];
3779
+
3704
3780
  // package.json
3705
3781
  var name = "@alextheman/eslint-plugin";
3706
- var version = "1.1.0";
3782
+ var version = "1.1.2";
3707
3783
 
3708
3784
  // src/create-rule.ts
3709
3785
  var import_utils = require("@typescript-eslint/utils");
@@ -3833,89 +3909,15 @@ var rules_default = {
3833
3909
  "no-relative-imports": no_relative_imports_default
3834
3910
  };
3835
3911
 
3836
- // src/configs/eslint-config-typescript-base.ts
3837
- var import_js = __toESM(require_src(), 1);
3838
- var import_eslint_plugin = __toESM(require("@typescript-eslint/eslint-plugin"), 1);
3839
- var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
3840
- var import_eslint_plugin_import = __toESM(require("eslint-plugin-import"), 1);
3841
- var import_globals = __toESM(require_globals2(), 1);
3842
- var warnOnFixButErrorOnLint = process.env.ESLINT_MODE === "fix" ? "warn" : "error";
3843
- var eslint_config_typescript_base_default = [
3844
- import_js.default.configs.recommended,
3845
- {
3846
- name: "@alextheman/eslint-config-typescript-base",
3847
- files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
3848
- languageOptions: {
3849
- parser: import_parser.default,
3850
- parserOptions: {
3851
- ecmaVersion: "latest",
3852
- sourceType: "module"
3853
- },
3854
- globals: __spreadValues(__spreadValues(__spreadValues({}, import_globals.default.jest), import_globals.default.node), import_globals.default.browser)
3855
- },
3856
- settings: {
3857
- "import/resolver": {
3858
- typescript: true,
3859
- node: true
3860
- }
3861
- },
3862
- ignores: ["dist"],
3863
- plugins: {
3864
- "@typescript-eslint": import_eslint_plugin.default,
3865
- import: import_eslint_plugin_import.default,
3866
- "@alextheman": index_default
3867
- },
3868
- rules: {
3869
- "import/no-unresolved": warnOnFixButErrorOnLint,
3870
- eqeqeq: warnOnFixButErrorOnLint,
3871
- "no-console": "warn",
3872
- "no-restricted-imports": [
3873
- warnOnFixButErrorOnLint,
3874
- {
3875
- paths: [
3876
- {
3877
- name: "@mui/material",
3878
- message: 'Please use `import Component from "@mui/material/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
3879
- }
3880
- ],
3881
- patterns: [
3882
- {
3883
- group: ["./", "../"],
3884
- message: "Relative imports are not allowed"
3885
- }
3886
- ]
3887
- }
3888
- ],
3889
- "@typescript-eslint/no-unused-vars": [
3890
- warnOnFixButErrorOnLint,
3891
- {
3892
- argsIgnorePattern: "^_",
3893
- varsIgnorePattern: "^_",
3894
- caughtErrorsIgnorePattern: "^_"
3895
- }
3896
- ],
3897
- // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3898
- "no-unused-vars": "off",
3899
- "func-style": ["error", "declaration", { allowArrowFunctions: false }],
3900
- "prefer-arrow-callback": ["error", { allowNamedFunctions: false }],
3901
- "no-param-reassign": "error",
3902
- "no-useless-rename": "error",
3903
- "sort-vars": "error",
3904
- "no-cond-assign": "error",
3905
- "no-undef": warnOnFixButErrorOnLint,
3906
- "@alextheman/no-namespace-imports": "error"
3907
- }
3908
- }
3909
- ];
3910
-
3911
3912
  // src/index.ts
3912
3913
  var meta = {
3913
3914
  name,
3914
3915
  version,
3915
3916
  namespace: "alextheman"
3916
3917
  };
3917
- var index_default = { meta, rules: rules_default };
3918
+ var index_default = { rules: rules_default };
3918
3919
  // Annotate the CommonJS export names for ESM import in node:
3919
3920
  0 && (module.exports = {
3920
- eslintConfigTypeScriptBase
3921
+ eslintConfigTypeScriptBase,
3922
+ meta
3921
3923
  });
package/dist/index.d.cts CHANGED
@@ -1239,11 +1239,6 @@ declare const _default$1: ({
1239
1239
  };
1240
1240
  };
1241
1241
  "@alextheman": {
1242
- meta: {
1243
- name: string;
1244
- version: string;
1245
- namespace: string;
1246
- };
1247
1242
  rules: {
1248
1243
  "no-namespace-imports": _typescript_eslint_utils_ts_eslint.RuleModule<"message", [{
1249
1244
  allow: string[];
@@ -1287,12 +1282,12 @@ declare const _default$1: ({
1287
1282
  };
1288
1283
  })[];
1289
1284
 
1285
+ declare const meta: {
1286
+ name: string;
1287
+ version: string;
1288
+ namespace: string;
1289
+ };
1290
1290
  declare const _default: {
1291
- meta: {
1292
- name: string;
1293
- version: string;
1294
- namespace: string;
1295
- };
1296
1291
  rules: {
1297
1292
  "no-namespace-imports": _typescript_eslint_utils_ts_eslint.RuleModule<"message", [{
1298
1293
  allow: string[];
@@ -1301,4 +1296,4 @@ declare const _default: {
1301
1296
  };
1302
1297
  };
1303
1298
 
1304
- export { _default as default, _default$1 as eslintConfigTypeScriptBase };
1299
+ export { _default as default, _default$1 as eslintConfigTypeScriptBase, meta };
package/dist/index.d.ts CHANGED
@@ -1239,11 +1239,6 @@ declare const _default$1: ({
1239
1239
  };
1240
1240
  };
1241
1241
  "@alextheman": {
1242
- meta: {
1243
- name: string;
1244
- version: string;
1245
- namespace: string;
1246
- };
1247
1242
  rules: {
1248
1243
  "no-namespace-imports": _typescript_eslint_utils_ts_eslint.RuleModule<"message", [{
1249
1244
  allow: string[];
@@ -1287,12 +1282,12 @@ declare const _default$1: ({
1287
1282
  };
1288
1283
  })[];
1289
1284
 
1285
+ declare const meta: {
1286
+ name: string;
1287
+ version: string;
1288
+ namespace: string;
1289
+ };
1290
1290
  declare const _default: {
1291
- meta: {
1292
- name: string;
1293
- version: string;
1294
- namespace: string;
1295
- };
1296
1291
  rules: {
1297
1292
  "no-namespace-imports": _typescript_eslint_utils_ts_eslint.RuleModule<"message", [{
1298
1293
  allow: string[];
@@ -1301,4 +1296,4 @@ declare const _default: {
1301
1296
  };
1302
1297
  };
1303
1298
 
1304
- export { _default as default, _default$1 as eslintConfigTypeScriptBase };
1299
+ export { _default as default, _default$1 as eslintConfigTypeScriptBase, meta };
package/dist/index.js CHANGED
@@ -3687,9 +3687,84 @@ var require_globals2 = __commonJS({
3687
3687
  }
3688
3688
  });
3689
3689
 
3690
+ // src/configs/eslint-config-typescript-base.ts
3691
+ var import_js = __toESM(require_src(), 1);
3692
+ var import_globals = __toESM(require_globals2(), 1);
3693
+ import eslintPlugin from "@typescript-eslint/eslint-plugin";
3694
+ import tsparser from "@typescript-eslint/parser";
3695
+ import importPlugin from "eslint-plugin-import";
3696
+ var warnOnFixButErrorOnLint = process.env.ESLINT_MODE === "fix" ? "warn" : "error";
3697
+ var eslint_config_typescript_base_default = [
3698
+ import_js.default.configs.recommended,
3699
+ {
3700
+ name: "@alextheman/eslint-config-typescript-base",
3701
+ files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
3702
+ languageOptions: {
3703
+ parser: tsparser,
3704
+ parserOptions: {
3705
+ ecmaVersion: "latest",
3706
+ sourceType: "module"
3707
+ },
3708
+ globals: __spreadValues(__spreadValues(__spreadValues({}, import_globals.default.jest), import_globals.default.node), import_globals.default.browser)
3709
+ },
3710
+ settings: {
3711
+ "import/resolver": {
3712
+ typescript: true,
3713
+ node: true
3714
+ }
3715
+ },
3716
+ ignores: ["dist"],
3717
+ plugins: {
3718
+ "@typescript-eslint": eslintPlugin,
3719
+ import: importPlugin,
3720
+ "@alextheman": index_default
3721
+ },
3722
+ rules: {
3723
+ "import/no-unresolved": warnOnFixButErrorOnLint,
3724
+ eqeqeq: warnOnFixButErrorOnLint,
3725
+ "no-console": "warn",
3726
+ "no-restricted-imports": [
3727
+ warnOnFixButErrorOnLint,
3728
+ {
3729
+ paths: [
3730
+ {
3731
+ name: "@mui/material",
3732
+ message: 'Please use `import Component from "@mui/material/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
3733
+ }
3734
+ ],
3735
+ patterns: [
3736
+ {
3737
+ group: ["./", "../"],
3738
+ message: "Relative imports are not allowed"
3739
+ }
3740
+ ]
3741
+ }
3742
+ ],
3743
+ "@typescript-eslint/no-unused-vars": [
3744
+ warnOnFixButErrorOnLint,
3745
+ {
3746
+ argsIgnorePattern: "^_",
3747
+ varsIgnorePattern: "^_",
3748
+ caughtErrorsIgnorePattern: "^_"
3749
+ }
3750
+ ],
3751
+ // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3752
+ "no-unused-vars": "off",
3753
+ "func-style": ["error", "declaration", { allowArrowFunctions: false }],
3754
+ "prefer-arrow-callback": ["error", { allowNamedFunctions: false }],
3755
+ "no-param-reassign": "error",
3756
+ "no-useless-rename": "error",
3757
+ "sort-vars": "error",
3758
+ "no-cond-assign": "error",
3759
+ "no-undef": warnOnFixButErrorOnLint,
3760
+ "@alextheman/no-namespace-imports": "error"
3761
+ }
3762
+ }
3763
+ ];
3764
+
3690
3765
  // package.json
3691
3766
  var name = "@alextheman/eslint-plugin";
3692
- var version = "1.1.0";
3767
+ var version = "1.1.2";
3693
3768
 
3694
3769
  // src/create-rule.ts
3695
3770
  import { ESLintUtils } from "@typescript-eslint/utils";
@@ -3819,89 +3894,15 @@ var rules_default = {
3819
3894
  "no-relative-imports": no_relative_imports_default
3820
3895
  };
3821
3896
 
3822
- // src/configs/eslint-config-typescript-base.ts
3823
- var import_js = __toESM(require_src(), 1);
3824
- var import_globals = __toESM(require_globals2(), 1);
3825
- import eslintPlugin from "@typescript-eslint/eslint-plugin";
3826
- import tsparser from "@typescript-eslint/parser";
3827
- import importPlugin from "eslint-plugin-import";
3828
- var warnOnFixButErrorOnLint = process.env.ESLINT_MODE === "fix" ? "warn" : "error";
3829
- var eslint_config_typescript_base_default = [
3830
- import_js.default.configs.recommended,
3831
- {
3832
- name: "@alextheman/eslint-config-typescript-base",
3833
- files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
3834
- languageOptions: {
3835
- parser: tsparser,
3836
- parserOptions: {
3837
- ecmaVersion: "latest",
3838
- sourceType: "module"
3839
- },
3840
- globals: __spreadValues(__spreadValues(__spreadValues({}, import_globals.default.jest), import_globals.default.node), import_globals.default.browser)
3841
- },
3842
- settings: {
3843
- "import/resolver": {
3844
- typescript: true,
3845
- node: true
3846
- }
3847
- },
3848
- ignores: ["dist"],
3849
- plugins: {
3850
- "@typescript-eslint": eslintPlugin,
3851
- import: importPlugin,
3852
- "@alextheman": index_default
3853
- },
3854
- rules: {
3855
- "import/no-unresolved": warnOnFixButErrorOnLint,
3856
- eqeqeq: warnOnFixButErrorOnLint,
3857
- "no-console": "warn",
3858
- "no-restricted-imports": [
3859
- warnOnFixButErrorOnLint,
3860
- {
3861
- paths: [
3862
- {
3863
- name: "@mui/material",
3864
- message: 'Please use `import Component from "@mui/material/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
3865
- }
3866
- ],
3867
- patterns: [
3868
- {
3869
- group: ["./", "../"],
3870
- message: "Relative imports are not allowed"
3871
- }
3872
- ]
3873
- }
3874
- ],
3875
- "@typescript-eslint/no-unused-vars": [
3876
- warnOnFixButErrorOnLint,
3877
- {
3878
- argsIgnorePattern: "^_",
3879
- varsIgnorePattern: "^_",
3880
- caughtErrorsIgnorePattern: "^_"
3881
- }
3882
- ],
3883
- // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3884
- "no-unused-vars": "off",
3885
- "func-style": ["error", "declaration", { allowArrowFunctions: false }],
3886
- "prefer-arrow-callback": ["error", { allowNamedFunctions: false }],
3887
- "no-param-reassign": "error",
3888
- "no-useless-rename": "error",
3889
- "sort-vars": "error",
3890
- "no-cond-assign": "error",
3891
- "no-undef": warnOnFixButErrorOnLint,
3892
- "@alextheman/no-namespace-imports": "error"
3893
- }
3894
- }
3895
- ];
3896
-
3897
3897
  // src/index.ts
3898
3898
  var meta = {
3899
3899
  name,
3900
3900
  version,
3901
3901
  namespace: "alextheman"
3902
3902
  };
3903
- var index_default = { meta, rules: rules_default };
3903
+ var index_default = { rules: rules_default };
3904
3904
  export {
3905
3905
  index_default as default,
3906
- eslint_config_typescript_base_default as eslintConfigTypeScriptBase
3906
+ eslint_config_typescript_base_default as eslintConfigTypeScriptBase,
3907
+ meta
3907
3908
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",