@ntnyq/eslint-config 7.0.0-beta.2 → 7.0.0-beta.4
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/README.md +157 -210
- package/dist/index.d.mts +399 -174
- package/dist/index.mjs +24 -9
- package/package.json +16 -16
package/dist/index.mjs
CHANGED
|
@@ -677,8 +677,8 @@ async function ensurePackages(packages) {
|
|
|
677
677
|
try {
|
|
678
678
|
const { installPackage } = await import("@antfu/install-pkg");
|
|
679
679
|
await installPackage(nonExistingPackages, { dev: true });
|
|
680
|
-
} catch (
|
|
681
|
-
throw new Error(`Failed to install required packages: ${nonExistingPackages.join(", ")}`, { cause:
|
|
680
|
+
} catch (error) {
|
|
681
|
+
throw new Error(`Failed to install required packages: ${nonExistingPackages.join(", ")}`, { cause: error });
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
684
|
//#endregion
|
|
@@ -2010,20 +2010,27 @@ const configUnicorn = (options = {}) => {
|
|
|
2010
2010
|
"unicorn/prefer-top-level-await": "off",
|
|
2011
2011
|
"unicorn/consistent-assert": "error",
|
|
2012
2012
|
"unicorn/consistent-existence-index-check": "error",
|
|
2013
|
+
"unicorn/consistent-json-file-read": "error",
|
|
2013
2014
|
"unicorn/error-message": "error",
|
|
2014
2015
|
"unicorn/escape-case": "error",
|
|
2015
2016
|
"unicorn/new-for-builtins": "error",
|
|
2016
2017
|
"unicorn/no-accessor-recursion": "error",
|
|
2018
|
+
"unicorn/no-blob-to-file": "error",
|
|
2019
|
+
"unicorn/no-canvas-to-image": "error",
|
|
2017
2020
|
"unicorn/no-console-spaces": "error",
|
|
2018
2021
|
"unicorn/no-for-loop": "error",
|
|
2019
2022
|
"unicorn/no-hex-escape": "error",
|
|
2020
2023
|
"unicorn/no-immediate-mutation": "error",
|
|
2021
2024
|
"unicorn/no-instanceof-builtins": "error",
|
|
2025
|
+
"unicorn/no-invalid-file-input-accept": "error",
|
|
2026
|
+
"unicorn/no-late-current-target-access": "error",
|
|
2022
2027
|
"unicorn/no-lonely-if": "error",
|
|
2023
2028
|
"unicorn/no-new-buffer": "error",
|
|
2024
2029
|
"unicorn/no-static-only-class": "error",
|
|
2030
|
+
"unicorn/no-this-outside-of-class": "error",
|
|
2025
2031
|
"unicorn/no-typeof-undefined": "error",
|
|
2026
2032
|
"unicorn/no-unnecessary-await": "error",
|
|
2033
|
+
"unicorn/no-unnecessary-nested-ternary": "error",
|
|
2027
2034
|
"unicorn/no-useless-collection-argument": "error",
|
|
2028
2035
|
"unicorn/no-useless-iterator-to-array": "error",
|
|
2029
2036
|
"unicorn/prefer-class-fields": "error",
|
|
@@ -2046,7 +2053,7 @@ const configUnicorn = (options = {}) => {
|
|
|
2046
2053
|
* @pg Error
|
|
2047
2054
|
*/
|
|
2048
2055
|
"unicorn/catch-error-name": ["error", {
|
|
2049
|
-
name: "
|
|
2056
|
+
name: "error",
|
|
2050
2057
|
ignore: ["^_."]
|
|
2051
2058
|
}],
|
|
2052
2059
|
"unicorn/custom-error-definition": "error",
|
|
@@ -2058,6 +2065,7 @@ const configUnicorn = (options = {}) => {
|
|
|
2058
2065
|
*/
|
|
2059
2066
|
"unicorn/no-zero-fractions": "error",
|
|
2060
2067
|
"unicorn/number-literal-case": ["error", { hexadecimalValue: "lowercase" }],
|
|
2068
|
+
"unicorn/prefer-math-abs": "error",
|
|
2061
2069
|
"unicorn/prefer-number-properties": "error",
|
|
2062
2070
|
/**
|
|
2063
2071
|
* @pg BigInt
|
|
@@ -2066,10 +2074,6 @@ const configUnicorn = (options = {}) => {
|
|
|
2066
2074
|
/**
|
|
2067
2075
|
* @pg RegExp
|
|
2068
2076
|
*/
|
|
2069
|
-
/**
|
|
2070
|
-
* Prefer `eslint-plugin-regexp` instead
|
|
2071
|
-
*/
|
|
2072
|
-
"unicorn/better-regex": "off",
|
|
2073
2077
|
"unicorn/prefer-regexp-test": "error",
|
|
2074
2078
|
/**
|
|
2075
2079
|
* @pg Date
|
|
@@ -2081,17 +2085,21 @@ const configUnicorn = (options = {}) => {
|
|
|
2081
2085
|
*/
|
|
2082
2086
|
"unicorn/consistent-template-literal-escape": "error",
|
|
2083
2087
|
"unicorn/prefer-code-point": "error",
|
|
2088
|
+
"unicorn/prefer-string-pad-start-end": "error",
|
|
2089
|
+
"unicorn/prefer-string-repeat": "error",
|
|
2084
2090
|
"unicorn/prefer-string-slice": "error",
|
|
2085
2091
|
"unicorn/prefer-string-starts-ends-with": "error",
|
|
2086
2092
|
"unicorn/prefer-string-trim-start-end": "error",
|
|
2087
2093
|
/**
|
|
2088
2094
|
* @pg DOM
|
|
2089
2095
|
*/
|
|
2096
|
+
"unicorn/better-dom-traversing": "error",
|
|
2097
|
+
"unicorn/dom-node-dataset": "error",
|
|
2098
|
+
"unicorn/no-incorrect-query-selector": "error",
|
|
2090
2099
|
"unicorn/no-invalid-remove-event-listener": "error",
|
|
2091
2100
|
"unicorn/prefer-add-event-listener": "error",
|
|
2092
2101
|
"unicorn/prefer-classlist-toggle": "error",
|
|
2093
2102
|
"unicorn/prefer-dom-node-append": "error",
|
|
2094
|
-
"unicorn/prefer-dom-node-dataset": "error",
|
|
2095
2103
|
"unicorn/prefer-dom-node-remove": "error",
|
|
2096
2104
|
"unicorn/prefer-dom-node-text-content": "error",
|
|
2097
2105
|
"unicorn/prefer-modern-dom-apis": "error",
|
|
@@ -2107,27 +2115,34 @@ const configUnicorn = (options = {}) => {
|
|
|
2107
2115
|
*/
|
|
2108
2116
|
"unicorn/no-array-reverse": "off",
|
|
2109
2117
|
"unicorn/no-array-sort": "off",
|
|
2118
|
+
"unicorn/no-array-fill-with-reference-type": "error",
|
|
2119
|
+
"unicorn/no-array-from-fill": "error",
|
|
2110
2120
|
"unicorn/no-array-method-this-argument": "error",
|
|
2121
|
+
"unicorn/no-confusing-array-splice": "error",
|
|
2111
2122
|
"unicorn/no-new-array": "error",
|
|
2112
2123
|
"unicorn/no-unnecessary-array-flat-depth": "error",
|
|
2113
2124
|
"unicorn/no-unnecessary-array-splice-count": "error",
|
|
2114
2125
|
"unicorn/no-unnecessary-slice-end": "error",
|
|
2126
|
+
"unicorn/no-unused-array-method-return": "error",
|
|
2115
2127
|
"unicorn/prefer-array-find": "error",
|
|
2116
2128
|
"unicorn/prefer-array-flat-map": "error",
|
|
2117
2129
|
"unicorn/prefer-array-index-of": "error",
|
|
2118
2130
|
"unicorn/prefer-array-some": "error",
|
|
2131
|
+
"unicorn/prefer-includes-over-repeated-comparisons": "error",
|
|
2119
2132
|
"unicorn/prefer-single-call": "error",
|
|
2120
2133
|
"unicorn/require-array-join-separator": "error",
|
|
2121
2134
|
/**
|
|
2122
2135
|
* @pg Set
|
|
2123
2136
|
*/
|
|
2137
|
+
"unicorn/no-duplicate-set-values": "error",
|
|
2124
2138
|
"unicorn/prefer-set-has": "error",
|
|
2125
2139
|
"unicorn/prefer-set-size": "error",
|
|
2126
2140
|
/**
|
|
2127
2141
|
* @pg Module
|
|
2128
2142
|
*/
|
|
2129
|
-
"unicorn/
|
|
2143
|
+
"unicorn/no-exports-in-scripts": "error",
|
|
2130
2144
|
"unicorn/require-module-attributes": "error",
|
|
2145
|
+
"unicorn/require-module-specifiers": "error",
|
|
2131
2146
|
...options.overrides
|
|
2132
2147
|
}
|
|
2133
2148
|
}];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.4",
|
|
5
5
|
"description": "An opinionated ESLint config preset of ntnyq",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"eslint",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"tag": "next"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@html-eslint/eslint-plugin": "^0.
|
|
43
|
-
"@html-eslint/parser": "^0.
|
|
42
|
+
"@html-eslint/eslint-plugin": "^0.61.0",
|
|
43
|
+
"@html-eslint/parser": "^0.61.0",
|
|
44
44
|
"astro-eslint-parser": "^1.4.0",
|
|
45
45
|
"eslint": "^9.38.0 || ^10.0.0",
|
|
46
46
|
"eslint-plugin-astro": "^1.6.0",
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
|
|
90
90
|
"@eslint/js": "^10.0.1",
|
|
91
91
|
"@eslint/markdown": "^8.0.2",
|
|
92
|
-
"@ntnyq/utils": "^0.
|
|
92
|
+
"@ntnyq/utils": "^0.15.0",
|
|
93
93
|
"@unocss/eslint-plugin": "^66.7.0",
|
|
94
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
94
|
+
"@vitest/eslint-plugin": "^1.6.20",
|
|
95
95
|
"eslint-config-flat-gitignore": "^2.3.0",
|
|
96
96
|
"eslint-flat-config-utils": "3.2.0",
|
|
97
97
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
@@ -103,19 +103,19 @@
|
|
|
103
103
|
"eslint-plugin-depend": "^1.5.0",
|
|
104
104
|
"eslint-plugin-github-action": "^0.2.0",
|
|
105
105
|
"eslint-plugin-import-x": "^4.16.2",
|
|
106
|
-
"eslint-plugin-jsdoc": "^63.0.
|
|
106
|
+
"eslint-plugin-jsdoc": "^63.0.2",
|
|
107
107
|
"eslint-plugin-jsonc": "^3.2.0",
|
|
108
|
-
"eslint-plugin-n": "^18.0
|
|
108
|
+
"eslint-plugin-n": "^18.1.0",
|
|
109
109
|
"eslint-plugin-no-only-tests": "^3.4.0",
|
|
110
110
|
"eslint-plugin-ntnyq": "^0.14.0",
|
|
111
|
-
"eslint-plugin-oxfmt": "^0.
|
|
111
|
+
"eslint-plugin-oxfmt": "^0.10.0",
|
|
112
112
|
"eslint-plugin-perfectionist": "^5.9.0",
|
|
113
113
|
"eslint-plugin-pinia": "^0.4.2",
|
|
114
114
|
"eslint-plugin-prettier": "^5.5.6",
|
|
115
115
|
"eslint-plugin-regexp": "^3.1.0",
|
|
116
116
|
"eslint-plugin-svgo": "^0.12.0",
|
|
117
117
|
"eslint-plugin-toml": "^1.4.0",
|
|
118
|
-
"eslint-plugin-unicorn": "^
|
|
118
|
+
"eslint-plugin-unicorn": "^65.0.1",
|
|
119
119
|
"eslint-plugin-vue": "^10.9.2",
|
|
120
120
|
"eslint-plugin-yml": "^3.4.0",
|
|
121
121
|
"eslint-processor-vue-blocks": "^2.0.0",
|
|
@@ -123,15 +123,15 @@
|
|
|
123
123
|
"jsonc-eslint-parser": "^3.1.0",
|
|
124
124
|
"local-pkg": "^1.2.1",
|
|
125
125
|
"toml-eslint-parser": "^1.0.3",
|
|
126
|
-
"typescript-eslint": "^8.
|
|
126
|
+
"typescript-eslint": "^8.61.0",
|
|
127
127
|
"vue-eslint-parser": "^10.4.1",
|
|
128
128
|
"yaml-eslint-parser": "^2.0.0"
|
|
129
129
|
},
|
|
130
130
|
"devDependencies": {
|
|
131
|
-
"@types/node": "^25.9.
|
|
132
|
-
"@typescript-eslint/types": "^8.
|
|
133
|
-
"@typescript-eslint/utils": "^8.
|
|
134
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
131
|
+
"@types/node": "^25.9.2",
|
|
132
|
+
"@typescript-eslint/types": "^8.61.0",
|
|
133
|
+
"@typescript-eslint/utils": "^8.61.0",
|
|
134
|
+
"@typescript/native-preview": "^7.0.0-dev.20260610.1",
|
|
135
135
|
"bumpp": "^11.1.0",
|
|
136
136
|
"consola": "^3.4.2",
|
|
137
137
|
"eslint": "^10.4.1",
|
|
@@ -140,8 +140,8 @@
|
|
|
140
140
|
"jiti": "^2.7.0",
|
|
141
141
|
"nano-staged": "^1.0.2",
|
|
142
142
|
"npm-run-all2": "^9.0.1",
|
|
143
|
-
"oxfmt": "^0.
|
|
144
|
-
"prettier": "^3.8.
|
|
143
|
+
"oxfmt": "^0.54.0",
|
|
144
|
+
"prettier": "^3.8.4",
|
|
145
145
|
"tinyglobby": "^0.2.17",
|
|
146
146
|
"tsdown": "^0.22.2",
|
|
147
147
|
"tsx": "^4.22.4",
|