简体   繁体   English

如何阻止 vue eslint 规则更改?

[英]How do I stop vue eslint rules from changing?

I had a team member run npm install earlier today, and now eslint want the tags to use camel case instead of dashes.今天早些时候我让一个团队成员运行 npm 安装,现在 eslint 希望标签使用驼峰式大小写而不是破折号。 That means that every single place we have a <v-btn> or a <v-tab> is getting changed to <VBtn> or <VTab> .这意味着我们拥有<v-btn><v-tab>的每个地方都将更改为<VBtn><VTab> This seems to be because of an update to eslint-plugin-vue, which changed the default for the vue/camelcase rule.这似乎是因为对 eslint-plugin-vue 的更新,它改变了vue/camelcase规则的默认值。

I fixed this in the eslint rules, but I'm not sure what other settings might change.我在 eslint 规则中修复了这个问题,但我不确定其他设置可能会改变。 Obviously we don't want the whole repository to switch styles whenever someone updates a package.显然,每当有人更新 package 时,我们不希望整个存储库切换 styles。 How can we freeze the other lint settings?我们如何冻结其他 lint 设置?

Add this rule to your eslintrc file and set it to your preferred value将此规则添加到您的 eslintrc 文件并将其设置为您的首选值

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM