@alextheman/eslint-plugin 1.6.8 → 1.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 +94 -76
- package/dist/index.d.cts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +94 -76
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3700,16 +3700,36 @@ var require_globals2 = __commonJS({
|
|
|
3700
3700
|
var index_exports = {};
|
|
3701
3701
|
__export(index_exports, {
|
|
3702
3702
|
default: () => index_default,
|
|
3703
|
-
prettierRules: () =>
|
|
3704
|
-
warnOnFixButErrorOnLint: () =>
|
|
3703
|
+
prettierRules: () => prettierRules_default,
|
|
3704
|
+
warnOnFixButErrorOnLint: () => warnOnFixButErrorOnLint_default
|
|
3705
3705
|
});
|
|
3706
3706
|
module.exports = __toCommonJS(index_exports);
|
|
3707
3707
|
|
|
3708
3708
|
// package.json
|
|
3709
3709
|
var name = "@alextheman/eslint-plugin";
|
|
3710
|
-
var version = "1.
|
|
3710
|
+
var version = "1.7.0";
|
|
3711
3711
|
|
|
3712
|
-
// src/configs/
|
|
3712
|
+
// src/configs/warnOnFixButErrorOnLint.ts
|
|
3713
|
+
var warnOnFixButErrorOnLint = process.env.ESLINT_MODE === "fix" ? "warn" : "error";
|
|
3714
|
+
var warnOnFixButErrorOnLint_default = warnOnFixButErrorOnLint;
|
|
3715
|
+
|
|
3716
|
+
// src/configs/alexPluginBase.ts
|
|
3717
|
+
function createAlexPluginBaseConfig(plugin2) {
|
|
3718
|
+
return [
|
|
3719
|
+
{
|
|
3720
|
+
plugins: {
|
|
3721
|
+
"@alextheman": plugin2
|
|
3722
|
+
},
|
|
3723
|
+
rules: {
|
|
3724
|
+
"@alextheman/no-namespace-imports": warnOnFixButErrorOnLint_default,
|
|
3725
|
+
"@alextheman/no-relative-imports": warnOnFixButErrorOnLint_default
|
|
3726
|
+
}
|
|
3727
|
+
}
|
|
3728
|
+
];
|
|
3729
|
+
}
|
|
3730
|
+
var alexPluginBase_default = createAlexPluginBaseConfig;
|
|
3731
|
+
|
|
3732
|
+
// src/configs/typeScriptBase.ts
|
|
3713
3733
|
var import_js = __toESM(require_src(), 1);
|
|
3714
3734
|
var import_eslint_plugin = __toESM(require("@typescript-eslint/eslint-plugin"), 1);
|
|
3715
3735
|
var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
|
|
@@ -3719,15 +3739,14 @@ var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfecti
|
|
|
3719
3739
|
var import_eslint_plugin_prettier = __toESM(require("eslint-plugin-prettier"), 1);
|
|
3720
3740
|
var import_globals = __toESM(require_globals2(), 1);
|
|
3721
3741
|
|
|
3722
|
-
// src/configs/
|
|
3742
|
+
// src/configs/prettierRules.ts
|
|
3723
3743
|
var prettierRules = {
|
|
3724
3744
|
printWidth: 100
|
|
3725
3745
|
};
|
|
3726
|
-
var
|
|
3746
|
+
var prettierRules_default = prettierRules;
|
|
3727
3747
|
|
|
3728
|
-
// src/configs/
|
|
3729
|
-
var
|
|
3730
|
-
var esLintConfigTypeScriptBase = [
|
|
3748
|
+
// src/configs/typeScriptBase.ts
|
|
3749
|
+
var typeScriptBase = [
|
|
3731
3750
|
import_js.default.configs.recommended,
|
|
3732
3751
|
import_eslint_config_prettier.default,
|
|
3733
3752
|
{
|
|
@@ -3755,11 +3774,11 @@ var esLintConfigTypeScriptBase = [
|
|
|
3755
3774
|
perfectionist: import_eslint_plugin_perfectionist.default
|
|
3756
3775
|
},
|
|
3757
3776
|
rules: {
|
|
3758
|
-
"import/no-unresolved":
|
|
3759
|
-
eqeqeq:
|
|
3760
|
-
"no-console": [
|
|
3777
|
+
"import/no-unresolved": warnOnFixButErrorOnLint_default,
|
|
3778
|
+
eqeqeq: warnOnFixButErrorOnLint_default,
|
|
3779
|
+
"no-console": [warnOnFixButErrorOnLint_default, { allow: ["warn", "error"] }],
|
|
3761
3780
|
"no-restricted-imports": [
|
|
3762
|
-
|
|
3781
|
+
warnOnFixButErrorOnLint_default,
|
|
3763
3782
|
{
|
|
3764
3783
|
patterns: [
|
|
3765
3784
|
{
|
|
@@ -3770,7 +3789,7 @@ var esLintConfigTypeScriptBase = [
|
|
|
3770
3789
|
}
|
|
3771
3790
|
],
|
|
3772
3791
|
"perfectionist/sort-imports": [
|
|
3773
|
-
|
|
3792
|
+
warnOnFixButErrorOnLint_default,
|
|
3774
3793
|
{
|
|
3775
3794
|
type: "alphabetical",
|
|
3776
3795
|
order: "asc",
|
|
@@ -3784,7 +3803,7 @@ var esLintConfigTypeScriptBase = [
|
|
|
3784
3803
|
}
|
|
3785
3804
|
],
|
|
3786
3805
|
"perfectionist/sort-exports": [
|
|
3787
|
-
|
|
3806
|
+
warnOnFixButErrorOnLint_default,
|
|
3788
3807
|
{
|
|
3789
3808
|
type: "alphabetical",
|
|
3790
3809
|
order: "asc",
|
|
@@ -3799,7 +3818,7 @@ var esLintConfigTypeScriptBase = [
|
|
|
3799
3818
|
}
|
|
3800
3819
|
],
|
|
3801
3820
|
"@typescript-eslint/no-unused-vars": [
|
|
3802
|
-
|
|
3821
|
+
warnOnFixButErrorOnLint_default,
|
|
3803
3822
|
{
|
|
3804
3823
|
argsIgnorePattern: "^_",
|
|
3805
3824
|
varsIgnorePattern: "^_",
|
|
@@ -3808,76 +3827,69 @@ var esLintConfigTypeScriptBase = [
|
|
|
3808
3827
|
],
|
|
3809
3828
|
// Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
|
|
3810
3829
|
"no-unused-vars": "off",
|
|
3811
|
-
"func-style": [
|
|
3812
|
-
"prefer-arrow-callback": [
|
|
3813
|
-
"arrow-body-style": [
|
|
3814
|
-
"no-param-reassign":
|
|
3815
|
-
"no-useless-rename":
|
|
3816
|
-
"sort-vars":
|
|
3817
|
-
"no-cond-assign":
|
|
3818
|
-
"no-undef":
|
|
3819
|
-
"@typescript-eslint/consistent-type-imports":
|
|
3820
|
-
"prettier/prettier": ["warn",
|
|
3830
|
+
"func-style": [warnOnFixButErrorOnLint_default, "declaration", { allowArrowFunctions: false }],
|
|
3831
|
+
"prefer-arrow-callback": [warnOnFixButErrorOnLint_default, { allowNamedFunctions: false }],
|
|
3832
|
+
"arrow-body-style": [warnOnFixButErrorOnLint_default, "always"],
|
|
3833
|
+
"no-param-reassign": warnOnFixButErrorOnLint_default,
|
|
3834
|
+
"no-useless-rename": warnOnFixButErrorOnLint_default,
|
|
3835
|
+
"sort-vars": warnOnFixButErrorOnLint_default,
|
|
3836
|
+
"no-cond-assign": warnOnFixButErrorOnLint_default,
|
|
3837
|
+
"no-undef": warnOnFixButErrorOnLint_default,
|
|
3838
|
+
"@typescript-eslint/consistent-type-imports": warnOnFixButErrorOnLint_default,
|
|
3839
|
+
"prettier/prettier": ["warn", prettierRules_default]
|
|
3821
3840
|
}
|
|
3822
3841
|
}
|
|
3823
3842
|
];
|
|
3824
|
-
var
|
|
3843
|
+
var typeScriptBase_default = typeScriptBase;
|
|
3825
3844
|
|
|
3826
|
-
// src/configs/
|
|
3845
|
+
// src/configs/alexTypeScriptBase.ts
|
|
3827
3846
|
function createAlexTypeScriptBaseConfig(plugin2) {
|
|
3828
|
-
return [
|
|
3829
|
-
...eslint_config_typescript_base_default,
|
|
3830
|
-
{
|
|
3831
|
-
plugins: {
|
|
3832
|
-
"@alextheman": plugin2
|
|
3833
|
-
},
|
|
3834
|
-
rules: {
|
|
3835
|
-
"@alextheman/no-namespace-imports": warnOnFixButErrorOnLint,
|
|
3836
|
-
"@alextheman/no-relative-imports": warnOnFixButErrorOnLint
|
|
3837
|
-
}
|
|
3838
|
-
}
|
|
3839
|
-
];
|
|
3847
|
+
return [...alexPluginBase_default(plugin2), ...typeScriptBase_default];
|
|
3840
3848
|
}
|
|
3841
|
-
var
|
|
3849
|
+
var alexTypeScriptBase_default = createAlexTypeScriptBaseConfig;
|
|
3842
3850
|
|
|
3843
|
-
// src/configs/
|
|
3851
|
+
// src/configs/typeScriptReactBase.ts
|
|
3844
3852
|
var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
|
|
3845
3853
|
var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
|
|
3846
3854
|
var import_eslint_plugin_react_refresh = __toESM(require("eslint-plugin-react-refresh"), 1);
|
|
3847
3855
|
var import_globals2 = __toESM(require_globals2(), 1);
|
|
3856
|
+
var typeScriptReactBase = [
|
|
3857
|
+
...typeScriptBase_default,
|
|
3858
|
+
{
|
|
3859
|
+
name: "@alextheman/eslint-config-typescript-react-base",
|
|
3860
|
+
languageOptions: {
|
|
3861
|
+
ecmaVersion: 2020,
|
|
3862
|
+
globals: import_globals2.default.browser
|
|
3863
|
+
},
|
|
3864
|
+
plugins: {
|
|
3865
|
+
"react-hooks": import_eslint_plugin_react_hooks.default,
|
|
3866
|
+
"react-refresh": import_eslint_plugin_react_refresh.default,
|
|
3867
|
+
react: import_eslint_plugin_react.default
|
|
3868
|
+
},
|
|
3869
|
+
rules: __spreadProps(__spreadValues({}, import_eslint_plugin_react_hooks.default.configs.recommended.rules), {
|
|
3870
|
+
"react-refresh/only-export-components": "off",
|
|
3871
|
+
"react-hooks/exhaustive-deps": "off",
|
|
3872
|
+
"no-restricted-imports": [
|
|
3873
|
+
warnOnFixButErrorOnLint_default,
|
|
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
|
+
}
|
|
3882
|
+
]
|
|
3883
|
+
})
|
|
3884
|
+
}
|
|
3885
|
+
];
|
|
3886
|
+
var typeScriptReactBase_default = typeScriptReactBase;
|
|
3887
|
+
|
|
3888
|
+
// src/configs/alexTypeScriptReactBase.ts
|
|
3848
3889
|
function createAlexTypeScriptReactBaseConfig(plugin2) {
|
|
3849
|
-
return [
|
|
3850
|
-
...alex_typescript_base_default(plugin2),
|
|
3851
|
-
{
|
|
3852
|
-
name: "@alextheman/eslint-config-typescript-react-base",
|
|
3853
|
-
languageOptions: {
|
|
3854
|
-
ecmaVersion: 2020,
|
|
3855
|
-
globals: import_globals2.default.browser
|
|
3856
|
-
},
|
|
3857
|
-
plugins: {
|
|
3858
|
-
"react-hooks": import_eslint_plugin_react_hooks.default,
|
|
3859
|
-
"react-refresh": import_eslint_plugin_react_refresh.default,
|
|
3860
|
-
react: import_eslint_plugin_react.default
|
|
3861
|
-
},
|
|
3862
|
-
rules: __spreadProps(__spreadValues({}, import_eslint_plugin_react_hooks.default.configs.recommended.rules), {
|
|
3863
|
-
"react-refresh/only-export-components": "off",
|
|
3864
|
-
"react-hooks/exhaustive-deps": "off",
|
|
3865
|
-
"no-restricted-imports": [
|
|
3866
|
-
warnOnFixButErrorOnLint,
|
|
3867
|
-
{
|
|
3868
|
-
paths: [
|
|
3869
|
-
{
|
|
3870
|
-
name: "@mui/material",
|
|
3871
|
-
message: 'Please use `import Component from "@mui/material/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
|
|
3872
|
-
}
|
|
3873
|
-
]
|
|
3874
|
-
}
|
|
3875
|
-
]
|
|
3876
|
-
})
|
|
3877
|
-
}
|
|
3878
|
-
];
|
|
3890
|
+
return [...alexTypeScriptBase_default(plugin2), ...typeScriptReactBase_default];
|
|
3879
3891
|
}
|
|
3880
|
-
var
|
|
3892
|
+
var alexTypeScriptReactBase_default = createAlexTypeScriptReactBaseConfig;
|
|
3881
3893
|
|
|
3882
3894
|
// src/create-rule.ts
|
|
3883
3895
|
var import_utils = require("@typescript-eslint/utils");
|
|
@@ -4052,14 +4064,20 @@ var plugin = {
|
|
|
4052
4064
|
namespace: "alextheman"
|
|
4053
4065
|
},
|
|
4054
4066
|
configs: {
|
|
4067
|
+
alexPluginBase: [],
|
|
4055
4068
|
alexTypeScriptBase: [],
|
|
4056
|
-
alexTypeScriptReactBase: []
|
|
4069
|
+
alexTypeScriptReactBase: [],
|
|
4070
|
+
typeScriptBase: [],
|
|
4071
|
+
typeScriptReactBase: []
|
|
4057
4072
|
},
|
|
4058
4073
|
rules: rules_default
|
|
4059
4074
|
};
|
|
4060
4075
|
plugin.configs = {
|
|
4061
|
-
|
|
4062
|
-
|
|
4076
|
+
alexPluginBase: alexPluginBase_default(plugin),
|
|
4077
|
+
alexTypeScriptBase: alexTypeScriptBase_default(plugin),
|
|
4078
|
+
alexTypeScriptReactBase: alexTypeScriptReactBase_default(plugin),
|
|
4079
|
+
typeScriptBase: typeScriptBase_default,
|
|
4080
|
+
typeScriptReactBase: typeScriptReactBase_default
|
|
4063
4081
|
};
|
|
4064
4082
|
var index_default = plugin;
|
|
4065
4083
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.d.cts
CHANGED
|
@@ -2,12 +2,12 @@ import { Linter } from 'eslint';
|
|
|
2
2
|
import { Config } from 'prettier';
|
|
3
3
|
|
|
4
4
|
var name = "@alextheman/eslint-plugin";
|
|
5
|
-
var version = "1.
|
|
6
|
-
|
|
7
|
-
declare const warnOnFixButErrorOnLint: string;
|
|
5
|
+
var version = "1.7.0";
|
|
8
6
|
|
|
9
7
|
declare const prettierRules: Config;
|
|
10
8
|
|
|
9
|
+
declare const warnOnFixButErrorOnLint: string;
|
|
10
|
+
|
|
11
11
|
interface AlexPlugin {
|
|
12
12
|
meta: {
|
|
13
13
|
name: typeof name;
|
|
@@ -15,8 +15,11 @@ interface AlexPlugin {
|
|
|
15
15
|
namespace: "alextheman";
|
|
16
16
|
};
|
|
17
17
|
configs: {
|
|
18
|
+
alexPluginBase: Linter.Config[];
|
|
18
19
|
alexTypeScriptBase: Linter.Config[];
|
|
19
20
|
alexTypeScriptReactBase: Linter.Config[];
|
|
21
|
+
typeScriptBase: Linter.Config[];
|
|
22
|
+
typeScriptReactBase: Linter.Config[];
|
|
20
23
|
};
|
|
21
24
|
rules: Record<string, any>;
|
|
22
25
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,12 +2,12 @@ import { Linter } from 'eslint';
|
|
|
2
2
|
import { Config } from 'prettier';
|
|
3
3
|
|
|
4
4
|
var name = "@alextheman/eslint-plugin";
|
|
5
|
-
var version = "1.
|
|
6
|
-
|
|
7
|
-
declare const warnOnFixButErrorOnLint: string;
|
|
5
|
+
var version = "1.7.0";
|
|
8
6
|
|
|
9
7
|
declare const prettierRules: Config;
|
|
10
8
|
|
|
9
|
+
declare const warnOnFixButErrorOnLint: string;
|
|
10
|
+
|
|
11
11
|
interface AlexPlugin {
|
|
12
12
|
meta: {
|
|
13
13
|
name: typeof name;
|
|
@@ -15,8 +15,11 @@ interface AlexPlugin {
|
|
|
15
15
|
namespace: "alextheman";
|
|
16
16
|
};
|
|
17
17
|
configs: {
|
|
18
|
+
alexPluginBase: Linter.Config[];
|
|
18
19
|
alexTypeScriptBase: Linter.Config[];
|
|
19
20
|
alexTypeScriptReactBase: Linter.Config[];
|
|
21
|
+
typeScriptBase: Linter.Config[];
|
|
22
|
+
typeScriptReactBase: Linter.Config[];
|
|
20
23
|
};
|
|
21
24
|
rules: Record<string, any>;
|
|
22
25
|
}
|
package/dist/index.js
CHANGED
|
@@ -3692,9 +3692,29 @@ var require_globals2 = __commonJS({
|
|
|
3692
3692
|
|
|
3693
3693
|
// package.json
|
|
3694
3694
|
var name = "@alextheman/eslint-plugin";
|
|
3695
|
-
var version = "1.
|
|
3695
|
+
var version = "1.7.0";
|
|
3696
3696
|
|
|
3697
|
-
// src/configs/
|
|
3697
|
+
// src/configs/warnOnFixButErrorOnLint.ts
|
|
3698
|
+
var warnOnFixButErrorOnLint = process.env.ESLINT_MODE === "fix" ? "warn" : "error";
|
|
3699
|
+
var warnOnFixButErrorOnLint_default = warnOnFixButErrorOnLint;
|
|
3700
|
+
|
|
3701
|
+
// src/configs/alexPluginBase.ts
|
|
3702
|
+
function createAlexPluginBaseConfig(plugin2) {
|
|
3703
|
+
return [
|
|
3704
|
+
{
|
|
3705
|
+
plugins: {
|
|
3706
|
+
"@alextheman": plugin2
|
|
3707
|
+
},
|
|
3708
|
+
rules: {
|
|
3709
|
+
"@alextheman/no-namespace-imports": warnOnFixButErrorOnLint_default,
|
|
3710
|
+
"@alextheman/no-relative-imports": warnOnFixButErrorOnLint_default
|
|
3711
|
+
}
|
|
3712
|
+
}
|
|
3713
|
+
];
|
|
3714
|
+
}
|
|
3715
|
+
var alexPluginBase_default = createAlexPluginBaseConfig;
|
|
3716
|
+
|
|
3717
|
+
// src/configs/typeScriptBase.ts
|
|
3698
3718
|
var import_js = __toESM(require_src(), 1);
|
|
3699
3719
|
var import_globals = __toESM(require_globals2(), 1);
|
|
3700
3720
|
import eslintPlugin from "@typescript-eslint/eslint-plugin";
|
|
@@ -3704,15 +3724,14 @@ import importPlugin from "eslint-plugin-import";
|
|
|
3704
3724
|
import perfectionist from "eslint-plugin-perfectionist";
|
|
3705
3725
|
import prettierPlugin from "eslint-plugin-prettier";
|
|
3706
3726
|
|
|
3707
|
-
// src/configs/
|
|
3727
|
+
// src/configs/prettierRules.ts
|
|
3708
3728
|
var prettierRules = {
|
|
3709
3729
|
printWidth: 100
|
|
3710
3730
|
};
|
|
3711
|
-
var
|
|
3731
|
+
var prettierRules_default = prettierRules;
|
|
3712
3732
|
|
|
3713
|
-
// src/configs/
|
|
3714
|
-
var
|
|
3715
|
-
var esLintConfigTypeScriptBase = [
|
|
3733
|
+
// src/configs/typeScriptBase.ts
|
|
3734
|
+
var typeScriptBase = [
|
|
3716
3735
|
import_js.default.configs.recommended,
|
|
3717
3736
|
prettierConfig,
|
|
3718
3737
|
{
|
|
@@ -3740,11 +3759,11 @@ var esLintConfigTypeScriptBase = [
|
|
|
3740
3759
|
perfectionist
|
|
3741
3760
|
},
|
|
3742
3761
|
rules: {
|
|
3743
|
-
"import/no-unresolved":
|
|
3744
|
-
eqeqeq:
|
|
3745
|
-
"no-console": [
|
|
3762
|
+
"import/no-unresolved": warnOnFixButErrorOnLint_default,
|
|
3763
|
+
eqeqeq: warnOnFixButErrorOnLint_default,
|
|
3764
|
+
"no-console": [warnOnFixButErrorOnLint_default, { allow: ["warn", "error"] }],
|
|
3746
3765
|
"no-restricted-imports": [
|
|
3747
|
-
|
|
3766
|
+
warnOnFixButErrorOnLint_default,
|
|
3748
3767
|
{
|
|
3749
3768
|
patterns: [
|
|
3750
3769
|
{
|
|
@@ -3755,7 +3774,7 @@ var esLintConfigTypeScriptBase = [
|
|
|
3755
3774
|
}
|
|
3756
3775
|
],
|
|
3757
3776
|
"perfectionist/sort-imports": [
|
|
3758
|
-
|
|
3777
|
+
warnOnFixButErrorOnLint_default,
|
|
3759
3778
|
{
|
|
3760
3779
|
type: "alphabetical",
|
|
3761
3780
|
order: "asc",
|
|
@@ -3769,7 +3788,7 @@ var esLintConfigTypeScriptBase = [
|
|
|
3769
3788
|
}
|
|
3770
3789
|
],
|
|
3771
3790
|
"perfectionist/sort-exports": [
|
|
3772
|
-
|
|
3791
|
+
warnOnFixButErrorOnLint_default,
|
|
3773
3792
|
{
|
|
3774
3793
|
type: "alphabetical",
|
|
3775
3794
|
order: "asc",
|
|
@@ -3784,7 +3803,7 @@ var esLintConfigTypeScriptBase = [
|
|
|
3784
3803
|
}
|
|
3785
3804
|
],
|
|
3786
3805
|
"@typescript-eslint/no-unused-vars": [
|
|
3787
|
-
|
|
3806
|
+
warnOnFixButErrorOnLint_default,
|
|
3788
3807
|
{
|
|
3789
3808
|
argsIgnorePattern: "^_",
|
|
3790
3809
|
varsIgnorePattern: "^_",
|
|
@@ -3793,76 +3812,69 @@ var esLintConfigTypeScriptBase = [
|
|
|
3793
3812
|
],
|
|
3794
3813
|
// Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
|
|
3795
3814
|
"no-unused-vars": "off",
|
|
3796
|
-
"func-style": [
|
|
3797
|
-
"prefer-arrow-callback": [
|
|
3798
|
-
"arrow-body-style": [
|
|
3799
|
-
"no-param-reassign":
|
|
3800
|
-
"no-useless-rename":
|
|
3801
|
-
"sort-vars":
|
|
3802
|
-
"no-cond-assign":
|
|
3803
|
-
"no-undef":
|
|
3804
|
-
"@typescript-eslint/consistent-type-imports":
|
|
3805
|
-
"prettier/prettier": ["warn",
|
|
3815
|
+
"func-style": [warnOnFixButErrorOnLint_default, "declaration", { allowArrowFunctions: false }],
|
|
3816
|
+
"prefer-arrow-callback": [warnOnFixButErrorOnLint_default, { allowNamedFunctions: false }],
|
|
3817
|
+
"arrow-body-style": [warnOnFixButErrorOnLint_default, "always"],
|
|
3818
|
+
"no-param-reassign": warnOnFixButErrorOnLint_default,
|
|
3819
|
+
"no-useless-rename": warnOnFixButErrorOnLint_default,
|
|
3820
|
+
"sort-vars": warnOnFixButErrorOnLint_default,
|
|
3821
|
+
"no-cond-assign": warnOnFixButErrorOnLint_default,
|
|
3822
|
+
"no-undef": warnOnFixButErrorOnLint_default,
|
|
3823
|
+
"@typescript-eslint/consistent-type-imports": warnOnFixButErrorOnLint_default,
|
|
3824
|
+
"prettier/prettier": ["warn", prettierRules_default]
|
|
3806
3825
|
}
|
|
3807
3826
|
}
|
|
3808
3827
|
];
|
|
3809
|
-
var
|
|
3828
|
+
var typeScriptBase_default = typeScriptBase;
|
|
3810
3829
|
|
|
3811
|
-
// src/configs/
|
|
3830
|
+
// src/configs/alexTypeScriptBase.ts
|
|
3812
3831
|
function createAlexTypeScriptBaseConfig(plugin2) {
|
|
3813
|
-
return [
|
|
3814
|
-
...eslint_config_typescript_base_default,
|
|
3815
|
-
{
|
|
3816
|
-
plugins: {
|
|
3817
|
-
"@alextheman": plugin2
|
|
3818
|
-
},
|
|
3819
|
-
rules: {
|
|
3820
|
-
"@alextheman/no-namespace-imports": warnOnFixButErrorOnLint,
|
|
3821
|
-
"@alextheman/no-relative-imports": warnOnFixButErrorOnLint
|
|
3822
|
-
}
|
|
3823
|
-
}
|
|
3824
|
-
];
|
|
3832
|
+
return [...alexPluginBase_default(plugin2), ...typeScriptBase_default];
|
|
3825
3833
|
}
|
|
3826
|
-
var
|
|
3834
|
+
var alexTypeScriptBase_default = createAlexTypeScriptBaseConfig;
|
|
3827
3835
|
|
|
3828
|
-
// src/configs/
|
|
3836
|
+
// src/configs/typeScriptReactBase.ts
|
|
3829
3837
|
var import_globals2 = __toESM(require_globals2(), 1);
|
|
3830
3838
|
import reactPlugin from "eslint-plugin-react";
|
|
3831
3839
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
3832
3840
|
import reactRefresh from "eslint-plugin-react-refresh";
|
|
3841
|
+
var typeScriptReactBase = [
|
|
3842
|
+
...typeScriptBase_default,
|
|
3843
|
+
{
|
|
3844
|
+
name: "@alextheman/eslint-config-typescript-react-base",
|
|
3845
|
+
languageOptions: {
|
|
3846
|
+
ecmaVersion: 2020,
|
|
3847
|
+
globals: import_globals2.default.browser
|
|
3848
|
+
},
|
|
3849
|
+
plugins: {
|
|
3850
|
+
"react-hooks": reactHooks,
|
|
3851
|
+
"react-refresh": reactRefresh,
|
|
3852
|
+
react: reactPlugin
|
|
3853
|
+
},
|
|
3854
|
+
rules: __spreadProps(__spreadValues({}, reactHooks.configs.recommended.rules), {
|
|
3855
|
+
"react-refresh/only-export-components": "off",
|
|
3856
|
+
"react-hooks/exhaustive-deps": "off",
|
|
3857
|
+
"no-restricted-imports": [
|
|
3858
|
+
warnOnFixButErrorOnLint_default,
|
|
3859
|
+
{
|
|
3860
|
+
paths: [
|
|
3861
|
+
{
|
|
3862
|
+
name: "@mui/material",
|
|
3863
|
+
message: 'Please use `import Component from "@mui/material/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
|
|
3864
|
+
}
|
|
3865
|
+
]
|
|
3866
|
+
}
|
|
3867
|
+
]
|
|
3868
|
+
})
|
|
3869
|
+
}
|
|
3870
|
+
];
|
|
3871
|
+
var typeScriptReactBase_default = typeScriptReactBase;
|
|
3872
|
+
|
|
3873
|
+
// src/configs/alexTypeScriptReactBase.ts
|
|
3833
3874
|
function createAlexTypeScriptReactBaseConfig(plugin2) {
|
|
3834
|
-
return [
|
|
3835
|
-
...alex_typescript_base_default(plugin2),
|
|
3836
|
-
{
|
|
3837
|
-
name: "@alextheman/eslint-config-typescript-react-base",
|
|
3838
|
-
languageOptions: {
|
|
3839
|
-
ecmaVersion: 2020,
|
|
3840
|
-
globals: import_globals2.default.browser
|
|
3841
|
-
},
|
|
3842
|
-
plugins: {
|
|
3843
|
-
"react-hooks": reactHooks,
|
|
3844
|
-
"react-refresh": reactRefresh,
|
|
3845
|
-
react: reactPlugin
|
|
3846
|
-
},
|
|
3847
|
-
rules: __spreadProps(__spreadValues({}, reactHooks.configs.recommended.rules), {
|
|
3848
|
-
"react-refresh/only-export-components": "off",
|
|
3849
|
-
"react-hooks/exhaustive-deps": "off",
|
|
3850
|
-
"no-restricted-imports": [
|
|
3851
|
-
warnOnFixButErrorOnLint,
|
|
3852
|
-
{
|
|
3853
|
-
paths: [
|
|
3854
|
-
{
|
|
3855
|
-
name: "@mui/material",
|
|
3856
|
-
message: 'Please use `import Component from "@mui/material/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
|
|
3857
|
-
}
|
|
3858
|
-
]
|
|
3859
|
-
}
|
|
3860
|
-
]
|
|
3861
|
-
})
|
|
3862
|
-
}
|
|
3863
|
-
];
|
|
3875
|
+
return [...alexTypeScriptBase_default(plugin2), ...typeScriptReactBase_default];
|
|
3864
3876
|
}
|
|
3865
|
-
var
|
|
3877
|
+
var alexTypeScriptReactBase_default = createAlexTypeScriptReactBaseConfig;
|
|
3866
3878
|
|
|
3867
3879
|
// src/create-rule.ts
|
|
3868
3880
|
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
@@ -4037,18 +4049,24 @@ var plugin = {
|
|
|
4037
4049
|
namespace: "alextheman"
|
|
4038
4050
|
},
|
|
4039
4051
|
configs: {
|
|
4052
|
+
alexPluginBase: [],
|
|
4040
4053
|
alexTypeScriptBase: [],
|
|
4041
|
-
alexTypeScriptReactBase: []
|
|
4054
|
+
alexTypeScriptReactBase: [],
|
|
4055
|
+
typeScriptBase: [],
|
|
4056
|
+
typeScriptReactBase: []
|
|
4042
4057
|
},
|
|
4043
4058
|
rules: rules_default
|
|
4044
4059
|
};
|
|
4045
4060
|
plugin.configs = {
|
|
4046
|
-
|
|
4047
|
-
|
|
4061
|
+
alexPluginBase: alexPluginBase_default(plugin),
|
|
4062
|
+
alexTypeScriptBase: alexTypeScriptBase_default(plugin),
|
|
4063
|
+
alexTypeScriptReactBase: alexTypeScriptReactBase_default(plugin),
|
|
4064
|
+
typeScriptBase: typeScriptBase_default,
|
|
4065
|
+
typeScriptReactBase: typeScriptReactBase_default
|
|
4048
4066
|
};
|
|
4049
4067
|
var index_default = plugin;
|
|
4050
4068
|
export {
|
|
4051
4069
|
index_default as default,
|
|
4052
|
-
|
|
4053
|
-
warnOnFixButErrorOnLint
|
|
4070
|
+
prettierRules_default as prettierRules,
|
|
4071
|
+
warnOnFixButErrorOnLint_default as warnOnFixButErrorOnLint
|
|
4054
4072
|
};
|