chore: use new eslint

pull/38/head
xingyu 2023-10-18 15:22:29 +08:00
parent dbbc2e1939
commit 8076d0e54c
6 changed files with 475 additions and 348 deletions

View File

@ -1,11 +0,0 @@
const process = require('node:process')
process.env.ESLINT_TSCONFIG = 'tsconfig.json'
module.exports = {
extends: ['@xingyuv', '@unocss'],
rules: {
'no-console': 'off',
'vue/custom-event-name-casing': 'off',
},
}

20
.vscode/settings.json vendored
View File

@ -60,17 +60,23 @@
"path-intellisense.mappings": {
"@/": "${workspaceRoot}/src"
},
"eslint.experimental.useFlatConfig": true,
"prettier.enable": false,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports": false
"source.fixAll": "explicit",
"source.organizeImports": "never"
},
"eslint.rules.customizations": [
{
"rule": "@stylistic/*",
"severity": "off"
}
{ "rule": "style/*", "severity": "off" },
{ "rule": "*-indent", "severity": "off" },
{ "rule": "*-spacing", "severity": "off" },
{ "rule": "*-spaces", "severity": "off" },
{ "rule": "*-order", "severity": "off" },
{ "rule": "*-dangle", "severity": "off" },
{ "rule": "*-newline", "severity": "off" },
{ "rule": "*quotes", "severity": "off" },
{ "rule": "*semi", "severity": "off" }
],
"eslint.validate": [
"javascript",
@ -173,7 +179,7 @@
"*.ts": "$(capture).test.ts, $(capture).test.tsx",
"*.tsx": "$(capture).test.ts, $(capture).test.tsx",
"*.env": "$(capture).env.*",
"package.json": ".hintrc,pnpm-lock.yaml,yarn.lock,LICENSE,README*,CHANGELOG*,CNAME,.gitattributes,.gitignore,stylelint.config.js,commitlint.config.js,.stylelintignore,.prettierignore,.gitpod.yml,.eslintrc.js,.eslintignore"
"package.json": ".hintrc,pnpm-lock.yaml,yarn.lock,LICENSE,README*,CHANGELOG*,CNAME,.gitattributes,.gitignore,stylelint.config.js,eslint.config.js,commitlint.config.js,.stylelintignore,.prettierignore,.gitpod.yml,.eslintrc.js,.eslintignore"
},
"eslint.codeAction.showDocumentation": {
"enable": true

7
eslint.config.js Normal file
View File

@ -0,0 +1,7 @@
const antfu = require('@antfu/eslint-config').default
const unocss = require('@unocss/eslint-plugin')
module.exports = antfu(
{},
unocss.configs.flat,
)

View File

@ -82,6 +82,7 @@
"xlsx": "^0.18.5"
},
"devDependencies": {
"@antfu/eslint-config": "^1.0.0-beta.27",
"@commitlint/cli": "^17.8.0",
"@commitlint/config-conventional": "^17.8.0",
"@iconify/json": "^2.2.129",
@ -99,7 +100,6 @@
"@vitejs/plugin-vue": "4.4.0",
"@vitejs/plugin-vue-jsx": "^3.0.2",
"@vue/compiler-sfc": "^3.3.4",
"@xingyuv/eslint-config": "^0.2.0",
"cross-env": "^7.0.3",
"cz-git": "^1.7.1",
"czg": "^1.7.1",

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,11 @@
{
"compilerOptions": {
"target": "esnext",
"lib": ["dom", "esnext"],
"target": "ESNext",
"lib": ["DOM", "ESNext"],
"jsx": "preserve",
"experimentalDecorators": true,
"noLib": false,
"module": "esnext",
"module": "ESNext",
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
@ -37,5 +37,5 @@
"build/**/*.d.ts",
"vite.config.ts"
],
"exclude": ["node_modules", "dist", "**/*.js"]
"exclude": ["node_modules", "dist"]
}