ci: 添加oxlint配置并更新prettier规则
添加.oxlintrc.json配置文件以启用oxlint检查,并更新.prettierrc.cjs以支持jsonc文件格式。同时在useUpload.ts中恢复accept参数的默认值。
This commit is contained in:
parent
2fb1e6d71c
commit
305ac6dccd
11
.oxlintrc.json
Normal file
11
.oxlintrc.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"extends": ["@oxlint/recommended"],
|
||||||
|
"rules": {
|
||||||
|
"no-console": "off",
|
||||||
|
"no-unused-vars": "off"
|
||||||
|
},
|
||||||
|
"files": ["src/**/*.{js,ts,vue}"],
|
||||||
|
"vue": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
}
|
@ -10,7 +10,7 @@ module.exports = {
|
|||||||
htmlWhitespaceSensitivity: 'ignore',
|
htmlWhitespaceSensitivity: 'ignore',
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
files: '*.json',
|
files: '*.{json,jsonc}',
|
||||||
options: {
|
options: {
|
||||||
trailingComma: 'none',
|
trailingComma: 'none',
|
||||||
},
|
},
|
||||||
|
@ -20,7 +20,7 @@ export default function useUpload<T extends TfileType>(options: TOptions<T> = {}
|
|||||||
const {
|
const {
|
||||||
formData = {},
|
formData = {},
|
||||||
maxSize = 5 * 1024 * 1024,
|
maxSize = 5 * 1024 * 1024,
|
||||||
// accept = ['*'],
|
accept = ['*'],
|
||||||
fileType = 'image',
|
fileType = 'image',
|
||||||
success,
|
success,
|
||||||
error: onError,
|
error: onError,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user