Skip to content

Commit

Permalink
chore: Update ESLint configuration and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacicada committed Dec 1, 2023
1 parent f9daeda commit ae8b133
Show file tree
Hide file tree
Showing 6 changed files with 1,558 additions and 1,242 deletions.
7 changes: 0 additions & 7 deletions .eslintrc

This file was deleted.

43 changes: 24 additions & 19 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,41 @@
{
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,

// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,

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

"[vue]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[js]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[ts]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
// 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"
],

"files.exclude": {
"**/node_modules": true
}
]
}
8 changes: 8 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import antfu from '@antfu/eslint-config'

export default antfu({
root: true,
rules: {
curly: ['error', 'all'],
},
})
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,17 @@
"build": "unbuild",
"release": "changelogen --release",
"typecheck": "tsc --noEmit",
"lint": "eslint ."
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@stripe/stripe-js": "^1.54.1"
},
"devDependencies": {
"@antfu/eslint-config": "^0.39.4",
"changelogen": "^0.5.3",
"eslint": "^8.42.0",
"typescript": "^5.1.6",
"unbuild": "^1.2.1"
"@antfu/eslint-config": "^2.1.2",
"changelogen": "^0.5.5",
"eslint": "^8.54.0",
"typescript": "^5.3.2",
"unbuild": "^2.0.0"
}
}
}
Loading

0 comments on commit ae8b133

Please sign in to comment.