@oliver139/eslint-config 2.2.0 → 2.3.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/cli.js +2 -2
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -2
- package/package.json +4 -4
package/dist/cli.js
CHANGED
|
@@ -5,7 +5,7 @@ import c5 from "ansis";
|
|
|
5
5
|
import { cac } from "cac";
|
|
6
6
|
|
|
7
7
|
// package.json
|
|
8
|
-
var version = "2.
|
|
8
|
+
var version = "2.3.0";
|
|
9
9
|
|
|
10
10
|
// src/cli/run.ts
|
|
11
11
|
import fs3 from "node:fs";
|
|
@@ -231,7 +231,7 @@ import c3 from "ansis";
|
|
|
231
231
|
|
|
232
232
|
// src/cli/constants-generated.ts
|
|
233
233
|
var versionsMap = {
|
|
234
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
234
|
+
"@eslint-react/eslint-plugin": "^1.38.4",
|
|
235
235
|
"@unocss/eslint-plugin": "^66.0.0",
|
|
236
236
|
"astro-eslint-parser": "^1.2.2",
|
|
237
237
|
"eslint": "^9.23.0",
|
package/dist/index.d.ts
CHANGED
|
@@ -3047,6 +3047,11 @@ interface RuleOptions {
|
|
|
3047
3047
|
* @see https://eslint-react.xyz/docs/rules/jsx-no-undef
|
|
3048
3048
|
*/
|
|
3049
3049
|
'react/jsx-no-undef'?: Linter.RuleEntry<[]>
|
|
3050
|
+
/**
|
|
3051
|
+
* Marks React variables as used when JSX is used.
|
|
3052
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-uses-react
|
|
3053
|
+
*/
|
|
3054
|
+
'react/jsx-uses-react'?: Linter.RuleEntry<[]>
|
|
3050
3055
|
/**
|
|
3051
3056
|
* Marks variables used in JSX elements as used.
|
|
3052
3057
|
* @see https://eslint-react.xyz/docs/rules/jsx-uses-vars
|
package/dist/index.js
CHANGED
|
@@ -1336,6 +1336,8 @@ async function react(options = {}) {
|
|
|
1336
1336
|
name: "antfu/react/rules",
|
|
1337
1337
|
rules: {
|
|
1338
1338
|
// recommended rules from eslint-plugin-react-x https://eslint-react.xyz/docs/rules/overview#core-rules
|
|
1339
|
+
"react/jsx-no-duplicate-props": "warn",
|
|
1340
|
+
"react/jsx-uses-vars": "warn",
|
|
1339
1341
|
"react/no-access-state-in-setstate": "error",
|
|
1340
1342
|
"react/no-array-index-key": "warn",
|
|
1341
1343
|
"react/no-children-count": "warn",
|
|
@@ -1352,7 +1354,6 @@ async function react(options = {}) {
|
|
|
1352
1354
|
"react/no-create-ref": "error",
|
|
1353
1355
|
"react/no-default-props": "error",
|
|
1354
1356
|
"react/no-direct-mutation-state": "error",
|
|
1355
|
-
"react/no-duplicate-jsx-props": "warn",
|
|
1356
1357
|
"react/no-duplicate-key": "warn",
|
|
1357
1358
|
"react/no-forward-ref": "warn",
|
|
1358
1359
|
"react/no-implicit-key": "warn",
|
|
@@ -1373,7 +1374,6 @@ async function react(options = {}) {
|
|
|
1373
1374
|
"react/no-unused-state": "warn",
|
|
1374
1375
|
"react/no-use-context": "warn",
|
|
1375
1376
|
"react/no-useless-forward-ref": "warn",
|
|
1376
|
-
"react/use-jsx-vars": "warn",
|
|
1377
1377
|
// recommended rules from eslint-plugin-react-dom https://eslint-react.xyz/docs/rules/overview#dom-rules
|
|
1378
1378
|
"react-dom/no-dangerously-set-innerhtml": "warn",
|
|
1379
1379
|
"react-dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
@@ -1396,6 +1396,7 @@ async function react(options = {}) {
|
|
|
1396
1396
|
// recommended rules from eslint-plugin-react-hooks-extra https://eslint-react.xyz/docs/rules/overview#hooks-extra-rules
|
|
1397
1397
|
"react-hooks-extra/no-direct-set-state-in-use-effect": "warn",
|
|
1398
1398
|
"react-hooks-extra/no-unnecessary-use-prefix": "warn",
|
|
1399
|
+
"react-hooks-extra/prefer-use-state-lazy-initialization": "warn",
|
|
1399
1400
|
// recommended rules from eslint-plugin-react-web-api https://eslint-react.xyz/docs/rules/overview#web-api-rules
|
|
1400
1401
|
"react-web-api/no-leaked-event-listener": "warn",
|
|
1401
1402
|
"react-web-api/no-leaked-interval": "warn",
|
|
@@ -2316,6 +2317,7 @@ async function vue(options = {}) {
|
|
|
2316
2317
|
"vue/block-order": ["error", {
|
|
2317
2318
|
order: ["template", "script", "style"]
|
|
2318
2319
|
}],
|
|
2320
|
+
"vue/component-api-style ": ["error", ["script-setup", "composition"]],
|
|
2319
2321
|
"vue/component-name-in-template-casing": ["error", "PascalCase"],
|
|
2320
2322
|
"vue/component-options-name-casing": ["error", "PascalCase"],
|
|
2321
2323
|
// this is deprecated
|
|
@@ -2327,6 +2329,7 @@ async function vue(options = {}) {
|
|
|
2327
2329
|
"vue/dot-location": ["error", "property"],
|
|
2328
2330
|
"vue/dot-notation": ["error", { allowKeywords: true }],
|
|
2329
2331
|
"vue/eqeqeq": ["error", "smart"],
|
|
2332
|
+
"vue/html-button-has-type": "error",
|
|
2330
2333
|
"vue/html-indent": ["error", indent],
|
|
2331
2334
|
"vue/html-quotes": ["error", "double"],
|
|
2332
2335
|
"vue/max-attributes-per-line": ["warn", {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oliver139/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
5
5
|
"description": " Oliver's ESLint config preset powered by @antfu/eslint-config",
|
|
6
6
|
"author": "Oliver Mak <oliver139.working@gmail.com> (https://github.com/oliver139)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
30
|
+
"@eslint-react/eslint-plugin": "^1.38.4",
|
|
31
31
|
"@prettier/plugin-xml": "^3.4.1",
|
|
32
32
|
"@unocss/eslint-plugin": ">=0.50.0",
|
|
33
33
|
"astro-eslint-parser": "^1.0.2",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
},
|
|
128
128
|
"devDependencies": {
|
|
129
129
|
"@antfu/ni": "^24.3.0",
|
|
130
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
130
|
+
"@eslint-react/eslint-plugin": "^1.38.4",
|
|
131
131
|
"@eslint/config-inspector": "^1.0.2",
|
|
132
132
|
"@prettier/plugin-xml": "^3.4.1",
|
|
133
133
|
"@stylistic/eslint-plugin-migrate": "^4.2.0",
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"typescript": "^5.8.2",
|
|
160
160
|
"vitest": "^3.0.9",
|
|
161
161
|
"vue": "^3.5.13",
|
|
162
|
-
"@oliver139/eslint-config": "2.
|
|
162
|
+
"@oliver139/eslint-config": "2.3.0"
|
|
163
163
|
},
|
|
164
164
|
"simple-git-hooks": {
|
|
165
165
|
"pre-commit": "npx lint-staged"
|