Skip to content

Commit

Permalink
chore: upgrade eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed Feb 25, 2024
1 parent 725b986 commit ffb2c02
Show file tree
Hide file tree
Showing 21 changed files with 1,546 additions and 1,249 deletions.
3 changes: 0 additions & 3 deletions .eslintrc

This file was deleted.

25 changes: 23 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,30 @@
"Relogin",
"mirai"
],

// 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.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
"editor.formatOnSave": false

// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml",
"toml"
]
}
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import antfu from '@antfu/eslint-config'

export default antfu()
37 changes: 18 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "mirai-ts",
"type": "module",
"version": "2.4.6",
"packageManager": "pnpm@8.1.0",
"packageManager": "pnpm@8.15.4",
"description": "Mirai TypeScript SDK",
"author": {
"name": "YunYouJun",
Expand All @@ -25,8 +26,8 @@
],
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"main": "dist/index.js",
Expand All @@ -53,29 +54,27 @@
},
"dependencies": {
"@yunyoujun/logger": "0.2.3",
"axios": "^1.3.4",
"axios": "^1.6.7",
"chalk": "4",
"form-data": "^4.0.0",
"ws": "^8.13.0"
"ws": "^8.16.0"
},
"devDependencies": {
"@antfu/eslint-config-ts": "^0.38.2",
"@types/js-yaml": "^4.0.5",
"@types/node": "^18.15.11",
"@types/ws": "^8.5.4",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/parser": "^5.57.0",
"bumpp": "^9.1.0",
"dotenv": "^16.0.3",
"eslint": "^8.37.0",
"@antfu/eslint-config": "^2.6.4",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.11.20",
"@types/ws": "^8.5.10",
"bumpp": "^9.3.0",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"husky": "8.0.3",
"js-yaml": "^4.1.0",
"lint-staged": "^13.2.0",
"prettier": "^2.8.7",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"tsup": "6.7.0",
"tsx": "^3.12.6",
"typedoc": "^0.23.28",
"typescript": "^4.9.4"
"tsx": "^4.7.1",
"typedoc": "^0.25.8",
"typescript": "^5.3.3"
},
"lint-staged": {
"*.ts": [
Expand Down
Loading

0 comments on commit ffb2c02

Please sign in to comment.