Skip to content

Commit

Permalink
feat: use new eslint-config
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 21, 2023
1 parent 0bfc447 commit 220b8af
Show file tree
Hide file tree
Showing 6 changed files with 311 additions and 396 deletions.
3 changes: 0 additions & 3 deletions .eslintrc

This file was deleted.

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

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

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

// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{
"rule": "@stylistic/*",
"severity": "off"
}
],

// The following is optional.
// It's better to put under project setting `.vscode/settings.json`
// to avoid conflicts with working with different eslint configs
// that does not support all formats.
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml"
]
}
6 changes: 6 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { defineFlatConfig } from 'eslint-define-config'
import antfu from '@antfu/eslint-config'

export default defineFlatConfig([
...antfu,
])
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pkg-placeholder",
"type": "module",
"version": "0.0.0",
"packageManager": "[email protected].0",
"packageManager": "[email protected].6",
"description": "_description_",
"author": "Anthony Fu <[email protected]>",
"license": "MIT",
Expand Down Expand Up @@ -48,21 +48,22 @@
"prepare": "simple-git-hooks"
},
"devDependencies": {
"@antfu/eslint-config": "^0.41.0",
"@antfu/ni": "^0.21.6",
"@antfu/eslint-config": "^1.0.0-beta.0",
"@antfu/ni": "^0.21.8",
"@antfu/utils": "^0.7.6",
"@types/node": "^20.5.7",
"@types/node": "^20.6.3",
"bumpp": "^9.2.0",
"eslint": "^8.48.0",
"eslint": "^8.49.0",
"eslint-define-config": "^1.23.0",
"esno": "^0.17.0",
"lint-staged": "^14.0.1",
"pnpm": "^8.7.0",
"pnpm": "^8.7.6",
"rimraf": "^5.0.1",
"simple-git-hooks": "^2.9.0",
"typescript": "^5.2.2",
"unbuild": "^2.0.0",
"vite": "^4.4.9",
"vitest": "^0.34.3"
"vitest": "^0.34.5"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
Expand Down
Loading

0 comments on commit 220b8af

Please sign in to comment.