shuishen
2025-09-29 dc22b04789169c9c343418eeaa46545c8fe6fd24
feat:eslint配置项调整
2 files modified
26 ■■■■ changed files
eslint.config.js 20 ●●●● patch | view | raw | blame | history
src/api/common/index.js 6 ●●●● patch | view | raw | blame | history
eslint.config.js
@@ -1,4 +1,4 @@
import antfu from '@antfu/eslint-config';
import antfu from '@antfu/eslint-config'
export default antfu(
  {
@@ -21,12 +21,12 @@
      'vue/block-order': ['error', {
        order: ['template', 'script', 'style'],
      }],
      // 需要尾随逗号
      'comma-dangle': ['error', 'only-multiline'],
      // 不需要尾随逗号
      'comma-dangle': ['error', 'never'],
      // 允许console
      'no-console': 'off',
      // 需要分号
      'style/semi': ['error', 'always'],
      // 不需要分号
      'style/semi': ['error', 'never'],
      // 块内的空行
      'padded-blocks': ['error', 'never'],
      // 顶级函数应使用 function 关键字声明
@@ -35,14 +35,14 @@
      'node/prefer-global/process': 'off',
      // 禁止未使用的捕获组
      'regexp/no-unused-capturing-group': 'off',
      // 允许接口和类型别名中的成员之间使用三个分隔符
      // 允许接口和类型别名中的成员之间不使用分隔符
      'style/member-delimiter-style': ['error', {
        multiline: {
          delimiter: 'semi',
          requireLast: true,
          delimiter: 'none',
          requireLast: false,
        },
        singleline: {
          delimiter: 'semi',
          delimiter: 'none',
          requireLast: false,
        },
        multilineDetection: 'brackets',
@@ -51,4 +51,4 @@
      'antfu/if-newline': 'off',
    },
  },
);
)
src/api/common/index.js
@@ -1,8 +1,8 @@
import { post, upload } from "@/utils/request"
import { post, upload } from '@/utils/request'
// 文件上传
export const uploadFile = filePath =>
  upload("/common/upload", { filePath, name: "file" })
  upload('/common/upload', { filePath, name: 'file' })
// 发送验证码
export const sendCode = data => post("/sendCode", { data })
export const sendCode = data => post('/sendCode', { data })