@alextheman/eslint-plugin 4.0.1 → 4.1.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 +31 -12
- package/dist/index.d.cts +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +28 -11
- package/package.json +5 -2
package/dist/index.cjs
CHANGED
|
@@ -3752,6 +3752,7 @@ var require_src = __commonJS({
|
|
|
3752
3752
|
var index_exports = {};
|
|
3753
3753
|
__export(index_exports, {
|
|
3754
3754
|
checkCallExpression: () => checkCallExpression_default,
|
|
3755
|
+
createRuleSchemaFromZodSchema: () => createRuleSchemaFromZodSchema_default,
|
|
3755
3756
|
default: () => index_default,
|
|
3756
3757
|
fixOnCondition: () => fixOnCondition_default,
|
|
3757
3758
|
getImportSpecifiersAfterRemoving: () => getImportSpecifiersAfterRemoving_default,
|
|
@@ -3765,13 +3766,14 @@ __export(index_exports, {
|
|
|
3765
3766
|
reactLanguageOptions: () => reactLanguageOptions_default,
|
|
3766
3767
|
sortObjects: () => sortObjects_default,
|
|
3767
3768
|
typeScriptLanguageOptions: () => typeScriptLanguageOptions_default,
|
|
3768
|
-
unusedVarsIgnorePatterns: () => unusedVarsIgnorePatterns_default
|
|
3769
|
+
unusedVarsIgnorePatterns: () => unusedVarsIgnorePatterns_default,
|
|
3770
|
+
vitestConfig: () => vitestConfig_default
|
|
3769
3771
|
});
|
|
3770
3772
|
module.exports = __toCommonJS(index_exports);
|
|
3771
3773
|
|
|
3772
3774
|
// package.json
|
|
3773
3775
|
var name = "@alextheman/eslint-plugin";
|
|
3774
|
-
var version = "4.0
|
|
3776
|
+
var version = "4.1.0";
|
|
3775
3777
|
|
|
3776
3778
|
// src/configs/personal/testsBase.ts
|
|
3777
3779
|
var import_globals = __toESM(require_globals2(), 1);
|
|
@@ -4526,13 +4528,13 @@ function fixOnCondition(fixable, fix) {
|
|
|
4526
4528
|
}
|
|
4527
4529
|
var fixOnCondition_default = fixOnCondition;
|
|
4528
4530
|
|
|
4529
|
-
// src/utility/
|
|
4531
|
+
// src/utility/createRuleSchemaFromZodSchema.ts
|
|
4530
4532
|
var import_utility4 = require("@alextheman/utility");
|
|
4531
4533
|
var import_zod = __toESM(require("zod"), 1);
|
|
4532
|
-
function
|
|
4534
|
+
function createRuleSchemaFromZodSchema(schema5) {
|
|
4533
4535
|
return [(0, import_utility4.omitProperties)(import_zod.default.toJSONSchema(schema5), "$schema")];
|
|
4534
4536
|
}
|
|
4535
|
-
var
|
|
4537
|
+
var createRuleSchemaFromZodSchema_default = createRuleSchemaFromZodSchema;
|
|
4536
4538
|
|
|
4537
4539
|
// src/utility/getImportSpecifiersAfterRemoving.ts
|
|
4538
4540
|
function getImportSpecifiersAfterRemoving(context, specifiers, importToRemove) {
|
|
@@ -4568,7 +4570,7 @@ var consistentTestFunction = createRule_default({
|
|
|
4568
4570
|
},
|
|
4569
4571
|
type: "suggestion",
|
|
4570
4572
|
fixable: "code",
|
|
4571
|
-
schema:
|
|
4573
|
+
schema: createRuleSchemaFromZodSchema_default(consistentTestFunctionOptionsSchema)
|
|
4572
4574
|
},
|
|
4573
4575
|
defaultOptions: [defaultOptions],
|
|
4574
4576
|
create(context) {
|
|
@@ -4725,7 +4727,7 @@ var noNamespaceImportsOptionsSchema = import_zod3.default.object({
|
|
|
4725
4727
|
function parseNoNamespaceImportsOptions(data) {
|
|
4726
4728
|
return noNamespaceImportsOptionsSchema.parse(data);
|
|
4727
4729
|
}
|
|
4728
|
-
var schema =
|
|
4730
|
+
var schema = createRuleSchemaFromZodSchema_default(noNamespaceImportsOptionsSchema);
|
|
4729
4731
|
var noNamespaceImports = createRule_default({
|
|
4730
4732
|
name: "no-namespace-imports",
|
|
4731
4733
|
meta: {
|
|
@@ -4806,7 +4808,7 @@ var noRelativeImportsOptionsSchema = import_zod4.default.object({
|
|
|
4806
4808
|
function parseNoRelativeImportsOptions(data) {
|
|
4807
4809
|
return noRelativeImportsOptionsSchema.parse(data);
|
|
4808
4810
|
}
|
|
4809
|
-
var schema2 =
|
|
4811
|
+
var schema2 = createRuleSchemaFromZodSchema_default(noRelativeImportsOptionsSchema);
|
|
4810
4812
|
var noRelativeImports = createRule_default({
|
|
4811
4813
|
name: "no-relative-imports",
|
|
4812
4814
|
meta: {
|
|
@@ -4933,7 +4935,7 @@ var standardiseErrorMessagesOptionsSchema = import_zod5.default.object({
|
|
|
4933
4935
|
function parseStandardiseErrorMessagesOptions(data) {
|
|
4934
4936
|
return standardiseErrorMessagesOptionsSchema.parse(data);
|
|
4935
4937
|
}
|
|
4936
|
-
var schema3 =
|
|
4938
|
+
var schema3 = createRuleSchemaFromZodSchema_default(standardiseErrorMessagesOptionsSchema);
|
|
4937
4939
|
var defaultErrorRegex = "^[A-Z]+(?:_[A-Z]+)*$";
|
|
4938
4940
|
function checkCurrentNode(context, node) {
|
|
4939
4941
|
var _a;
|
|
@@ -4990,7 +4992,7 @@ var useNormalizedImportsOptionsSchema = import_zod6.default.object({
|
|
|
4990
4992
|
function parseUseNormalizedImportsOptions(data) {
|
|
4991
4993
|
return useNormalizedImportsOptionsSchema.parse(data);
|
|
4992
4994
|
}
|
|
4993
|
-
var schema4 =
|
|
4995
|
+
var schema4 = createRuleSchemaFromZodSchema_default(useNormalizedImportsOptionsSchema);
|
|
4994
4996
|
var useNormalizedImports = createRule_default({
|
|
4995
4997
|
name: "use-normalized-imports",
|
|
4996
4998
|
meta: {
|
|
@@ -5053,7 +5055,7 @@ var useObjectShorthand = createRule_default({
|
|
|
5053
5055
|
},
|
|
5054
5056
|
type: "suggestion",
|
|
5055
5057
|
fixable: "code",
|
|
5056
|
-
schema:
|
|
5058
|
+
schema: createRuleSchemaFromZodSchema_default(useObjectShorthandOptionsSchema)
|
|
5057
5059
|
},
|
|
5058
5060
|
defaultOptions: [{ fixable: true }],
|
|
5059
5061
|
create(context) {
|
|
@@ -5108,11 +5110,27 @@ var alexPlugin = {
|
|
|
5108
5110
|
alexPlugin.configs = configs_default(alexPlugin);
|
|
5109
5111
|
var alexPlugin_default = alexPlugin;
|
|
5110
5112
|
|
|
5113
|
+
// src/configs/helpers/vitestConfig.ts
|
|
5114
|
+
var import_vite_tsconfig_paths = __toESM(require("vite-tsconfig-paths"), 1);
|
|
5115
|
+
var import_config = require("vitest/config");
|
|
5116
|
+
function vitestConfig(environment = "jsdom") {
|
|
5117
|
+
return (0, import_config.defineConfig)({
|
|
5118
|
+
plugins: [(0, import_vite_tsconfig_paths.default)()],
|
|
5119
|
+
test: {
|
|
5120
|
+
environment,
|
|
5121
|
+
globals: true,
|
|
5122
|
+
include: ["**/tests/**/*.test.ts"]
|
|
5123
|
+
}
|
|
5124
|
+
});
|
|
5125
|
+
}
|
|
5126
|
+
var vitestConfig_default = vitestConfig;
|
|
5127
|
+
|
|
5111
5128
|
// src/index.ts
|
|
5112
5129
|
var index_default = alexPlugin_default;
|
|
5113
5130
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5114
5131
|
0 && (module.exports = {
|
|
5115
5132
|
checkCallExpression,
|
|
5133
|
+
createRuleSchemaFromZodSchema,
|
|
5116
5134
|
fixOnCondition,
|
|
5117
5135
|
getImportSpecifiersAfterRemoving,
|
|
5118
5136
|
parseConsistentTestFunctionOptions,
|
|
@@ -5125,5 +5143,6 @@ var index_default = alexPlugin_default;
|
|
|
5125
5143
|
reactLanguageOptions,
|
|
5126
5144
|
sortObjects,
|
|
5127
5145
|
typeScriptLanguageOptions,
|
|
5128
|
-
unusedVarsIgnorePatterns
|
|
5146
|
+
unusedVarsIgnorePatterns,
|
|
5147
|
+
vitestConfig
|
|
5129
5148
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { Linter } from 'eslint';
|
|
2
2
|
import { IgnoreCase } from '@alextheman/utility';
|
|
3
3
|
import { Config } from 'prettier';
|
|
4
|
+
import * as vite from 'vite';
|
|
5
|
+
import { VitestEnvironment } from 'vitest/node';
|
|
4
6
|
import z from 'zod';
|
|
5
7
|
import { RuleFixer, RuleFix, RuleContext } from '@typescript-eslint/utils/ts-eslint';
|
|
6
8
|
import { TSESTree } from '@typescript-eslint/utils';
|
|
9
|
+
import { JSONSchema4 } from '@typescript-eslint/utils/json-schema';
|
|
7
10
|
|
|
8
11
|
var name = "@alextheman/eslint-plugin";
|
|
9
|
-
var version = "4.0
|
|
12
|
+
var version = "4.1.0";
|
|
10
13
|
|
|
11
14
|
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;
|
|
12
15
|
|
|
@@ -70,6 +73,8 @@ declare const unusedVarsIgnorePatterns: {
|
|
|
70
73
|
varsIgnorePattern: string;
|
|
71
74
|
};
|
|
72
75
|
|
|
76
|
+
declare function vitestConfig(environment?: VitestEnvironment): vite.UserConfig;
|
|
77
|
+
|
|
73
78
|
declare const validTestFunctionsSchema: z.ZodEnum<{
|
|
74
79
|
test: "test";
|
|
75
80
|
it: "it";
|
|
@@ -117,10 +122,12 @@ declare function parseUseNormalizedImportsOptions(data: unknown): {
|
|
|
117
122
|
|
|
118
123
|
declare function checkCallExpression(node: TSESTree.CallExpression, objectName: string, propertyName: string): boolean;
|
|
119
124
|
|
|
125
|
+
declare function createRuleSchemaFromZodSchema(schema: z.ZodType): JSONSchema4[];
|
|
126
|
+
|
|
120
127
|
declare function getImportSpecifiersAfterRemoving(context: Readonly<RuleContext<"message", [
|
|
121
128
|
{
|
|
122
129
|
preference: string;
|
|
123
130
|
}
|
|
124
131
|
]>>, specifiers: TSESTree.ImportClause[], importToRemove: string): string;
|
|
125
132
|
|
|
126
|
-
export { type AlexPlugin, type AlexPluginConfigGroup, type CombinedConfig, type ConfigGroupName, type ConfigKey, type ConsistentTestFunctionOptions, type GeneralConfig, type NoNamespaceImportsOptions, type NoRelativeImportsOptions, type PersonalConfig, type PluginConfig, type RuleFixerFunction, type StandardiseErrorMessagesOptions, type TestFunction, type UseNormalizedImportsOptions, checkCallExpression, alexPlugin as default, fixOnCondition, getImportSpecifiersAfterRemoving, parseConsistentTestFunctionOptions, parseNoNamespaceImportsOptions, parseNoRelativeImportsOptions, parseStandardiseErrorMessagesOptions, parseTestFunction, parseUseNormalizedImportsOptions, prettierRules, reactLanguageOptions, sortObjects, typeScriptLanguageOptions, unusedVarsIgnorePatterns };
|
|
133
|
+
export { type AlexPlugin, type AlexPluginConfigGroup, type CombinedConfig, type ConfigGroupName, type ConfigKey, type ConsistentTestFunctionOptions, type GeneralConfig, type NoNamespaceImportsOptions, type NoRelativeImportsOptions, type PersonalConfig, type PluginConfig, type RuleFixerFunction, type StandardiseErrorMessagesOptions, type TestFunction, type UseNormalizedImportsOptions, checkCallExpression, createRuleSchemaFromZodSchema, alexPlugin as default, fixOnCondition, getImportSpecifiersAfterRemoving, parseConsistentTestFunctionOptions, parseNoNamespaceImportsOptions, parseNoRelativeImportsOptions, parseStandardiseErrorMessagesOptions, parseTestFunction, parseUseNormalizedImportsOptions, prettierRules, reactLanguageOptions, sortObjects, typeScriptLanguageOptions, unusedVarsIgnorePatterns, vitestConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { Linter } from 'eslint';
|
|
2
2
|
import { IgnoreCase } from '@alextheman/utility';
|
|
3
3
|
import { Config } from 'prettier';
|
|
4
|
+
import * as vite from 'vite';
|
|
5
|
+
import { VitestEnvironment } from 'vitest/node';
|
|
4
6
|
import z from 'zod';
|
|
5
7
|
import { RuleFixer, RuleFix, RuleContext } from '@typescript-eslint/utils/ts-eslint';
|
|
6
8
|
import { TSESTree } from '@typescript-eslint/utils';
|
|
9
|
+
import { JSONSchema4 } from '@typescript-eslint/utils/json-schema';
|
|
7
10
|
|
|
8
11
|
var name = "@alextheman/eslint-plugin";
|
|
9
|
-
var version = "4.0
|
|
12
|
+
var version = "4.1.0";
|
|
10
13
|
|
|
11
14
|
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;
|
|
12
15
|
|
|
@@ -70,6 +73,8 @@ declare const unusedVarsIgnorePatterns: {
|
|
|
70
73
|
varsIgnorePattern: string;
|
|
71
74
|
};
|
|
72
75
|
|
|
76
|
+
declare function vitestConfig(environment?: VitestEnvironment): vite.UserConfig;
|
|
77
|
+
|
|
73
78
|
declare const validTestFunctionsSchema: z.ZodEnum<{
|
|
74
79
|
test: "test";
|
|
75
80
|
it: "it";
|
|
@@ -117,10 +122,12 @@ declare function parseUseNormalizedImportsOptions(data: unknown): {
|
|
|
117
122
|
|
|
118
123
|
declare function checkCallExpression(node: TSESTree.CallExpression, objectName: string, propertyName: string): boolean;
|
|
119
124
|
|
|
125
|
+
declare function createRuleSchemaFromZodSchema(schema: z.ZodType): JSONSchema4[];
|
|
126
|
+
|
|
120
127
|
declare function getImportSpecifiersAfterRemoving(context: Readonly<RuleContext<"message", [
|
|
121
128
|
{
|
|
122
129
|
preference: string;
|
|
123
130
|
}
|
|
124
131
|
]>>, specifiers: TSESTree.ImportClause[], importToRemove: string): string;
|
|
125
132
|
|
|
126
|
-
export { type AlexPlugin, type AlexPluginConfigGroup, type CombinedConfig, type ConfigGroupName, type ConfigKey, type ConsistentTestFunctionOptions, type GeneralConfig, type NoNamespaceImportsOptions, type NoRelativeImportsOptions, type PersonalConfig, type PluginConfig, type RuleFixerFunction, type StandardiseErrorMessagesOptions, type TestFunction, type UseNormalizedImportsOptions, checkCallExpression, alexPlugin as default, fixOnCondition, getImportSpecifiersAfterRemoving, parseConsistentTestFunctionOptions, parseNoNamespaceImportsOptions, parseNoRelativeImportsOptions, parseStandardiseErrorMessagesOptions, parseTestFunction, parseUseNormalizedImportsOptions, prettierRules, reactLanguageOptions, sortObjects, typeScriptLanguageOptions, unusedVarsIgnorePatterns };
|
|
133
|
+
export { type AlexPlugin, type AlexPluginConfigGroup, type CombinedConfig, type ConfigGroupName, type ConfigKey, type ConsistentTestFunctionOptions, type GeneralConfig, type NoNamespaceImportsOptions, type NoRelativeImportsOptions, type PersonalConfig, type PluginConfig, type RuleFixerFunction, type StandardiseErrorMessagesOptions, type TestFunction, type UseNormalizedImportsOptions, checkCallExpression, createRuleSchemaFromZodSchema, alexPlugin as default, fixOnCondition, getImportSpecifiersAfterRemoving, parseConsistentTestFunctionOptions, parseNoNamespaceImportsOptions, parseNoRelativeImportsOptions, parseStandardiseErrorMessagesOptions, parseTestFunction, parseUseNormalizedImportsOptions, prettierRules, reactLanguageOptions, sortObjects, typeScriptLanguageOptions, unusedVarsIgnorePatterns, vitestConfig };
|
package/dist/index.js
CHANGED
|
@@ -3744,7 +3744,7 @@ var require_src = __commonJS({
|
|
|
3744
3744
|
|
|
3745
3745
|
// package.json
|
|
3746
3746
|
var name = "@alextheman/eslint-plugin";
|
|
3747
|
-
var version = "4.0
|
|
3747
|
+
var version = "4.1.0";
|
|
3748
3748
|
|
|
3749
3749
|
// src/configs/personal/testsBase.ts
|
|
3750
3750
|
var import_globals = __toESM(require_globals2(), 1);
|
|
@@ -4499,13 +4499,13 @@ function fixOnCondition(fixable, fix) {
|
|
|
4499
4499
|
}
|
|
4500
4500
|
var fixOnCondition_default = fixOnCondition;
|
|
4501
4501
|
|
|
4502
|
-
// src/utility/
|
|
4502
|
+
// src/utility/createRuleSchemaFromZodSchema.ts
|
|
4503
4503
|
import { omitProperties as omitProperties2 } from "@alextheman/utility";
|
|
4504
4504
|
import z from "zod";
|
|
4505
|
-
function
|
|
4505
|
+
function createRuleSchemaFromZodSchema(schema5) {
|
|
4506
4506
|
return [omitProperties2(z.toJSONSchema(schema5), "$schema")];
|
|
4507
4507
|
}
|
|
4508
|
-
var
|
|
4508
|
+
var createRuleSchemaFromZodSchema_default = createRuleSchemaFromZodSchema;
|
|
4509
4509
|
|
|
4510
4510
|
// src/utility/getImportSpecifiersAfterRemoving.ts
|
|
4511
4511
|
function getImportSpecifiersAfterRemoving(context, specifiers, importToRemove) {
|
|
@@ -4541,7 +4541,7 @@ var consistentTestFunction = createRule_default({
|
|
|
4541
4541
|
},
|
|
4542
4542
|
type: "suggestion",
|
|
4543
4543
|
fixable: "code",
|
|
4544
|
-
schema:
|
|
4544
|
+
schema: createRuleSchemaFromZodSchema_default(consistentTestFunctionOptionsSchema)
|
|
4545
4545
|
},
|
|
4546
4546
|
defaultOptions: [defaultOptions],
|
|
4547
4547
|
create(context) {
|
|
@@ -4698,7 +4698,7 @@ var noNamespaceImportsOptionsSchema = z3.object({
|
|
|
4698
4698
|
function parseNoNamespaceImportsOptions(data) {
|
|
4699
4699
|
return noNamespaceImportsOptionsSchema.parse(data);
|
|
4700
4700
|
}
|
|
4701
|
-
var schema =
|
|
4701
|
+
var schema = createRuleSchemaFromZodSchema_default(noNamespaceImportsOptionsSchema);
|
|
4702
4702
|
var noNamespaceImports = createRule_default({
|
|
4703
4703
|
name: "no-namespace-imports",
|
|
4704
4704
|
meta: {
|
|
@@ -4779,7 +4779,7 @@ var noRelativeImportsOptionsSchema = z4.object({
|
|
|
4779
4779
|
function parseNoRelativeImportsOptions(data) {
|
|
4780
4780
|
return noRelativeImportsOptionsSchema.parse(data);
|
|
4781
4781
|
}
|
|
4782
|
-
var schema2 =
|
|
4782
|
+
var schema2 = createRuleSchemaFromZodSchema_default(noRelativeImportsOptionsSchema);
|
|
4783
4783
|
var noRelativeImports = createRule_default({
|
|
4784
4784
|
name: "no-relative-imports",
|
|
4785
4785
|
meta: {
|
|
@@ -4906,7 +4906,7 @@ var standardiseErrorMessagesOptionsSchema = z5.object({
|
|
|
4906
4906
|
function parseStandardiseErrorMessagesOptions(data) {
|
|
4907
4907
|
return standardiseErrorMessagesOptionsSchema.parse(data);
|
|
4908
4908
|
}
|
|
4909
|
-
var schema3 =
|
|
4909
|
+
var schema3 = createRuleSchemaFromZodSchema_default(standardiseErrorMessagesOptionsSchema);
|
|
4910
4910
|
var defaultErrorRegex = "^[A-Z]+(?:_[A-Z]+)*$";
|
|
4911
4911
|
function checkCurrentNode(context, node) {
|
|
4912
4912
|
var _a;
|
|
@@ -4963,7 +4963,7 @@ var useNormalizedImportsOptionsSchema = z6.object({
|
|
|
4963
4963
|
function parseUseNormalizedImportsOptions(data) {
|
|
4964
4964
|
return useNormalizedImportsOptionsSchema.parse(data);
|
|
4965
4965
|
}
|
|
4966
|
-
var schema4 =
|
|
4966
|
+
var schema4 = createRuleSchemaFromZodSchema_default(useNormalizedImportsOptionsSchema);
|
|
4967
4967
|
var useNormalizedImports = createRule_default({
|
|
4968
4968
|
name: "use-normalized-imports",
|
|
4969
4969
|
meta: {
|
|
@@ -5026,7 +5026,7 @@ var useObjectShorthand = createRule_default({
|
|
|
5026
5026
|
},
|
|
5027
5027
|
type: "suggestion",
|
|
5028
5028
|
fixable: "code",
|
|
5029
|
-
schema:
|
|
5029
|
+
schema: createRuleSchemaFromZodSchema_default(useObjectShorthandOptionsSchema)
|
|
5030
5030
|
},
|
|
5031
5031
|
defaultOptions: [{ fixable: true }],
|
|
5032
5032
|
create(context) {
|
|
@@ -5081,10 +5081,26 @@ var alexPlugin = {
|
|
|
5081
5081
|
alexPlugin.configs = configs_default(alexPlugin);
|
|
5082
5082
|
var alexPlugin_default = alexPlugin;
|
|
5083
5083
|
|
|
5084
|
+
// src/configs/helpers/vitestConfig.ts
|
|
5085
|
+
import tsconfigPaths from "vite-tsconfig-paths";
|
|
5086
|
+
import { defineConfig } from "vitest/config";
|
|
5087
|
+
function vitestConfig(environment = "jsdom") {
|
|
5088
|
+
return defineConfig({
|
|
5089
|
+
plugins: [tsconfigPaths()],
|
|
5090
|
+
test: {
|
|
5091
|
+
environment,
|
|
5092
|
+
globals: true,
|
|
5093
|
+
include: ["**/tests/**/*.test.ts"]
|
|
5094
|
+
}
|
|
5095
|
+
});
|
|
5096
|
+
}
|
|
5097
|
+
var vitestConfig_default = vitestConfig;
|
|
5098
|
+
|
|
5084
5099
|
// src/index.ts
|
|
5085
5100
|
var index_default = alexPlugin_default;
|
|
5086
5101
|
export {
|
|
5087
5102
|
checkCallExpression_default as checkCallExpression,
|
|
5103
|
+
createRuleSchemaFromZodSchema_default as createRuleSchemaFromZodSchema,
|
|
5088
5104
|
index_default as default,
|
|
5089
5105
|
fixOnCondition_default as fixOnCondition,
|
|
5090
5106
|
getImportSpecifiersAfterRemoving_default as getImportSpecifiersAfterRemoving,
|
|
@@ -5098,5 +5114,6 @@ export {
|
|
|
5098
5114
|
reactLanguageOptions_default as reactLanguageOptions,
|
|
5099
5115
|
sortObjects_default as sortObjects,
|
|
5100
5116
|
typeScriptLanguageOptions_default as typeScriptLanguageOptions,
|
|
5101
|
-
unusedVarsIgnorePatterns_default as unusedVarsIgnorePatterns
|
|
5117
|
+
unusedVarsIgnorePatterns_default as unusedVarsIgnorePatterns,
|
|
5118
|
+
vitestConfig_default as vitestConfig
|
|
5102
5119
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alextheman/eslint-plugin",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "A package to provide custom ESLint rules and configs",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
65
65
|
"globals": "^16.5.0",
|
|
66
66
|
"husky": "^9.1.7",
|
|
67
|
+
"jsdom": "^27.2.0",
|
|
67
68
|
"prettier": "^3.6.2",
|
|
68
69
|
"tsup": "^8.5.1",
|
|
69
70
|
"tsx": "^4.20.6",
|
|
@@ -84,6 +85,8 @@
|
|
|
84
85
|
"eslint-plugin-react": ">=7.0.0",
|
|
85
86
|
"eslint-plugin-react-hooks": ">=7.0.0",
|
|
86
87
|
"eslint-plugin-react-refresh": ">=0.4.0",
|
|
87
|
-
"typescript-eslint": ">=8.0.0"
|
|
88
|
+
"typescript-eslint": ">=8.0.0",
|
|
89
|
+
"vite-tsconfig-paths": ">=5.1.4",
|
|
90
|
+
"vitest": ">=4.0.13"
|
|
88
91
|
}
|
|
89
92
|
}
|