@alextheman/eslint-plugin 1.2.0 → 1.2.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 +39 -32
- package/dist/index.d.cts +15 -2
- package/dist/index.d.ts +15 -2
- package/dist/index.js +39 -32
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3705,7 +3705,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
3705
3705
|
|
|
3706
3706
|
// package.json
|
|
3707
3707
|
var name = "@alextheman/eslint-plugin";
|
|
3708
|
-
var version = "1.2.
|
|
3708
|
+
var version = "1.2.2";
|
|
3709
3709
|
|
|
3710
3710
|
// src/create-rule.ts
|
|
3711
3711
|
var import_utils = require("@typescript-eslint/utils");
|
|
@@ -3876,12 +3876,6 @@ var eslint_config_default = [
|
|
|
3876
3876
|
"no-restricted-imports": [
|
|
3877
3877
|
warnOnFixButErrorOnLint,
|
|
3878
3878
|
{
|
|
3879
|
-
paths: [
|
|
3880
|
-
{
|
|
3881
|
-
name: "@mui/material",
|
|
3882
|
-
message: 'Please use `import Component from "@mui/material/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
|
|
3883
|
-
}
|
|
3884
|
-
],
|
|
3885
3879
|
patterns: [
|
|
3886
3880
|
{
|
|
3887
3881
|
group: ["./", "../"],
|
|
@@ -3922,7 +3916,7 @@ var plugin = {
|
|
|
3922
3916
|
version,
|
|
3923
3917
|
namespace: "alextheman"
|
|
3924
3918
|
},
|
|
3925
|
-
configs: { alexTypeScriptBase: [] },
|
|
3919
|
+
configs: { alexTypeScriptBase: [], alexTypeScriptReactBase: [] },
|
|
3926
3920
|
rules: rules_default
|
|
3927
3921
|
};
|
|
3928
3922
|
Object.assign(plugin.configs, {
|
|
@@ -3933,34 +3927,47 @@ Object.assign(plugin.configs, {
|
|
|
3933
3927
|
"@alextheman": plugin
|
|
3934
3928
|
},
|
|
3935
3929
|
rules: {
|
|
3930
|
+
/* In this plugin's config, no-restricted-imports checks checks for relative imports and errors if they're found.
|
|
3931
|
+
In practice, though, this is something that would be caught by my custom linting rule, so no-restricted-imports can be disabled here
|
|
3932
|
+
in favour of @alextheman/no-relative-imports. */
|
|
3933
|
+
"no-restricted-imports": "off",
|
|
3936
3934
|
"@alextheman/no-namespace-imports": "error",
|
|
3937
3935
|
"@alextheman/no-relative-imports": "error"
|
|
3938
3936
|
}
|
|
3939
3937
|
}
|
|
3940
3938
|
]
|
|
3941
3939
|
});
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
"
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3940
|
+
plugin.configs.alexTypeScriptReactBase = [
|
|
3941
|
+
...plugin.configs.alexTypeScriptBase,
|
|
3942
|
+
{
|
|
3943
|
+
name: "@alextheman/eslint-config-typescript-react-base",
|
|
3944
|
+
languageOptions: {
|
|
3945
|
+
ecmaVersion: 2020,
|
|
3946
|
+
globals: import_globals2.default.browser
|
|
3947
|
+
},
|
|
3948
|
+
plugins: {
|
|
3949
|
+
"react-hooks": import_eslint_plugin_react_hooks.default,
|
|
3950
|
+
"react-refresh": import_eslint_plugin_react_refresh.default,
|
|
3951
|
+
react: import_eslint_plugin_react.default
|
|
3952
|
+
},
|
|
3953
|
+
rules: __spreadProps(__spreadValues({}, import_eslint_plugin_react_hooks.default.configs.recommended.rules), {
|
|
3954
|
+
"react-refresh/only-export-components": [
|
|
3955
|
+
"warn",
|
|
3956
|
+
{ allowConstantExport: true }
|
|
3957
|
+
],
|
|
3958
|
+
"react-hooks/exhaustive-deps": "off",
|
|
3959
|
+
"no-restricted-imports": [
|
|
3960
|
+
warnOnFixButErrorOnLint,
|
|
3961
|
+
{
|
|
3962
|
+
paths: [
|
|
3963
|
+
{
|
|
3964
|
+
name: "@mui/material",
|
|
3965
|
+
message: 'Please use `import Component from "@mui/material/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
|
|
3966
|
+
}
|
|
3967
|
+
]
|
|
3968
|
+
}
|
|
3969
|
+
]
|
|
3970
|
+
})
|
|
3971
|
+
}
|
|
3972
|
+
];
|
|
3966
3973
|
var index_default = plugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
2
|
|
|
3
|
+
var name = "@alextheman/eslint-plugin";
|
|
4
|
+
var version = "1.2.2";
|
|
5
|
+
|
|
6
|
+
interface AlexPlugin {
|
|
7
|
+
meta: {
|
|
8
|
+
name: typeof name;
|
|
9
|
+
version: typeof version;
|
|
10
|
+
namespace: "alextheman";
|
|
11
|
+
};
|
|
12
|
+
configs: Record<string, any>;
|
|
13
|
+
rules: Record<string, any>;
|
|
14
|
+
}
|
|
3
15
|
declare const plugin: {
|
|
4
16
|
meta: {
|
|
5
17
|
name: string;
|
|
6
18
|
version: string;
|
|
7
|
-
namespace:
|
|
19
|
+
namespace: "alextheman";
|
|
8
20
|
};
|
|
9
21
|
configs: {
|
|
10
22
|
alexTypeScriptBase: never[];
|
|
23
|
+
alexTypeScriptReactBase: never[];
|
|
11
24
|
};
|
|
12
25
|
rules: {
|
|
13
26
|
"no-namespace-imports": _typescript_eslint_utils_ts_eslint.RuleModule<"message", [{
|
|
@@ -17,4 +30,4 @@ declare const plugin: {
|
|
|
17
30
|
};
|
|
18
31
|
};
|
|
19
32
|
|
|
20
|
-
export { plugin as default };
|
|
33
|
+
export { type AlexPlugin, plugin as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
2
|
|
|
3
|
+
var name = "@alextheman/eslint-plugin";
|
|
4
|
+
var version = "1.2.2";
|
|
5
|
+
|
|
6
|
+
interface AlexPlugin {
|
|
7
|
+
meta: {
|
|
8
|
+
name: typeof name;
|
|
9
|
+
version: typeof version;
|
|
10
|
+
namespace: "alextheman";
|
|
11
|
+
};
|
|
12
|
+
configs: Record<string, any>;
|
|
13
|
+
rules: Record<string, any>;
|
|
14
|
+
}
|
|
3
15
|
declare const plugin: {
|
|
4
16
|
meta: {
|
|
5
17
|
name: string;
|
|
6
18
|
version: string;
|
|
7
|
-
namespace:
|
|
19
|
+
namespace: "alextheman";
|
|
8
20
|
};
|
|
9
21
|
configs: {
|
|
10
22
|
alexTypeScriptBase: never[];
|
|
23
|
+
alexTypeScriptReactBase: never[];
|
|
11
24
|
};
|
|
12
25
|
rules: {
|
|
13
26
|
"no-namespace-imports": _typescript_eslint_utils_ts_eslint.RuleModule<"message", [{
|
|
@@ -17,4 +30,4 @@ declare const plugin: {
|
|
|
17
30
|
};
|
|
18
31
|
};
|
|
19
32
|
|
|
20
|
-
export { plugin as default };
|
|
33
|
+
export { type AlexPlugin, plugin as default };
|
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.
|
|
3695
|
+
var version = "1.2.2";
|
|
3696
3696
|
|
|
3697
3697
|
// src/create-rule.ts
|
|
3698
3698
|
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
@@ -3863,12 +3863,6 @@ var eslint_config_default = [
|
|
|
3863
3863
|
"no-restricted-imports": [
|
|
3864
3864
|
warnOnFixButErrorOnLint,
|
|
3865
3865
|
{
|
|
3866
|
-
paths: [
|
|
3867
|
-
{
|
|
3868
|
-
name: "@mui/material",
|
|
3869
|
-
message: 'Please use `import Component from "@mui/material/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
|
|
3870
|
-
}
|
|
3871
|
-
],
|
|
3872
3866
|
patterns: [
|
|
3873
3867
|
{
|
|
3874
3868
|
group: ["./", "../"],
|
|
@@ -3909,7 +3903,7 @@ var plugin = {
|
|
|
3909
3903
|
version,
|
|
3910
3904
|
namespace: "alextheman"
|
|
3911
3905
|
},
|
|
3912
|
-
configs: { alexTypeScriptBase: [] },
|
|
3906
|
+
configs: { alexTypeScriptBase: [], alexTypeScriptReactBase: [] },
|
|
3913
3907
|
rules: rules_default
|
|
3914
3908
|
};
|
|
3915
3909
|
Object.assign(plugin.configs, {
|
|
@@ -3920,36 +3914,49 @@ Object.assign(plugin.configs, {
|
|
|
3920
3914
|
"@alextheman": plugin
|
|
3921
3915
|
},
|
|
3922
3916
|
rules: {
|
|
3917
|
+
/* In this plugin's config, no-restricted-imports checks checks for relative imports and errors if they're found.
|
|
3918
|
+
In practice, though, this is something that would be caught by my custom linting rule, so no-restricted-imports can be disabled here
|
|
3919
|
+
in favour of @alextheman/no-relative-imports. */
|
|
3920
|
+
"no-restricted-imports": "off",
|
|
3923
3921
|
"@alextheman/no-namespace-imports": "error",
|
|
3924
3922
|
"@alextheman/no-relative-imports": "error"
|
|
3925
3923
|
}
|
|
3926
3924
|
}
|
|
3927
3925
|
]
|
|
3928
3926
|
});
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
"
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3927
|
+
plugin.configs.alexTypeScriptReactBase = [
|
|
3928
|
+
...plugin.configs.alexTypeScriptBase,
|
|
3929
|
+
{
|
|
3930
|
+
name: "@alextheman/eslint-config-typescript-react-base",
|
|
3931
|
+
languageOptions: {
|
|
3932
|
+
ecmaVersion: 2020,
|
|
3933
|
+
globals: import_globals2.default.browser
|
|
3934
|
+
},
|
|
3935
|
+
plugins: {
|
|
3936
|
+
"react-hooks": reactHooks,
|
|
3937
|
+
"react-refresh": reactRefresh,
|
|
3938
|
+
react: reactPlugin
|
|
3939
|
+
},
|
|
3940
|
+
rules: __spreadProps(__spreadValues({}, reactHooks.configs.recommended.rules), {
|
|
3941
|
+
"react-refresh/only-export-components": [
|
|
3942
|
+
"warn",
|
|
3943
|
+
{ allowConstantExport: true }
|
|
3944
|
+
],
|
|
3945
|
+
"react-hooks/exhaustive-deps": "off",
|
|
3946
|
+
"no-restricted-imports": [
|
|
3947
|
+
warnOnFixButErrorOnLint,
|
|
3948
|
+
{
|
|
3949
|
+
paths: [
|
|
3950
|
+
{
|
|
3951
|
+
name: "@mui/material",
|
|
3952
|
+
message: 'Please use `import Component from "@mui/material/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
|
|
3953
|
+
}
|
|
3954
|
+
]
|
|
3955
|
+
}
|
|
3956
|
+
]
|
|
3957
|
+
})
|
|
3958
|
+
}
|
|
3959
|
+
];
|
|
3953
3960
|
var index_default = plugin;
|
|
3954
3961
|
export {
|
|
3955
3962
|
index_default as default
|