@alextheman/eslint-plugin 5.10.4 → 5.12.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 +38 -44
- package/dist/index.d.cts +2 -7
- package/dist/index.d.ts +2 -7
- package/dist/index.js +38 -42
- package/dist/internal/index.cjs +1 -49
- package/dist/internal/index.d.cts +1 -15
- package/dist/internal/index.d.ts +1 -15
- package/dist/internal/index.js +1 -45
- package/package.json +47 -49
package/dist/index.cjs
CHANGED
|
@@ -43,9 +43,6 @@ let eslint_plugin_perfectionist = require("eslint-plugin-perfectionist");
|
|
|
43
43
|
eslint_plugin_perfectionist = __toESM(eslint_plugin_perfectionist);
|
|
44
44
|
let eslint_plugin_prettier = require("eslint-plugin-prettier");
|
|
45
45
|
eslint_plugin_prettier = __toESM(eslint_plugin_prettier);
|
|
46
|
-
let vite_tsconfig_paths = require("vite-tsconfig-paths");
|
|
47
|
-
vite_tsconfig_paths = __toESM(vite_tsconfig_paths);
|
|
48
|
-
let vitest_config = require("vitest/config");
|
|
49
46
|
let typescript_eslint = require("typescript-eslint");
|
|
50
47
|
typescript_eslint = __toESM(typescript_eslint);
|
|
51
48
|
let eslint_plugin_jsx_a11y = require("eslint-plugin-jsx-a11y");
|
|
@@ -4419,44 +4416,6 @@ const generalJavaScript = [
|
|
|
4419
4416
|
//#region src/configs/external/prettierConfig.ts
|
|
4420
4417
|
const prettierConfig = { printWidth: 100 };
|
|
4421
4418
|
|
|
4422
|
-
//#endregion
|
|
4423
|
-
//#region src/configs/external/typeDocConfig.ts
|
|
4424
|
-
function typeDocConfig(entryPoints = ["./src/index.ts"]) {
|
|
4425
|
-
return {
|
|
4426
|
-
disableSources: true,
|
|
4427
|
-
entryPoints,
|
|
4428
|
-
excludeNotDocumented: true,
|
|
4429
|
-
includeVersion: true,
|
|
4430
|
-
outputs: [{
|
|
4431
|
-
name: "html",
|
|
4432
|
-
options: { navigation: {
|
|
4433
|
-
excludeReferences: false,
|
|
4434
|
-
includeCategories: true,
|
|
4435
|
-
includeFolders: true,
|
|
4436
|
-
includeGroups: true
|
|
4437
|
-
} },
|
|
4438
|
-
path: "docs/features/html"
|
|
4439
|
-
}, {
|
|
4440
|
-
name: "markdown",
|
|
4441
|
-
path: "docs/features/markdown"
|
|
4442
|
-
}],
|
|
4443
|
-
plugin: ["typedoc-plugin-markdown", "typedoc-rhineai-theme"]
|
|
4444
|
-
};
|
|
4445
|
-
}
|
|
4446
|
-
|
|
4447
|
-
//#endregion
|
|
4448
|
-
//#region src/configs/external/vitestConfig.ts
|
|
4449
|
-
function vitestConfig(environment = "jsdom") {
|
|
4450
|
-
return (0, vitest_config.defineConfig)({
|
|
4451
|
-
plugins: [(0, vite_tsconfig_paths.default)()],
|
|
4452
|
-
test: {
|
|
4453
|
-
environment,
|
|
4454
|
-
globals: true,
|
|
4455
|
-
include: ["**/tests/**/*.test.ts"]
|
|
4456
|
-
}
|
|
4457
|
-
});
|
|
4458
|
-
}
|
|
4459
|
-
|
|
4460
4419
|
//#endregion
|
|
4461
4420
|
//#region src/configs/helpers/reactLanguageOptions.ts
|
|
4462
4421
|
const reactLanguageOptions = {
|
|
@@ -5090,6 +5049,16 @@ function combinedTypeScriptReact(plugin) {
|
|
|
5090
5049
|
];
|
|
5091
5050
|
}
|
|
5092
5051
|
|
|
5052
|
+
//#endregion
|
|
5053
|
+
//#region src/configs/internal/packageJson.ts
|
|
5054
|
+
const internalPackageJson = [...generalPackageJson, {
|
|
5055
|
+
files: ["**/package.json"],
|
|
5056
|
+
rules: { "package-json/restrict-dependency-ranges": ["error", {
|
|
5057
|
+
forDependencyTypes: ["dependencies", "devDependencies"],
|
|
5058
|
+
rangeType: "pin"
|
|
5059
|
+
}] }
|
|
5060
|
+
}];
|
|
5061
|
+
|
|
5093
5062
|
//#endregion
|
|
5094
5063
|
//#region src/configs/index.ts
|
|
5095
5064
|
function createAlexPluginConfigs(plugin) {
|
|
@@ -5120,6 +5089,7 @@ function createAlexPluginConfigs(plugin) {
|
|
|
5120
5089
|
jsdoc: internalJsdoc,
|
|
5121
5090
|
neurosongsBackEnd: internalNeurosongsBackEnd,
|
|
5122
5091
|
neurosongsFrontEnd: internalNeurosongsFrontEnd,
|
|
5092
|
+
packageJson: internalPackageJson,
|
|
5123
5093
|
react: internalReact,
|
|
5124
5094
|
tests: internalTests,
|
|
5125
5095
|
typescript: internalTypeScript(plugin),
|
|
@@ -5569,7 +5539,7 @@ var rules_default = {
|
|
|
5569
5539
|
//#endregion
|
|
5570
5540
|
//#region package.json
|
|
5571
5541
|
var name = "@alextheman/eslint-plugin";
|
|
5572
|
-
var version = "5.
|
|
5542
|
+
var version = "5.12.0";
|
|
5573
5543
|
|
|
5574
5544
|
//#endregion
|
|
5575
5545
|
//#region src/alexPlugin.ts
|
|
@@ -5584,6 +5554,31 @@ const alexPlugin = {
|
|
|
5584
5554
|
};
|
|
5585
5555
|
alexPlugin.configs = createAlexPluginConfigs((0, _alextheman_utility.deepFreeze)((0, _alextheman_utility.deepCopy)(alexPlugin)));
|
|
5586
5556
|
|
|
5557
|
+
//#endregion
|
|
5558
|
+
//#region src/configs/external/typeDocConfig.ts
|
|
5559
|
+
function typeDocConfig(entryPoints = ["./src/index.ts"]) {
|
|
5560
|
+
return {
|
|
5561
|
+
disableSources: true,
|
|
5562
|
+
entryPoints,
|
|
5563
|
+
excludeNotDocumented: true,
|
|
5564
|
+
includeVersion: true,
|
|
5565
|
+
outputs: [{
|
|
5566
|
+
name: "html",
|
|
5567
|
+
options: { navigation: {
|
|
5568
|
+
excludeReferences: false,
|
|
5569
|
+
includeCategories: true,
|
|
5570
|
+
includeFolders: true,
|
|
5571
|
+
includeGroups: true
|
|
5572
|
+
} },
|
|
5573
|
+
path: "docs/features/html"
|
|
5574
|
+
}, {
|
|
5575
|
+
name: "markdown",
|
|
5576
|
+
path: "docs/features/markdown"
|
|
5577
|
+
}],
|
|
5578
|
+
plugin: ["typedoc-plugin-markdown", "typedoc-rhineai-theme"]
|
|
5579
|
+
};
|
|
5580
|
+
}
|
|
5581
|
+
|
|
5587
5582
|
//#endregion
|
|
5588
5583
|
//#region src/index.ts
|
|
5589
5584
|
var src_default = alexPlugin;
|
|
@@ -5597,5 +5592,4 @@ exports.fixOnCondition = fixOnCondition;
|
|
|
5597
5592
|
exports.flattenConfigs = flattenConfigs;
|
|
5598
5593
|
exports.getImportSpecifiersAfterRemoving = getImportSpecifiersAfterRemoving;
|
|
5599
5594
|
exports.prettierConfig = prettierConfig;
|
|
5600
|
-
exports.typeDocConfig = typeDocConfig;
|
|
5601
|
-
exports.vitestConfig = vitestConfig;
|
|
5595
|
+
exports.typeDocConfig = typeDocConfig;
|
package/dist/index.d.cts
CHANGED
|
@@ -2,8 +2,6 @@ import { Linter } from "eslint";
|
|
|
2
2
|
import { Config } from "prettier";
|
|
3
3
|
import { TypeDocOptions } from "typedoc";
|
|
4
4
|
import { PluginOptions } from "typedoc-plugin-markdown";
|
|
5
|
-
import * as vite from "vite";
|
|
6
|
-
import { VitestEnvironment } from "vitest/node";
|
|
7
5
|
import { TSESTree } from "@typescript-eslint/utils";
|
|
8
6
|
import z from "zod";
|
|
9
7
|
import { JSONSchema4 } from "@typescript-eslint/utils/json-schema";
|
|
@@ -28,7 +26,7 @@ type GetFlattenedConfigNames<ConfigObject extends { [K in keyof ConfigObject]: R
|
|
|
28
26
|
//#region src/configs/AlexPluginConfigGroup.d.ts
|
|
29
27
|
type GeneralConfig = "javascript" | "typescript" | "react" | "packageJson";
|
|
30
28
|
type PluginConfig = "base" | "tests";
|
|
31
|
-
type InternalConfig = "javascript" | "typescript" | "react" | "tests" | "eslintPluginBase" | "eslintPluginConfigs" | "eslintPluginRules" | "eslintPluginUtility" | "neurosongsBackEnd" | "neurosongsFrontEnd" | "utilityBase" | "utilityRoot" | "utilityInternal" | "alexCLine" | "jsdoc" | "components";
|
|
29
|
+
type InternalConfig = "javascript" | "typescript" | "react" | "tests" | "eslintPluginBase" | "eslintPluginConfigs" | "eslintPluginRules" | "eslintPluginUtility" | "neurosongsBackEnd" | "neurosongsFrontEnd" | "utilityBase" | "utilityRoot" | "utilityInternal" | "alexCLine" | "jsdoc" | "components" | "packageJson";
|
|
32
30
|
type CombinedConfig = "javascript" | "typescript" | "react" | "tests" | "typescriptReact" | "javascriptReact" | "typescriptPackage";
|
|
33
31
|
interface AlexPluginConfigObject {
|
|
34
32
|
general: Record<GeneralConfig, Array<Linter.Config>>;
|
|
@@ -65,9 +63,6 @@ declare const prettierConfig: Config;
|
|
|
65
63
|
//#region src/configs/external/typeDocConfig.d.ts
|
|
66
64
|
declare function typeDocConfig(entryPoints?: Array<string>): TypeDocOptions & PluginOptions;
|
|
67
65
|
//#endregion
|
|
68
|
-
//#region src/configs/external/vitestConfig.d.ts
|
|
69
|
-
declare function vitestConfig(environment?: VitestEnvironment): vite.UserConfig;
|
|
70
|
-
//#endregion
|
|
71
66
|
//#region src/utility/public/checkCallExpression.d.ts
|
|
72
67
|
/**
|
|
73
68
|
* Checks if a given node matches the expected object and property names.
|
|
@@ -250,4 +245,4 @@ declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]
|
|
|
250
245
|
*/
|
|
251
246
|
declare function getImportSpecifiersAfterRemoving<RuleOptions>(context: Readonly<RuleContext<"message", [RuleOptions]>>, specifiers: Array<TSESTree.ImportClause>, importToRemove: string): string;
|
|
252
247
|
//#endregion
|
|
253
|
-
export { AlexConfigGroupName, AlexFlattenedConfigName, type AlexPlugin, AlexPluginConfigFlattened, AlexPluginConfigObject, CombinedConfig, GeneralConfig, type GetFlattenedConfigNames, InternalConfig, type NoRestrictedImportsOptions, PluginConfig, checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, alexPlugin as default, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving, prettierConfig, typeDocConfig
|
|
248
|
+
export { AlexConfigGroupName, AlexFlattenedConfigName, type AlexPlugin, AlexPluginConfigFlattened, AlexPluginConfigObject, CombinedConfig, GeneralConfig, type GetFlattenedConfigNames, InternalConfig, type NoRestrictedImportsOptions, PluginConfig, checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, alexPlugin as default, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving, prettierConfig, typeDocConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,8 +4,6 @@ import { Linter } from "eslint";
|
|
|
4
4
|
import { Config } from "prettier";
|
|
5
5
|
import { TypeDocOptions } from "typedoc";
|
|
6
6
|
import { PluginOptions } from "typedoc-plugin-markdown";
|
|
7
|
-
import * as vite from "vite";
|
|
8
|
-
import { VitestEnvironment } from "vitest/node";
|
|
9
7
|
import { JSONSchema4 } from "@typescript-eslint/utils/json-schema";
|
|
10
8
|
import { RuleContext, RuleFix, RuleFixer } from "@typescript-eslint/utils/ts-eslint";
|
|
11
9
|
|
|
@@ -28,7 +26,7 @@ type GetFlattenedConfigNames<ConfigObject extends { [K in keyof ConfigObject]: R
|
|
|
28
26
|
//#region src/configs/AlexPluginConfigGroup.d.ts
|
|
29
27
|
type GeneralConfig = "javascript" | "typescript" | "react" | "packageJson";
|
|
30
28
|
type PluginConfig = "base" | "tests";
|
|
31
|
-
type InternalConfig = "javascript" | "typescript" | "react" | "tests" | "eslintPluginBase" | "eslintPluginConfigs" | "eslintPluginRules" | "eslintPluginUtility" | "neurosongsBackEnd" | "neurosongsFrontEnd" | "utilityBase" | "utilityRoot" | "utilityInternal" | "alexCLine" | "jsdoc" | "components";
|
|
29
|
+
type InternalConfig = "javascript" | "typescript" | "react" | "tests" | "eslintPluginBase" | "eslintPluginConfigs" | "eslintPluginRules" | "eslintPluginUtility" | "neurosongsBackEnd" | "neurosongsFrontEnd" | "utilityBase" | "utilityRoot" | "utilityInternal" | "alexCLine" | "jsdoc" | "components" | "packageJson";
|
|
32
30
|
type CombinedConfig = "javascript" | "typescript" | "react" | "tests" | "typescriptReact" | "javascriptReact" | "typescriptPackage";
|
|
33
31
|
interface AlexPluginConfigObject {
|
|
34
32
|
general: Record<GeneralConfig, Array<Linter.Config>>;
|
|
@@ -65,9 +63,6 @@ declare const prettierConfig: Config;
|
|
|
65
63
|
//#region src/configs/external/typeDocConfig.d.ts
|
|
66
64
|
declare function typeDocConfig(entryPoints?: Array<string>): TypeDocOptions & PluginOptions;
|
|
67
65
|
//#endregion
|
|
68
|
-
//#region src/configs/external/vitestConfig.d.ts
|
|
69
|
-
declare function vitestConfig(environment?: VitestEnvironment): vite.UserConfig;
|
|
70
|
-
//#endregion
|
|
71
66
|
//#region src/utility/public/checkCallExpression.d.ts
|
|
72
67
|
/**
|
|
73
68
|
* Checks if a given node matches the expected object and property names.
|
|
@@ -250,4 +245,4 @@ declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]
|
|
|
250
245
|
*/
|
|
251
246
|
declare function getImportSpecifiersAfterRemoving<RuleOptions>(context: Readonly<RuleContext<"message", [RuleOptions]>>, specifiers: Array<TSESTree.ImportClause>, importToRemove: string): string;
|
|
252
247
|
//#endregion
|
|
253
|
-
export { AlexConfigGroupName, AlexFlattenedConfigName, type AlexPlugin, AlexPluginConfigFlattened, AlexPluginConfigObject, CombinedConfig, GeneralConfig, type GetFlattenedConfigNames, InternalConfig, type NoRestrictedImportsOptions, PluginConfig, checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, alexPlugin as default, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving, prettierConfig, typeDocConfig
|
|
248
|
+
export { AlexConfigGroupName, AlexFlattenedConfigName, type AlexPlugin, AlexPluginConfigFlattened, AlexPluginConfigObject, CombinedConfig, GeneralConfig, type GetFlattenedConfigNames, InternalConfig, type NoRestrictedImportsOptions, PluginConfig, checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, alexPlugin as default, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving, prettierConfig, typeDocConfig };
|
package/dist/index.js
CHANGED
|
@@ -7,8 +7,6 @@ import importPlugin from "eslint-plugin-import";
|
|
|
7
7
|
import nodePlugin from "eslint-plugin-n";
|
|
8
8
|
import perfectionist from "eslint-plugin-perfectionist";
|
|
9
9
|
import prettierPlugin from "eslint-plugin-prettier";
|
|
10
|
-
import tsconfigPaths from "vite-tsconfig-paths";
|
|
11
|
-
import { defineConfig } from "vitest/config";
|
|
12
10
|
import tseslint from "typescript-eslint";
|
|
13
11
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
14
12
|
import reactPlugin from "eslint-plugin-react";
|
|
@@ -4403,44 +4401,6 @@ const generalJavaScript = [
|
|
|
4403
4401
|
//#region src/configs/external/prettierConfig.ts
|
|
4404
4402
|
const prettierConfig = { printWidth: 100 };
|
|
4405
4403
|
|
|
4406
|
-
//#endregion
|
|
4407
|
-
//#region src/configs/external/typeDocConfig.ts
|
|
4408
|
-
function typeDocConfig(entryPoints = ["./src/index.ts"]) {
|
|
4409
|
-
return {
|
|
4410
|
-
disableSources: true,
|
|
4411
|
-
entryPoints,
|
|
4412
|
-
excludeNotDocumented: true,
|
|
4413
|
-
includeVersion: true,
|
|
4414
|
-
outputs: [{
|
|
4415
|
-
name: "html",
|
|
4416
|
-
options: { navigation: {
|
|
4417
|
-
excludeReferences: false,
|
|
4418
|
-
includeCategories: true,
|
|
4419
|
-
includeFolders: true,
|
|
4420
|
-
includeGroups: true
|
|
4421
|
-
} },
|
|
4422
|
-
path: "docs/features/html"
|
|
4423
|
-
}, {
|
|
4424
|
-
name: "markdown",
|
|
4425
|
-
path: "docs/features/markdown"
|
|
4426
|
-
}],
|
|
4427
|
-
plugin: ["typedoc-plugin-markdown", "typedoc-rhineai-theme"]
|
|
4428
|
-
};
|
|
4429
|
-
}
|
|
4430
|
-
|
|
4431
|
-
//#endregion
|
|
4432
|
-
//#region src/configs/external/vitestConfig.ts
|
|
4433
|
-
function vitestConfig(environment = "jsdom") {
|
|
4434
|
-
return defineConfig({
|
|
4435
|
-
plugins: [tsconfigPaths()],
|
|
4436
|
-
test: {
|
|
4437
|
-
environment,
|
|
4438
|
-
globals: true,
|
|
4439
|
-
include: ["**/tests/**/*.test.ts"]
|
|
4440
|
-
}
|
|
4441
|
-
});
|
|
4442
|
-
}
|
|
4443
|
-
|
|
4444
4404
|
//#endregion
|
|
4445
4405
|
//#region src/configs/helpers/reactLanguageOptions.ts
|
|
4446
4406
|
const reactLanguageOptions = {
|
|
@@ -5074,6 +5034,16 @@ function combinedTypeScriptReact(plugin) {
|
|
|
5074
5034
|
];
|
|
5075
5035
|
}
|
|
5076
5036
|
|
|
5037
|
+
//#endregion
|
|
5038
|
+
//#region src/configs/internal/packageJson.ts
|
|
5039
|
+
const internalPackageJson = [...generalPackageJson, {
|
|
5040
|
+
files: ["**/package.json"],
|
|
5041
|
+
rules: { "package-json/restrict-dependency-ranges": ["error", {
|
|
5042
|
+
forDependencyTypes: ["dependencies", "devDependencies"],
|
|
5043
|
+
rangeType: "pin"
|
|
5044
|
+
}] }
|
|
5045
|
+
}];
|
|
5046
|
+
|
|
5077
5047
|
//#endregion
|
|
5078
5048
|
//#region src/configs/index.ts
|
|
5079
5049
|
function createAlexPluginConfigs(plugin) {
|
|
@@ -5104,6 +5074,7 @@ function createAlexPluginConfigs(plugin) {
|
|
|
5104
5074
|
jsdoc: internalJsdoc,
|
|
5105
5075
|
neurosongsBackEnd: internalNeurosongsBackEnd,
|
|
5106
5076
|
neurosongsFrontEnd: internalNeurosongsFrontEnd,
|
|
5077
|
+
packageJson: internalPackageJson,
|
|
5107
5078
|
react: internalReact,
|
|
5108
5079
|
tests: internalTests,
|
|
5109
5080
|
typescript: internalTypeScript(plugin),
|
|
@@ -5553,7 +5524,7 @@ var rules_default = {
|
|
|
5553
5524
|
//#endregion
|
|
5554
5525
|
//#region package.json
|
|
5555
5526
|
var name = "@alextheman/eslint-plugin";
|
|
5556
|
-
var version = "5.
|
|
5527
|
+
var version = "5.12.0";
|
|
5557
5528
|
|
|
5558
5529
|
//#endregion
|
|
5559
5530
|
//#region src/alexPlugin.ts
|
|
@@ -5568,9 +5539,34 @@ const alexPlugin = {
|
|
|
5568
5539
|
};
|
|
5569
5540
|
alexPlugin.configs = createAlexPluginConfigs(deepFreeze(deepCopy(alexPlugin)));
|
|
5570
5541
|
|
|
5542
|
+
//#endregion
|
|
5543
|
+
//#region src/configs/external/typeDocConfig.ts
|
|
5544
|
+
function typeDocConfig(entryPoints = ["./src/index.ts"]) {
|
|
5545
|
+
return {
|
|
5546
|
+
disableSources: true,
|
|
5547
|
+
entryPoints,
|
|
5548
|
+
excludeNotDocumented: true,
|
|
5549
|
+
includeVersion: true,
|
|
5550
|
+
outputs: [{
|
|
5551
|
+
name: "html",
|
|
5552
|
+
options: { navigation: {
|
|
5553
|
+
excludeReferences: false,
|
|
5554
|
+
includeCategories: true,
|
|
5555
|
+
includeFolders: true,
|
|
5556
|
+
includeGroups: true
|
|
5557
|
+
} },
|
|
5558
|
+
path: "docs/features/html"
|
|
5559
|
+
}, {
|
|
5560
|
+
name: "markdown",
|
|
5561
|
+
path: "docs/features/markdown"
|
|
5562
|
+
}],
|
|
5563
|
+
plugin: ["typedoc-plugin-markdown", "typedoc-rhineai-theme"]
|
|
5564
|
+
};
|
|
5565
|
+
}
|
|
5566
|
+
|
|
5571
5567
|
//#endregion
|
|
5572
5568
|
//#region src/index.ts
|
|
5573
5569
|
var src_default = alexPlugin;
|
|
5574
5570
|
|
|
5575
5571
|
//#endregion
|
|
5576
|
-
export { checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, src_default as default, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving, prettierConfig, typeDocConfig
|
|
5572
|
+
export { checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, src_default as default, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving, prettierConfig, typeDocConfig };
|
package/dist/internal/index.cjs
CHANGED
|
@@ -27,54 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
}) : target, mod));
|
|
28
28
|
|
|
29
29
|
//#endregion
|
|
30
|
-
let vite_tsconfig_paths = require("vite-tsconfig-paths");
|
|
31
|
-
vite_tsconfig_paths = __toESM(vite_tsconfig_paths);
|
|
32
|
-
let vitest_config = require("vitest/config");
|
|
33
30
|
let typescript_eslint = require("typescript-eslint");
|
|
34
31
|
typescript_eslint = __toESM(typescript_eslint);
|
|
35
32
|
|
|
36
|
-
//#region src/configs/external/prettierConfig.ts
|
|
37
|
-
const prettierConfig = { printWidth: 100 };
|
|
38
|
-
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region src/configs/external/typeDocConfig.ts
|
|
41
|
-
function typeDocConfig(entryPoints = ["./src/index.ts"]) {
|
|
42
|
-
return {
|
|
43
|
-
disableSources: true,
|
|
44
|
-
entryPoints,
|
|
45
|
-
excludeNotDocumented: true,
|
|
46
|
-
includeVersion: true,
|
|
47
|
-
outputs: [{
|
|
48
|
-
name: "html",
|
|
49
|
-
options: { navigation: {
|
|
50
|
-
excludeReferences: false,
|
|
51
|
-
includeCategories: true,
|
|
52
|
-
includeFolders: true,
|
|
53
|
-
includeGroups: true
|
|
54
|
-
} },
|
|
55
|
-
path: "docs/features/html"
|
|
56
|
-
}, {
|
|
57
|
-
name: "markdown",
|
|
58
|
-
path: "docs/features/markdown"
|
|
59
|
-
}],
|
|
60
|
-
plugin: ["typedoc-plugin-markdown", "typedoc-rhineai-theme"]
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
//#endregion
|
|
65
|
-
//#region src/configs/external/vitestConfig.ts
|
|
66
|
-
function vitestConfig(environment = "jsdom") {
|
|
67
|
-
return (0, vitest_config.defineConfig)({
|
|
68
|
-
plugins: [(0, vite_tsconfig_paths.default)()],
|
|
69
|
-
test: {
|
|
70
|
-
environment,
|
|
71
|
-
globals: true,
|
|
72
|
-
include: ["**/tests/**/*.test.ts"]
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
//#endregion
|
|
78
33
|
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/globals.json
|
|
79
34
|
var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
80
35
|
module.exports = {
|
|
@@ -4239,13 +4194,10 @@ const sortObjects = {
|
|
|
4239
4194
|
};
|
|
4240
4195
|
|
|
4241
4196
|
//#endregion
|
|
4242
|
-
exports.prettierConfig = prettierConfig;
|
|
4243
4197
|
exports.reactLanguageOptions = reactLanguageOptions;
|
|
4244
4198
|
exports.sortClasses = sortClasses;
|
|
4245
4199
|
exports.sortExports = sortExports;
|
|
4246
4200
|
exports.sortImports = sortImports;
|
|
4247
4201
|
exports.sortObjects = sortObjects;
|
|
4248
|
-
exports.typeDocConfig = typeDocConfig;
|
|
4249
4202
|
exports.typeScriptLanguageOptions = typeScriptLanguageOptions;
|
|
4250
|
-
exports.unusedVarsIgnorePatterns = unusedVarsIgnorePatterns;
|
|
4251
|
-
exports.vitestConfig = vitestConfig;
|
|
4203
|
+
exports.unusedVarsIgnorePatterns = unusedVarsIgnorePatterns;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
import { Config } from "prettier";
|
|
2
|
-
import { TypeDocOptions } from "typedoc";
|
|
3
|
-
import { PluginOptions } from "typedoc-plugin-markdown";
|
|
4
|
-
import * as vite from "vite";
|
|
5
|
-
import { VitestEnvironment } from "vitest/node";
|
|
6
1
|
import { Linter } from "eslint";
|
|
7
2
|
|
|
8
|
-
//#region src/configs/external/prettierConfig.d.ts
|
|
9
|
-
declare const prettierConfig: Config;
|
|
10
|
-
//#endregion
|
|
11
|
-
//#region src/configs/external/typeDocConfig.d.ts
|
|
12
|
-
declare function typeDocConfig(entryPoints?: Array<string>): TypeDocOptions & PluginOptions;
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region src/configs/external/vitestConfig.d.ts
|
|
15
|
-
declare function vitestConfig(environment?: VitestEnvironment): vite.UserConfig;
|
|
16
|
-
//#endregion
|
|
17
3
|
//#region src/configs/helpers/reactLanguageOptions.d.ts
|
|
18
4
|
declare const reactLanguageOptions: Linter.LanguageOptions;
|
|
19
5
|
//#endregion
|
|
@@ -171,4 +157,4 @@ interface NoRestrictedImportsOptionsPathsAndPatterns {
|
|
|
171
157
|
*/
|
|
172
158
|
type NoRestrictedImportsOptions = NoRestrictedImportsOptionsPathsOnly | NoRestrictedImportsOptionsPatternsOnly | NoRestrictedImportsOptionsPathsAndPatterns;
|
|
173
159
|
//#endregion
|
|
174
|
-
export { type NoRestrictedImportsOptions, type RestrictedPathImport, type RestrictedPatternImport,
|
|
160
|
+
export { type NoRestrictedImportsOptions, type RestrictedPathImport, type RestrictedPatternImport, reactLanguageOptions, sortClasses, sortExports, sortImports, sortObjects, typeScriptLanguageOptions, unusedVarsIgnorePatterns };
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
import { Config } from "prettier";
|
|
2
|
-
import { TypeDocOptions } from "typedoc";
|
|
3
|
-
import { PluginOptions } from "typedoc-plugin-markdown";
|
|
4
|
-
import * as vite from "vite";
|
|
5
|
-
import { VitestEnvironment } from "vitest/node";
|
|
6
1
|
import { Linter } from "eslint";
|
|
7
2
|
|
|
8
|
-
//#region src/configs/external/prettierConfig.d.ts
|
|
9
|
-
declare const prettierConfig: Config;
|
|
10
|
-
//#endregion
|
|
11
|
-
//#region src/configs/external/typeDocConfig.d.ts
|
|
12
|
-
declare function typeDocConfig(entryPoints?: Array<string>): TypeDocOptions & PluginOptions;
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region src/configs/external/vitestConfig.d.ts
|
|
15
|
-
declare function vitestConfig(environment?: VitestEnvironment): vite.UserConfig;
|
|
16
|
-
//#endregion
|
|
17
3
|
//#region src/configs/helpers/reactLanguageOptions.d.ts
|
|
18
4
|
declare const reactLanguageOptions: Linter.LanguageOptions;
|
|
19
5
|
//#endregion
|
|
@@ -171,4 +157,4 @@ interface NoRestrictedImportsOptionsPathsAndPatterns {
|
|
|
171
157
|
*/
|
|
172
158
|
type NoRestrictedImportsOptions = NoRestrictedImportsOptionsPathsOnly | NoRestrictedImportsOptionsPatternsOnly | NoRestrictedImportsOptionsPathsAndPatterns;
|
|
173
159
|
//#endregion
|
|
174
|
-
export { type NoRestrictedImportsOptions, type RestrictedPathImport, type RestrictedPatternImport,
|
|
160
|
+
export { type NoRestrictedImportsOptions, type RestrictedPathImport, type RestrictedPatternImport, reactLanguageOptions, sortClasses, sortExports, sortImports, sortObjects, typeScriptLanguageOptions, unusedVarsIgnorePatterns };
|
package/dist/internal/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import tsconfigPaths from "vite-tsconfig-paths";
|
|
2
|
-
import { defineConfig } from "vitest/config";
|
|
3
1
|
import tseslint from "typescript-eslint";
|
|
4
2
|
|
|
5
3
|
//#region \0rolldown/runtime.js
|
|
@@ -29,48 +27,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
27
|
enumerable: true
|
|
30
28
|
}) : target, mod));
|
|
31
29
|
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/configs/external/prettierConfig.ts
|
|
34
|
-
const prettierConfig = { printWidth: 100 };
|
|
35
|
-
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region src/configs/external/typeDocConfig.ts
|
|
38
|
-
function typeDocConfig(entryPoints = ["./src/index.ts"]) {
|
|
39
|
-
return {
|
|
40
|
-
disableSources: true,
|
|
41
|
-
entryPoints,
|
|
42
|
-
excludeNotDocumented: true,
|
|
43
|
-
includeVersion: true,
|
|
44
|
-
outputs: [{
|
|
45
|
-
name: "html",
|
|
46
|
-
options: { navigation: {
|
|
47
|
-
excludeReferences: false,
|
|
48
|
-
includeCategories: true,
|
|
49
|
-
includeFolders: true,
|
|
50
|
-
includeGroups: true
|
|
51
|
-
} },
|
|
52
|
-
path: "docs/features/html"
|
|
53
|
-
}, {
|
|
54
|
-
name: "markdown",
|
|
55
|
-
path: "docs/features/markdown"
|
|
56
|
-
}],
|
|
57
|
-
plugin: ["typedoc-plugin-markdown", "typedoc-rhineai-theme"]
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region src/configs/external/vitestConfig.ts
|
|
63
|
-
function vitestConfig(environment = "jsdom") {
|
|
64
|
-
return defineConfig({
|
|
65
|
-
plugins: [tsconfigPaths()],
|
|
66
|
-
test: {
|
|
67
|
-
environment,
|
|
68
|
-
globals: true,
|
|
69
|
-
include: ["**/tests/**/*.test.ts"]
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
30
|
//#endregion
|
|
75
31
|
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/globals.json
|
|
76
32
|
var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -4236,4 +4192,4 @@ const sortObjects = {
|
|
|
4236
4192
|
};
|
|
4237
4193
|
|
|
4238
4194
|
//#endregion
|
|
4239
|
-
export {
|
|
4195
|
+
export { reactLanguageOptions, sortClasses, sortExports, sortImports, sortObjects, typeScriptLanguageOptions, unusedVarsIgnorePatterns };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alextheman/eslint-plugin",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.12.0",
|
|
4
4
|
"description": "A package to provide custom ESLint rules and configs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,51 +34,51 @@
|
|
|
34
34
|
"dist"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@alextheman/utility": "
|
|
38
|
-
"@eslint/compat": "
|
|
39
|
-
"@typescript-eslint/types": "
|
|
40
|
-
"@typescript-eslint/utils": "
|
|
41
|
-
"common-tags": "
|
|
42
|
-
"prettier": "
|
|
43
|
-
"zod": "
|
|
37
|
+
"@alextheman/utility": "5.9.0",
|
|
38
|
+
"@eslint/compat": "2.0.4",
|
|
39
|
+
"@typescript-eslint/types": "8.58.0",
|
|
40
|
+
"@typescript-eslint/utils": "8.58.0",
|
|
41
|
+
"common-tags": "1.8.2",
|
|
42
|
+
"prettier": "3.8.1",
|
|
43
|
+
"zod": "4.3.6"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@eslint/js": "
|
|
47
|
-
"@types/common-tags": "
|
|
48
|
-
"@types/eslint": "
|
|
49
|
-
"@types/eslint-plugin-jsx-a11y": "
|
|
50
|
-
"@types/node": "
|
|
51
|
-
"@typescript-eslint/rule-tester": "
|
|
52
|
-
"alex-c-line": "
|
|
53
|
-
"dotenv-cli": "
|
|
54
|
-
"eslint": "
|
|
55
|
-
"eslint-config-prettier": "
|
|
56
|
-
"eslint-import-resolver-typescript": "
|
|
57
|
-
"eslint-plugin-import": "
|
|
58
|
-
"eslint-plugin-jsdoc": "
|
|
59
|
-
"eslint-plugin-jsx-a11y": "
|
|
60
|
-
"eslint-plugin-n": "
|
|
61
|
-
"eslint-plugin-package-json": "
|
|
62
|
-
"eslint-plugin-perfectionist": "
|
|
63
|
-
"eslint-plugin-prettier": "
|
|
64
|
-
"eslint-plugin-react": "
|
|
65
|
-
"eslint-plugin-react-hooks": "
|
|
66
|
-
"eslint-plugin-react-refresh": "
|
|
67
|
-
"eslint-vitest-rule-tester": "
|
|
68
|
-
"execa": "
|
|
69
|
-
"globals": "
|
|
70
|
-
"husky": "
|
|
71
|
-
"jsdom": "
|
|
72
|
-
"tempy": "
|
|
73
|
-
"tsdown": "
|
|
74
|
-
"tsx": "
|
|
75
|
-
"typedoc": "
|
|
76
|
-
"typedoc-plugin-markdown": "
|
|
77
|
-
"typedoc-rhineai-theme": "
|
|
78
|
-
"typescript": "
|
|
79
|
-
"typescript-eslint": "
|
|
80
|
-
"vite
|
|
81
|
-
"vitest": "
|
|
46
|
+
"@eslint/js": "10.0.1",
|
|
47
|
+
"@types/common-tags": "1.8.4",
|
|
48
|
+
"@types/eslint": "9.6.1",
|
|
49
|
+
"@types/eslint-plugin-jsx-a11y": "6.10.1",
|
|
50
|
+
"@types/node": "25.5.2",
|
|
51
|
+
"@typescript-eslint/rule-tester": "8.58.0",
|
|
52
|
+
"alex-c-line": "2.5.0",
|
|
53
|
+
"dotenv-cli": "11.0.0",
|
|
54
|
+
"eslint": "10.2.0",
|
|
55
|
+
"eslint-config-prettier": "10.1.8",
|
|
56
|
+
"eslint-import-resolver-typescript": "4.4.4",
|
|
57
|
+
"eslint-plugin-import": "2.32.0",
|
|
58
|
+
"eslint-plugin-jsdoc": "62.9.0",
|
|
59
|
+
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
60
|
+
"eslint-plugin-n": "17.24.0",
|
|
61
|
+
"eslint-plugin-package-json": "0.91.1",
|
|
62
|
+
"eslint-plugin-perfectionist": "5.8.0",
|
|
63
|
+
"eslint-plugin-prettier": "5.5.5",
|
|
64
|
+
"eslint-plugin-react": "7.37.5",
|
|
65
|
+
"eslint-plugin-react-hooks": "7.0.1",
|
|
66
|
+
"eslint-plugin-react-refresh": "0.5.2",
|
|
67
|
+
"eslint-vitest-rule-tester": "3.1.0",
|
|
68
|
+
"execa": "9.6.1",
|
|
69
|
+
"globals": "17.4.0",
|
|
70
|
+
"husky": "9.1.7",
|
|
71
|
+
"jsdom": "29.0.1",
|
|
72
|
+
"tempy": "3.2.0",
|
|
73
|
+
"tsdown": "0.20.3",
|
|
74
|
+
"tsx": "4.21.0",
|
|
75
|
+
"typedoc": "0.28.18",
|
|
76
|
+
"typedoc-plugin-markdown": "4.11.0",
|
|
77
|
+
"typedoc-rhineai-theme": "1.2.0",
|
|
78
|
+
"typescript": "6.0.2",
|
|
79
|
+
"typescript-eslint": "8.58.0",
|
|
80
|
+
"vite": "8.0.3",
|
|
81
|
+
"vitest": "4.1.2"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
84
|
"@eslint/js": ">=9.0.0",
|
|
@@ -98,9 +98,7 @@
|
|
|
98
98
|
"typedoc": ">=0.28.15",
|
|
99
99
|
"typedoc-plugin-markdown": ">=4.9.0",
|
|
100
100
|
"typedoc-rhineai-theme": ">=1.2.0",
|
|
101
|
-
"typescript-eslint": ">=8.0.0"
|
|
102
|
-
"vite-tsconfig-paths": ">=5.1.4",
|
|
103
|
-
"vitest": ">=4.0.13"
|
|
101
|
+
"typescript-eslint": ">=8.0.0"
|
|
104
102
|
},
|
|
105
103
|
"scripts": {
|
|
106
104
|
"build": "tsdown",
|
|
@@ -109,14 +107,14 @@
|
|
|
109
107
|
"create-release-note": "bash -c 'git pull origin main && alex-c-line template release-note create $@' --",
|
|
110
108
|
"format": "pnpm run format-prettier && pnpm run format-eslint",
|
|
111
109
|
"format-and-build": "tsx src/utility/checkConfigChanges.ts || pnpm run build && pnpm run format",
|
|
112
|
-
"format-eslint": "eslint --fix --suppress-all \"src
|
|
110
|
+
"format-eslint": "eslint --fix --suppress-all \"{src,tests}/**/*.ts\" \"package.json\" && rm -f eslint-suppressions.json",
|
|
113
111
|
"format-prettier": "pnpm run format-prettier-typescript && pnpm run format-prettier-javascript && pnpm run format-prettier-yml",
|
|
114
112
|
"format-prettier-javascript": "prettier --write \"./**/*.js\"",
|
|
115
113
|
"format-prettier-typescript": "prettier --write --parser typescript \"./**/*.ts\"",
|
|
116
114
|
"format-prettier-yml": "prettier --write \"./**/*.yml\"",
|
|
117
115
|
"lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-prettier && pnpm run lint-pre-release",
|
|
118
116
|
"lint-and-build": "tsx src/utility/checkConfigChanges.ts || pnpm run build && pnpm run lint",
|
|
119
|
-
"lint-eslint": "eslint \"src
|
|
117
|
+
"lint-eslint": "eslint \"{src,tests}/**/*.ts\" \"package.json\"",
|
|
120
118
|
"lint-pre-release": "alex-c-line package-json check --rules no-pre-release-dependencies",
|
|
121
119
|
"lint-prettier": "pnpm run lint-prettier-typescript && pnpm run lint-prettier-javascript && pnpm run lint-prettier-yml",
|
|
122
120
|
"lint-prettier-javascript": "prettier --check \"./**/*.js\"",
|