当前位置: 首页 > news >正文

vue3 eslint ts 关闭多单词命名检查

无效做法

import { globalIgnores } from 'eslint/config'
import {defineConfigWithVueTs,vueTsConfigs,
} from '@vue/eslint-config-typescript'
import pluginVue from 'eslint-plugin-vue'
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
// import { configureVueProject } from '@vue/eslint-config-typescript'
// configureVueProject({ scriptLangs: ['ts', 'tsx'] })
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setupexport default defineConfigWithVueTs({name: 'app/files-to-lint',files: ['**/*.{ts,mts,tsx,vue}'],// 添加规则配置,关闭组件双单词命名检查rules: {'vue/multi-word-component-names': 'off',},},globalIgnores(['**/dist/**','**/dist-ssr/**','**/coverage/**',]),pluginVue.configs['flat/essential'],vueTsConfigs.recommended,skipFormatting,
)

原因:后面 

pluginVue.configs['flat/essential'],

  vueTsConfigs.recommended,

  skipFormatting,

有可能覆盖 前面 off 的配置

故配置为

import { globalIgnores } from 'eslint/config'
import {defineConfigWithVueTs,vueTsConfigs,
} from '@vue/eslint-config-typescript'
import pluginVue from 'eslint-plugin-vue'
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
// import { configureVueProject } from '@vue/eslint-config-typescript'
// configureVueProject({ scriptLangs: ['ts', 'tsx'] })
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setupexport default defineConfigWithVueTs({name: 'app/files-to-lint',files: ['**/*.{ts,mts,tsx,vue}'],},globalIgnores(['**/dist/**','**/dist-ssr/**','**/coverage/**',]),pluginVue.configs['flat/essential'],vueTsConfigs.recommended,skipFormatting,// 将规则配置放在最后,确保不会被覆盖{rules: {'vue/multi-word-component-names': 'off',},},
)

http://www.lqws.cn/news/161371.html

相关文章:

  • AirSim/Cosys-AirSim 游戏开发(二)使用自定义场景
  • 大模型学习
  • adb 连不上真机设备问题汇总
  • uniapp微信小程序视频实时流+pc端预览方案
  • 音视频之视频压缩编码的基本原理
  • Rust Floem UI 框架使用简介
  • 从《现实不似你所见》探寻与缘起性空的思想交织
  • OPenCV CUDA模块目标检测----- HOG 特征提取和目标检测类cv::cuda::HOG
  • 基于STM32设计的水资源监测系统
  • 前缀和题目:逐步求和得到正数的最小值
  • PySpark性能调优手册:大数据处理中的避坑与实践
  • 最小硬件系统概念及其组成
  • 数据质量是什么意思?怎样做好数据质量监控?
  • ROS2 节点类中要避免While true 循环
  • Spring AI(11)——SSE传输的MCP服务端
  • 拷贝构造函数
  • (头歌作业)-6.5 幻方(project)
  • 在使用一些不用驱动大电流的设备就可以用stm32的自己的上下拉但是本身上下拉不就是给iicspi这些他通信给信号的吗中怎么还跟驱动能力扯上了有什么场景嘛
  • ProfiNet 分布式 IO 在某污水处理厂的应用
  • 自定义注解facade 实现切面 进行日志记录和参数校验
  • 智能标志桩图像监测装置如何守护地下电缆安全
  • html-pre标签
  • LeetCode 461.汉明距离
  • Spring MVC 之 异常处理
  • 简化复杂系统的优雅之道:深入解析 Java 外观模式
  • 数字证书_CA_详解
  • 2025年- H71-Lc179--39.组合总和(回溯,组合)--Java版
  • 二叉树的遍历总结
  • jdbc查询mysql数据库时,出现id顺序错误的情况
  • C:\Users\中文名修改为英文名