Skip to content

Commit

Permalink
chore: change to @antfu/eslint-config
Browse files Browse the repository at this point in the history
  • Loading branch information
hannoeru committed Jul 1, 2024
1 parent 6499ed1 commit 9fa82a9
Show file tree
Hide file tree
Showing 6 changed files with 937 additions and 1,528 deletions.
4 changes: 0 additions & 4 deletions .eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
test:
strategy:
matrix:
node: [16, 18, 20]
node: [18, 20]

runs-on: ubuntu-latest

Expand Down
43 changes: 43 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"eslint.enable": true,
// Enable the ESlint flat config support
"eslint.useFlatConfig": true,

// 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": "*-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"
],
"references.preferredLocation": "peek"
}
5 changes: 5 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import antfu from '@antfu/eslint-config'

export default await antfu({
ignores: ['test/fixtures']
})
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"unplugin": "^1.11.0"
},
"devDependencies": {
"@hannoeru/eslint-config": "^0.9.7",
"@antfu/eslint-config": "^2.21.2",
"@swc/core": "^1.6.6",
"@types/node": "^20.14.9",
"defu": "^6.1.4",
Expand Down
Loading

0 comments on commit 9fa82a9

Please sign in to comment.