Skip to content

Commit

Permalink
chore: update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
YangFong committed Jul 6, 2024
1 parent dc1093a commit 1e70e0a
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 36 deletions.
25 changes: 0 additions & 25 deletions .eslintrc.js

This file was deleted.

49 changes: 49 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},

// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off" },
{ "rule": "format/*", "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" }
],

// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml",
"toml",
"xml",
"gql",
"graphql",
"astro",
"css",
"less",
"scss",
"pcss",
"postcss"
]
}
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

15 changes: 15 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import antfu from '@antfu/eslint-config'

export default antfu({
vue: true,
unocss: true,
typescript: true,
ignores: [`src/assets/scripts/renderers`],
rules: {
'semi': [`error`, `never`],
'quotes': [`error`, `backtick`],
'no-unused-vars': `off`,
'no-console': `off`,
'no-debugger': `off`,
},
})
11 changes: 3 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,14 @@
"vue": "^3.4.29"
},
"devDependencies": {
"@antfu/eslint-config": "2.22.0-beta.1",
"@unocss/eslint-plugin": "^0.61.2",
"@vitejs/plugin-vue": "^5.0.5",
"@vue/cli-plugin-babel": "^4.5.19",
"@vue/cli-plugin-eslint": "^4.5.19",
"@vue/cli-service": "^4.5.15",
"@vue/eslint-config-prettier": "^6.0.0",
"async-validator": "^4.0.7",
"babel-eslint": "^10.1.0",
"babel-plugin-import": "^1.13.3",
"cache-loader": "^4.1.0",
"cross-env": "^7.0.3",
"eslint": "^6.8.0",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-vue": "^6.2.2",
"eslint": "^9.6.0",
"less": "^4.1.2",
"less-loader": "^7.3.0",
"mini-types": "*",
Expand Down

0 comments on commit 1e70e0a

Please sign in to comment.