@alextheman/eslint-plugin 5.7.1 → 5.8.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 +5 -4
- package/dist/index.js +5 -4
- package/dist/utility/index.cjs +1 -1
- package/dist/utility/index.js +1 -1
- package/package.json +14 -13
package/dist/index.cjs
CHANGED
|
@@ -60,6 +60,7 @@ let eslint_plugin_package_json = require("eslint-plugin-package-json");
|
|
|
60
60
|
eslint_plugin_package_json = __toESM(eslint_plugin_package_json);
|
|
61
61
|
let eslint_plugin_jsdoc = require("eslint-plugin-jsdoc");
|
|
62
62
|
eslint_plugin_jsdoc = __toESM(eslint_plugin_jsdoc);
|
|
63
|
+
let _alextheman_utility_node = require("@alextheman/utility/node");
|
|
63
64
|
|
|
64
65
|
//#region node_modules/.pnpm/globals@17.3.0/node_modules/globals/globals.json
|
|
65
66
|
var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -4086,7 +4087,6 @@ var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4086
4087
|
|
|
4087
4088
|
//#endregion
|
|
4088
4089
|
//#region src/configs/helpers/restrictedImports/generalRestrictedImports.ts
|
|
4089
|
-
var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
|
|
4090
4090
|
const generalRestrictedImports = { patterns: [{
|
|
4091
4091
|
group: ["node_modules"],
|
|
4092
4092
|
message: "Do not import directly from node_modules."
|
|
@@ -4173,7 +4173,7 @@ function fixOnCondition(fixable, fix) {
|
|
|
4173
4173
|
//#endregion
|
|
4174
4174
|
//#region src/utility/private/camelToKebab.ts
|
|
4175
4175
|
function camelToKebab(string) {
|
|
4176
|
-
if (string[0] === string[0].toUpperCase()) throw new _alextheman_utility.DataError(string, "CAMEL_TO_KEBAB_CONVERSION_ERROR", "camelCase string must start with a lowercase letter.");
|
|
4176
|
+
if (string[0] === string[0].toUpperCase()) throw new _alextheman_utility.DataError({ string }, "CAMEL_TO_KEBAB_CONVERSION_ERROR", "camelCase string must start with a lowercase letter.");
|
|
4177
4177
|
return (0, _alextheman_utility.camelToKebab)(string, { preserveConsecutiveCapitals: false });
|
|
4178
4178
|
}
|
|
4179
4179
|
|
|
@@ -4264,6 +4264,7 @@ const testsRestrictedImports = combineRestrictedImports(generalRestrictedImports
|
|
|
4264
4264
|
|
|
4265
4265
|
//#endregion
|
|
4266
4266
|
//#region src/configs/internal/tests.ts
|
|
4267
|
+
var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
|
|
4267
4268
|
const internalTests = [{
|
|
4268
4269
|
files: ["**/*.test.{js,ts}"],
|
|
4269
4270
|
languageOptions: { globals: {
|
|
@@ -5450,7 +5451,7 @@ const useNormalizedImports = createRule({
|
|
|
5450
5451
|
create(context) {
|
|
5451
5452
|
const { fixable = true } = parseUseNormalizedImportsOptions(context.options[0] ?? { fixable: true });
|
|
5452
5453
|
return { ImportDeclaration(node) {
|
|
5453
|
-
const normalizedPath = (0,
|
|
5454
|
+
const normalizedPath = (0, _alextheman_utility_node.normalizeImportPath)(node.source.value);
|
|
5454
5455
|
if (node.source.value !== normalizedPath) return context.report({
|
|
5455
5456
|
node,
|
|
5456
5457
|
messageId: "pathNotNormalized",
|
|
@@ -5516,7 +5517,7 @@ var rules_default = {
|
|
|
5516
5517
|
//#endregion
|
|
5517
5518
|
//#region package.json
|
|
5518
5519
|
var name = "@alextheman/eslint-plugin";
|
|
5519
|
-
var version = "5.
|
|
5520
|
+
var version = "5.8.0";
|
|
5520
5521
|
|
|
5521
5522
|
//#endregion
|
|
5522
5523
|
//#region src/alexPlugin.ts
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataError, camelToKebab, deepCopy, deepFreeze,
|
|
1
|
+
import { DataError, camelToKebab, deepCopy, deepFreeze, omitProperties } from "@alextheman/utility";
|
|
2
2
|
import { AST_NODE_TYPES, ESLintUtils } from "@typescript-eslint/utils";
|
|
3
3
|
import z from "zod";
|
|
4
4
|
import js from "@eslint/js";
|
|
@@ -16,6 +16,7 @@ import reactRefresh from "eslint-plugin-react-refresh";
|
|
|
16
16
|
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
17
17
|
import packageJson from "eslint-plugin-package-json";
|
|
18
18
|
import jsdoc from "eslint-plugin-jsdoc";
|
|
19
|
+
import { normalizeImportPath } from "@alextheman/utility/node";
|
|
19
20
|
|
|
20
21
|
//#region \0rolldown/runtime.js
|
|
21
22
|
var __create = Object.create;
|
|
@@ -4070,7 +4071,6 @@ var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4070
4071
|
|
|
4071
4072
|
//#endregion
|
|
4072
4073
|
//#region src/configs/helpers/restrictedImports/generalRestrictedImports.ts
|
|
4073
|
-
var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
|
|
4074
4074
|
const generalRestrictedImports = { patterns: [{
|
|
4075
4075
|
group: ["node_modules"],
|
|
4076
4076
|
message: "Do not import directly from node_modules."
|
|
@@ -4157,7 +4157,7 @@ function fixOnCondition(fixable, fix) {
|
|
|
4157
4157
|
//#endregion
|
|
4158
4158
|
//#region src/utility/private/camelToKebab.ts
|
|
4159
4159
|
function camelToKebab$1(string) {
|
|
4160
|
-
if (string[0] === string[0].toUpperCase()) throw new DataError(string, "CAMEL_TO_KEBAB_CONVERSION_ERROR", "camelCase string must start with a lowercase letter.");
|
|
4160
|
+
if (string[0] === string[0].toUpperCase()) throw new DataError({ string }, "CAMEL_TO_KEBAB_CONVERSION_ERROR", "camelCase string must start with a lowercase letter.");
|
|
4161
4161
|
return camelToKebab(string, { preserveConsecutiveCapitals: false });
|
|
4162
4162
|
}
|
|
4163
4163
|
|
|
@@ -4248,6 +4248,7 @@ const testsRestrictedImports = combineRestrictedImports(generalRestrictedImports
|
|
|
4248
4248
|
|
|
4249
4249
|
//#endregion
|
|
4250
4250
|
//#region src/configs/internal/tests.ts
|
|
4251
|
+
var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
|
|
4251
4252
|
const internalTests = [{
|
|
4252
4253
|
files: ["**/*.test.{js,ts}"],
|
|
4253
4254
|
languageOptions: { globals: {
|
|
@@ -5500,7 +5501,7 @@ var rules_default = {
|
|
|
5500
5501
|
//#endregion
|
|
5501
5502
|
//#region package.json
|
|
5502
5503
|
var name = "@alextheman/eslint-plugin";
|
|
5503
|
-
var version = "5.
|
|
5504
|
+
var version = "5.8.0";
|
|
5504
5505
|
|
|
5505
5506
|
//#endregion
|
|
5506
5507
|
//#region src/alexPlugin.ts
|
package/dist/utility/index.cjs
CHANGED
|
@@ -111,7 +111,7 @@ function fixOnCondition(fixable, fix) {
|
|
|
111
111
|
//#endregion
|
|
112
112
|
//#region src/utility/private/camelToKebab.ts
|
|
113
113
|
function camelToKebab(string) {
|
|
114
|
-
if (string[0] === string[0].toUpperCase()) throw new _alextheman_utility.DataError(string, "CAMEL_TO_KEBAB_CONVERSION_ERROR", "camelCase string must start with a lowercase letter.");
|
|
114
|
+
if (string[0] === string[0].toUpperCase()) throw new _alextheman_utility.DataError({ string }, "CAMEL_TO_KEBAB_CONVERSION_ERROR", "camelCase string must start with a lowercase letter.");
|
|
115
115
|
return (0, _alextheman_utility.camelToKebab)(string, { preserveConsecutiveCapitals: false });
|
|
116
116
|
}
|
|
117
117
|
|
package/dist/utility/index.js
CHANGED
|
@@ -82,7 +82,7 @@ function fixOnCondition(fixable, fix) {
|
|
|
82
82
|
//#endregion
|
|
83
83
|
//#region src/utility/private/camelToKebab.ts
|
|
84
84
|
function camelToKebab$1(string) {
|
|
85
|
-
if (string[0] === string[0].toUpperCase()) throw new DataError(string, "CAMEL_TO_KEBAB_CONVERSION_ERROR", "camelCase string must start with a lowercase letter.");
|
|
85
|
+
if (string[0] === string[0].toUpperCase()) throw new DataError({ string }, "CAMEL_TO_KEBAB_CONVERSION_ERROR", "camelCase string must start with a lowercase letter.");
|
|
86
86
|
return camelToKebab(string, { preserveConsecutiveCapitals: false });
|
|
87
87
|
}
|
|
88
88
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alextheman/eslint-plugin",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.0",
|
|
4
4
|
"description": "A package to provide custom ESLint rules and configs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"author": "alextheman",
|
|
11
11
|
"type": "module",
|
|
12
|
+
"sideEffects": false,
|
|
12
13
|
"exports": {
|
|
13
14
|
".": {
|
|
14
15
|
"types": "./dist/index.d.ts",
|
|
@@ -29,10 +30,10 @@
|
|
|
29
30
|
"dist"
|
|
30
31
|
],
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@alextheman/utility": "^
|
|
33
|
+
"@alextheman/utility": "^5.1.3",
|
|
33
34
|
"@eslint/compat": "^2.0.2",
|
|
34
|
-
"@typescript-eslint/types": "^8.
|
|
35
|
-
"@typescript-eslint/utils": "^8.
|
|
35
|
+
"@typescript-eslint/types": "^8.56.0",
|
|
36
|
+
"@typescript-eslint/utils": "^8.56.0",
|
|
36
37
|
"common-tags": "^1.8.2",
|
|
37
38
|
"prettier": "^3.8.1",
|
|
38
39
|
"zod": "^4.3.6"
|
|
@@ -42,19 +43,19 @@
|
|
|
42
43
|
"@types/common-tags": "^1.8.4",
|
|
43
44
|
"@types/eslint": "^9.6.1",
|
|
44
45
|
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
|
45
|
-
"@types/node": "^25.
|
|
46
|
-
"@typescript-eslint/rule-tester": "^8.
|
|
47
|
-
"alex-c-line": "^1.
|
|
46
|
+
"@types/node": "^25.3.0",
|
|
47
|
+
"@typescript-eslint/rule-tester": "^8.56.0",
|
|
48
|
+
"alex-c-line": "^1.28.0",
|
|
48
49
|
"dotenv-cli": "^11.0.0",
|
|
49
|
-
"eslint": "^10.0.
|
|
50
|
+
"eslint": "^10.0.1",
|
|
50
51
|
"eslint-config-prettier": "^10.1.8",
|
|
51
52
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
52
53
|
"eslint-plugin-import": "^2.32.0",
|
|
53
|
-
"eslint-plugin-jsdoc": "^62.
|
|
54
|
+
"eslint-plugin-jsdoc": "^62.7.0",
|
|
54
55
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
55
|
-
"eslint-plugin-n": "^17.
|
|
56
|
-
"eslint-plugin-package-json": "^0.
|
|
57
|
-
"eslint-plugin-perfectionist": "^5.
|
|
56
|
+
"eslint-plugin-n": "^17.24.0",
|
|
57
|
+
"eslint-plugin-package-json": "^0.89.0",
|
|
58
|
+
"eslint-plugin-perfectionist": "^5.6.0",
|
|
58
59
|
"eslint-plugin-prettier": "^5.5.5",
|
|
59
60
|
"eslint-plugin-react": "^7.37.5",
|
|
60
61
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
@@ -62,7 +63,7 @@
|
|
|
62
63
|
"eslint-vitest-rule-tester": "^3.1.0",
|
|
63
64
|
"globals": "^17.3.0",
|
|
64
65
|
"husky": "^9.1.7",
|
|
65
|
-
"jsdom": "^28.
|
|
66
|
+
"jsdom": "^28.1.0",
|
|
66
67
|
"tsdown": "^0.20.3",
|
|
67
68
|
"tsx": "^4.21.0",
|
|
68
69
|
"typedoc": "^0.28.17",
|