mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-08-19 18:43:53 +08:00
update: lint config
This commit is contained in:
@@ -1,25 +1,15 @@
|
|||||||
import { defineConfig } from 'eslint/config'
|
import { defineConfig } from 'eslint/config'
|
||||||
// @ts-ignore
|
import react from 'eslint-plugin-react'
|
||||||
import preact from 'eslint-config-preact'
|
import reactHooks from 'eslint-plugin-react-hooks'
|
||||||
import defaultConfig from '../../eslint.config.ts'
|
import defaultConfig from '../../eslint.config.ts'
|
||||||
|
|
||||||
export default defineConfig([
|
export default defineConfig([
|
||||||
defaultConfig,
|
defaultConfig,
|
||||||
|
{ ignores: ['dist/**', 'node_modules/**'] },
|
||||||
{
|
{
|
||||||
files: ['**/*.{js,jsx,ts,tsx}'],
|
...react.configs.flat.recommended!,
|
||||||
plugins: { ...preact.plugins },
|
settings: { react: { version: '19' } },
|
||||||
rules: { ...preact.rules },
|
|
||||||
settings: { ...preact.settings },
|
|
||||||
languageOptions: {
|
|
||||||
sourceType: 'module',
|
|
||||||
ecmaVersion: 'latest',
|
|
||||||
parserOptions: {
|
|
||||||
...preact.parserOptions,
|
|
||||||
ecmaFeatures: {
|
|
||||||
jsx: true,
|
|
||||||
...preact.parserOptions?.ecmaFeatures,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
react.configs.flat['jsx-runtime']!,
|
||||||
|
reactHooks.configs.flat.recommended,
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -23,11 +23,9 @@
|
|||||||
"@types/react": "^19.2.18",
|
"@types/react": "^19.2.18",
|
||||||
"@types/react-dom": "^19.2.4",
|
"@types/react-dom": "^19.2.4",
|
||||||
"@vitejs/plugin-react": "^6.0.5",
|
"@vitejs/plugin-react": "^6.0.5",
|
||||||
"eslint-config-react": "^1.1.7",
|
"eslint-plugin-react": "^7.37.5",
|
||||||
|
"eslint-plugin-react-hooks": "^7.1.1",
|
||||||
"vite": "^8.1.3",
|
"vite": "^8.1.3",
|
||||||
"vitest": "^4.1.10"
|
"vitest": "^4.1.10"
|
||||||
},
|
|
||||||
"eslintConfig": {
|
|
||||||
"extends": "react"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,13 @@
|
|||||||
"lint:data": "pnpm --filter @remake/data lint",
|
"lint:data": "pnpm --filter @remake/data lint",
|
||||||
"lint:condition": "pnpm --filter @remake/condition lint",
|
"lint:condition": "pnpm --filter @remake/condition lint",
|
||||||
"lint:hooks": "pnpm --filter @remake/hooks lint",
|
"lint:hooks": "pnpm --filter @remake/hooks lint",
|
||||||
|
"fix": "bunx --bun eslint --fix",
|
||||||
|
"fix:console": "pnpm --filter @remake/console lint --fix",
|
||||||
|
"fix:web": "pnpm --filter @remake/web lint --fix",
|
||||||
|
"fix:core": "pnpm --filter @remake/core lint --fix",
|
||||||
|
"fix:data": "pnpm --filter @remake/data lint --fix",
|
||||||
|
"fix:condition": "pnpm --filter @remake/condition lint --fix",
|
||||||
|
"fix:hooks": "pnpm --filter @remake/hooks lint --fix",
|
||||||
"test": "pnpm --filter @remake/web test",
|
"test": "pnpm --filter @remake/web test",
|
||||||
"test:console": "pnpm --filter @remake/console test",
|
"test:console": "pnpm --filter @remake/console test",
|
||||||
"test:web": "pnpm --filter @remake/web test",
|
"test:web": "pnpm --filter @remake/web test",
|
||||||
|
|||||||
@@ -5,10 +5,7 @@
|
|||||||
"main": "./index.ts",
|
"main": "./index.ts",
|
||||||
"author": "Vick Scarlet <vick@syaro.io>",
|
"author": "Vick Scarlet <vick@syaro.io>",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint .",
|
"lint": "bunx --bun eslint .",
|
||||||
"test": "bun test"
|
"test": "bun test"
|
||||||
},
|
|
||||||
"eslintConfig": {
|
|
||||||
"extends": "../../package.json"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"author": "Vick Scarlet <vick@syaro.io>",
|
"author": "Vick Scarlet <vick@syaro.io>",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint .",
|
"lint": "bunx --bun eslint .",
|
||||||
"test": "bun test"
|
"test": "bun test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -14,9 +14,6 @@
|
|||||||
"@remake/vitex": "workspace:*",
|
"@remake/vitex": "workspace:*",
|
||||||
"immer": "^11.1.15"
|
"immer": "^11.1.15"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
|
||||||
"extends": "../../package.json"
|
|
||||||
},
|
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"types": "./src/index.ts",
|
"types": "./src/index.ts",
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"author": "Vick Scarlet <vick@syaro.io>",
|
"author": "Vick Scarlet <vick@syaro.io>",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "bunx --bun v-transform transform -t ts -w src -d dist \"**/[!~$]*.xlsx\" --map",
|
"build": "bunx --bun v-transform transform -t ts -w src -d dist \"**/[!~$]*.xlsx\" --map",
|
||||||
"lint": "eslint .",
|
"lint": "bunx --bun eslint .",
|
||||||
"test": "bun test"
|
"test": "bun test"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
import { defineConfig } from 'eslint/config'
|
||||||
|
import react from 'eslint-plugin-react'
|
||||||
|
import reactHooks from 'eslint-plugin-react-hooks'
|
||||||
|
import defaultConfig from '../../eslint.config.ts'
|
||||||
|
|
||||||
|
export default defineConfig([
|
||||||
|
defaultConfig,
|
||||||
|
{
|
||||||
|
...react.configs.flat.recommended!,
|
||||||
|
settings: { react: { version: '19' } },
|
||||||
|
},
|
||||||
|
react.configs.flat['jsx-runtime']!,
|
||||||
|
reactHooks.configs.flat.recommended,
|
||||||
|
])
|
||||||
@@ -22,10 +22,8 @@
|
|||||||
"@testing-library/jest-dom": "^7.0.0",
|
"@testing-library/jest-dom": "^7.0.0",
|
||||||
"@testing-library/react": "^16.3.2",
|
"@testing-library/react": "^16.3.2",
|
||||||
"@types/react": "^19.2.18",
|
"@types/react": "^19.2.18",
|
||||||
"eslint-config-react": "^1.1.7"
|
"eslint-plugin-react": "^7.37.5",
|
||||||
},
|
"eslint-plugin-react-hooks": "^7.1.1"
|
||||||
"eslintConfig": {
|
|
||||||
"extends": "react"
|
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
|
|||||||
@@ -5,10 +5,7 @@
|
|||||||
"main": "./index.ts",
|
"main": "./index.ts",
|
||||||
"author": "Vick Scarlet <vick@syaro.io>",
|
"author": "Vick Scarlet <vick@syaro.io>",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint .",
|
"lint": "bunx --bun eslint .",
|
||||||
"test": "bun test"
|
"test": "bun test"
|
||||||
},
|
|
||||||
"eslintConfig": {
|
|
||||||
"extends": "../../package.json"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+1715
-246
File diff suppressed because it is too large
Load Diff
Vendored
+1
-4
@@ -5,9 +5,6 @@
|
|||||||
"main": "./index.ts",
|
"main": "./index.ts",
|
||||||
"author": "Vick Scarlet <vick@syaro.io>",
|
"author": "Vick Scarlet <vick@syaro.io>",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint ."
|
"lint": "bunx --bun eslint ."
|
||||||
},
|
|
||||||
"eslintConfig": {
|
|
||||||
"extends": "../../package.json"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user