Skip to content

Commit

Permalink
chore: 格式化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
yulimchen committed May 19, 2024
1 parent 5353749 commit 306dc0d
Show file tree
Hide file tree
Showing 9 changed files with 4,713 additions and 3,840 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.18.2
13 changes: 11 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"editor.formatOnSave": true,
"eslint.format.enable": true
}
"eslint.format.enable": true,
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
}
19 changes: 6 additions & 13 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,15 @@ import pluginVue from "eslint-plugin-vue";
import * as parserVue from "vue-eslint-parser";
import configPrettier from "eslint-config-prettier";
import pluginPrettier from "eslint-plugin-prettier";
import {
defineFlatConfig
} from "eslint-define-config";
import { defineFlatConfig } from "eslint-define-config";
import * as parserTypeScript from "@typescript-eslint/parser";
import pluginTypeScript from "@typescript-eslint/eslint-plugin";
import globals from 'globals';
import globals from "globals";

export default defineFlatConfig([{
export default defineFlatConfig([
{
...js.configs.recommended,
ignores: [
"**/.*",
"dist/*",
"*.d.ts",
"public/*",
"src/assets/**"
],
ignores: ["**/.*", "dist/**/*", "*.d.ts", "public/*", "src/assets/**"],
languageOptions: {
globals: globals.browser
},
Expand Down Expand Up @@ -154,4 +147,4 @@ export default defineFlatConfig([{
]
}
}
]);
]);
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
"engines": {
"node": ">= 16"
},
"type": "module",
"scripts": {
"dev": "vite",
"build": "run-p type-check build-only",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"lint:eslint": "eslint . --fix",
"lint:prettier": "prettier --write \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
"release": "standard-version",
"prepare": "husky install"
},
Expand Down Expand Up @@ -78,7 +80,10 @@
"peerDependencyRules": {
"ignoreMissing": [
"rollup"
]
],
"allowedVersions": {
"eslint": "9"
}
}
}
}
Loading

0 comments on commit 306dc0d

Please sign in to comment.