@magicdawn/eslint-config 1.5.8 → 1.5.10
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.
|
@@ -41,6 +41,9 @@ declare const mgCustomRules: {
|
|
|
41
41
|
}];
|
|
42
42
|
};
|
|
43
43
|
readonly unicorn: {
|
|
44
|
+
/**
|
|
45
|
+
* I don't prefer, I know what I'm doing ~
|
|
46
|
+
*/
|
|
44
47
|
readonly 'unicorn/catch-error-name': "off";
|
|
45
48
|
readonly 'unicorn/consistent-function-scoping': "off";
|
|
46
49
|
readonly 'unicorn/filename-case': "off";
|
|
@@ -56,6 +59,12 @@ declare const mgCustomRules: {
|
|
|
56
59
|
readonly 'unicorn/prefer-add-event-listener': "off";
|
|
57
60
|
readonly 'unicorn/prefer-string-trim-start-end': "off";
|
|
58
61
|
readonly 'unicorn/prefer-string-raw': "off";
|
|
62
|
+
/**
|
|
63
|
+
* change options
|
|
64
|
+
*/
|
|
65
|
+
readonly 'unicorn/text-encoding-identifier-case': ["warn", {
|
|
66
|
+
readonly withDash: true;
|
|
67
|
+
}];
|
|
59
68
|
};
|
|
60
69
|
readonly disableMorePrefer: {
|
|
61
70
|
readonly 'prefer-template': "off";
|
|
@@ -40,7 +40,8 @@ const mgCustomRules = {
|
|
|
40
40
|
"unicorn/prefer-modern-dom-apis": "off",
|
|
41
41
|
"unicorn/prefer-add-event-listener": "off",
|
|
42
42
|
"unicorn/prefer-string-trim-start-end": "off",
|
|
43
|
-
"unicorn/prefer-string-raw": "off"
|
|
43
|
+
"unicorn/prefer-string-raw": "off",
|
|
44
|
+
"unicorn/text-encoding-identifier-case": ["warn", { withDash: true }]
|
|
44
45
|
},
|
|
45
46
|
disableMorePrefer: { "prefer-template": "off" },
|
|
46
47
|
tseslint: {
|
|
@@ -109,7 +110,7 @@ const mgCustomJsonOrder = { tsconfig: [{
|
|
|
109
110
|
//#endregion
|
|
110
111
|
//#region src/from-sxzz.ts
|
|
111
112
|
function fromSxzz(options, ...moreConfigs) {
|
|
112
|
-
const { sortImport
|
|
113
|
+
const { sortImport, ...sxzzOptions } = options ?? {};
|
|
113
114
|
return sxzz({
|
|
114
115
|
command: false,
|
|
115
116
|
prettier: false,
|
|
@@ -145,7 +146,7 @@ function fromSxzz(options, ...moreConfigs) {
|
|
|
145
146
|
files: ["**/*.d.ts"],
|
|
146
147
|
rules: { ...mgCustomRules.dts }
|
|
147
148
|
}
|
|
148
|
-
], ...moreConfigs ?? []).remove("sxzz/node").remove("sxzz/de-morgan").remove("sxzz/markdown/recommended/processor").removeRules("sxzz/prefer-string-function").override("sxzz/sort/tsconfig", (config) => {
|
|
149
|
+
], ...moreConfigs ?? []).remove("sxzz/node").remove("sxzz/de-morgan").remove("sxzz/markdown/recommended/processor").remove("sxzz/comments/recommended").remove("sxzz/comments").removeRules("sxzz/prefer-string-function").override("sxzz/sort/tsconfig", (config) => {
|
|
149
150
|
const val = config.rules?.["jsonc/sort-keys"];
|
|
150
151
|
if (val && Array.isArray(val) && val.length > 0) {
|
|
151
152
|
const ruleOptions = val.slice(1);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magicdawn/eslint-config",
|
|
3
|
-
"version": "1.5.
|
|
4
|
-
"packageManager": "pnpm@10.
|
|
3
|
+
"version": "1.5.10",
|
|
4
|
+
"packageManager": "pnpm@10.23.0+sha512.21c4e5698002ade97e4efe8b8b4a89a8de3c85a37919f957e7a0f30f38fbc5bbdd05980ffe29179b2fb6e6e691242e098d945d1601772cad0fef5fb6411e2a4b",
|
|
5
5
|
"description": "magicdawn's eslint-config",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"keywords": [
|
|
@@ -51,18 +51,18 @@
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@sxzz/eslint-config": "^7.
|
|
55
|
-
"es-toolkit": "^1.
|
|
54
|
+
"@sxzz/eslint-config": "^7.3.2",
|
|
55
|
+
"es-toolkit": "^1.42.0",
|
|
56
56
|
"eslint-config-prettier": "^10.1.8",
|
|
57
|
-
"eslint-flat-config-utils": "^2.1.
|
|
57
|
+
"eslint-flat-config-utils": "^2.1.4"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@magicdawn/prettier-config": "^0.1.0",
|
|
61
|
-
"@types/node": "^24.
|
|
61
|
+
"@types/node": "^24.10.1",
|
|
62
62
|
"husky": "^9.1.7",
|
|
63
|
-
"lint-staged": "^16.
|
|
63
|
+
"lint-staged": "^16.2.7",
|
|
64
64
|
"prettier": "^3.6.2",
|
|
65
|
-
"tsdown": "^0.
|
|
65
|
+
"tsdown": "^0.16.7"
|
|
66
66
|
},
|
|
67
67
|
"lint-staged": {
|
|
68
68
|
"*.{js,cjs,mjs,ts,cts,mts,jsx,tsx,json,md,yaml,yml}": [
|