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

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.xdnf.cn/news/12367.html

相关文章:

  • 第一章:多模态AI导论 —— 感知、理解与交互的智能新纪元
  • thinkphp8.1 调用巨量广告API接口,刷新token
  • 测试W5500的第11步_使用ARP解析IP地址对应的MAC地址
  • 以光量子为例,详解量子获取方式
  • 使用 async/await 封装 wx.request 请求
  • NLP学习路线图(二十五):注意力机制
  • 会计 - 金融负债和权益工具
  • NC | 基于语言模型的药物设计新方法
  • jenkins脚本查看及备份
  • AppTrace技术全景:开发者视角下的工具链与实践经验
  • 人工智能的社交课:从博弈游戏到健康关怀
  • .Net Framework 4/C# LINQ*
  • Python----目标检测(yolov5-7.0安装及训练细胞)
  • 国芯思辰|SCS5501/5502芯片组打破技术壁垒,重构车载视频传输链路,兼容MAX9295A/MAX96717
  • Python爬虫实战:研究RoboBrowser库相关技术
  • [大语言模型]在个人电脑上部署ollama 并进行管理,最后配置AI程序开发助手.
  • 国内头部的UWB企业介绍之品铂科技
  • 关于根据词库分词的算法逻辑实现(最长词汇匹配原则)
  • 6月5日day45
  • 《Pytorch深度学习实践》ch8-多分类
  • 空间利用率提升90%!小程序侧边导航设计与高级交互实现
  • 【p2p、分布式,区块链笔记 MESH】Bluetooth蓝牙通信拓扑与操作 BR/EDR(经典蓝牙)和 BLE
  • 从0开始学习R语言--Day17--Cox回归
  • 深度学习张量
  • Postman接口测试之postman设置接口关联,实现参数化
  • selinux firewalld
  • 将HTML内容转换为Canvas图像,主流方法有效防止文本复制
  • RunnablePassthrough介绍和透传参数实战
  • Kinova机械臂在Atlas手术导航系统中的核心作用
  • 外网访问内网服务器常用的三种简单操作步骤方法,本地搭建网址轻松让公网连接