@ocavue/eslint-config 1.7.0 → 1.9.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/src/react.d.ts.map +1 -1
- package/dist/src/typescript.d.ts.map +1 -1
- package/package.json +10 -10
- package/src/react.js +7 -11
- package/src/typescript.js +1 -0
package/dist/src/react.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/react.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/react.js"],"names":[],"mappings":"AAYA,mGAiCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/typescript.js"],"names":[],"mappings":"AAWA,
|
|
1
|
+
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/typescript.js"],"names":[],"mappings":"AAWA,wGA6FC;;qBAnGoB,mBAAmB"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ocavue/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
5
|
-
"packageManager": "pnpm@8.15.
|
|
4
|
+
"version": "1.9.0",
|
|
5
|
+
"packageManager": "pnpm@8.15.9",
|
|
6
6
|
"description": "",
|
|
7
7
|
"author": "ocavue <ocavue@gmail.com>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@eslint-types/typescript-eslint": "^7.5.0",
|
|
35
35
|
"@eslint-types/unicorn": "^52.0.0",
|
|
36
|
-
"@types/eslint": "^8.56.
|
|
36
|
+
"@types/eslint": "^8.56.11",
|
|
37
37
|
"@types/eslint-plugin-markdown": "^2.0.2",
|
|
38
38
|
"eslint-config-prettier": "^9.1.0",
|
|
39
39
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
@@ -41,21 +41,21 @@
|
|
|
41
41
|
"eslint-plugin-deprecation": "^3.0.0",
|
|
42
42
|
"eslint-plugin-import": "^2.29.1",
|
|
43
43
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
44
|
-
"eslint-plugin-markdown": "^5.
|
|
44
|
+
"eslint-plugin-markdown": "^5.1.0",
|
|
45
45
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
46
|
-
"eslint-plugin-react": "^7.
|
|
46
|
+
"eslint-plugin-react": "^7.35.0",
|
|
47
47
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
48
48
|
"eslint-plugin-unicorn": "^54.0.0",
|
|
49
49
|
"jsonc-eslint-parser": "^2.4.0",
|
|
50
|
-
"typescript-eslint": "^7.
|
|
50
|
+
"typescript-eslint": "^7.17.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@antfu/ni": "^0.
|
|
53
|
+
"@antfu/ni": "^0.22.0",
|
|
54
54
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
55
|
-
"@types/node": "^20.14.
|
|
55
|
+
"@types/node": "^20.14.12",
|
|
56
56
|
"eslint": "^8.57.0",
|
|
57
|
-
"prettier": "^3.3.
|
|
58
|
-
"typescript": "^5.5.
|
|
57
|
+
"prettier": "^3.3.3",
|
|
58
|
+
"typescript": "^5.5.4"
|
|
59
59
|
},
|
|
60
60
|
"renovate": {
|
|
61
61
|
"extends": [
|
package/src/react.js
CHANGED
|
@@ -7,34 +7,30 @@ import reactHooksPlugin from 'eslint-plugin-react-hooks'
|
|
|
7
7
|
|
|
8
8
|
import { GLOB_TS, GLOB_TSX } from './shared.js'
|
|
9
9
|
|
|
10
|
+
/** @type {import('eslint').Linter.FlatConfig} */
|
|
11
|
+
const reactRecommended = reactPlugin.configs.flat.recommended
|
|
12
|
+
|
|
10
13
|
export function react() {
|
|
11
14
|
/** @type {import('eslint').Linter.FlatConfig[]} */
|
|
12
15
|
const config = [
|
|
13
16
|
{
|
|
17
|
+
...reactRecommended,
|
|
18
|
+
name: 'react',
|
|
14
19
|
files: [GLOB_TS, GLOB_TSX],
|
|
15
|
-
plugins: {
|
|
16
|
-
react: reactPlugin,
|
|
17
|
-
},
|
|
18
|
-
languageOptions: {
|
|
19
|
-
parserOptions: {
|
|
20
|
-
ecmaFeatures: {
|
|
21
|
-
jsx: true,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
20
|
settings: {
|
|
26
21
|
react: {
|
|
27
22
|
version: 'detect',
|
|
28
23
|
},
|
|
29
24
|
},
|
|
30
25
|
rules: {
|
|
31
|
-
...
|
|
26
|
+
...reactRecommended.rules,
|
|
32
27
|
'react/prop-types': 'off',
|
|
33
28
|
'react/react-in-jsx-scope': 'off',
|
|
34
29
|
},
|
|
35
30
|
},
|
|
36
31
|
|
|
37
32
|
{
|
|
33
|
+
name: 'react-hooks',
|
|
38
34
|
files: [GLOB_TS, GLOB_TSX],
|
|
39
35
|
plugins: {
|
|
40
36
|
'react-hooks': reactHooksPlugin,
|
package/src/typescript.js
CHANGED
|
@@ -43,6 +43,7 @@ export function typescript() {
|
|
|
43
43
|
'@typescript-eslint/consistent-indexed-object-style': 'off',
|
|
44
44
|
'@typescript-eslint/array-type': 'off',
|
|
45
45
|
'@typescript-eslint/dot-notation': 'off',
|
|
46
|
+
'@typescript-eslint/no-unnecessary-parameter-property-assignment': 'warn',
|
|
46
47
|
'@typescript-eslint/restrict-plus-operands': 'warn',
|
|
47
48
|
'@typescript-eslint/no-unsafe-call': 'warn',
|
|
48
49
|
'@typescript-eslint/no-unsafe-return': 'warn',
|