如何解决eslintrc.json 自动更改 JavaScript 文件
在 Visual Studio 2015 中,我们有一个包含 c# 和 javascript 文件的解决方案。对于 javascript 文件,我们使用 .eslintrc.json 文件进行代码约定。但是,每次我构建解决方案时,这些文件都会自动更改为此 .eslintrc.json 中的设置(例如,将双引号更改为单引号)。有没有办法防止它自动重构一切,而是给出警告或其他什么?
{
"extends": [
"airbnb-base"
],"rules": {
"semi": [ "warn","always" ],"max-len": [ "warn",200 ],"arrow-body-style": [ "error","as-needed" ],"indent": [
"warn",2,{ "SwitchCase": 1 }
],"no-param-reassign": [
"error",{ "props": true }
],"space-before-function-paren": [
"error",{
"anonymous": "never","named": "never","asyncArrow": "ignore"
}
],"eqeqeq": "warn","no-restricted-syntax": "warn","no-underscore-dangle": 0,"class-methods-use-this": 0,"no-plusplus": 0,"linebreak-style": 0,"no-confusing-arrow": 0,"no-mixed-operators": 0,"func-names": 0,"no-console": 0,"no-use-before-define": 0,"comma-dangle": 0,"guard-for-in": 0,"no-extend-native": 0,"no-empty": 0
},"globals": {
"Utils": false,"location": false,"fetch": false,"webApi": false,"$": false,"window": false,"document": false,"console": false,"GeoSettings": false,"localStorage": false,"sessionStorage": false,"BPlanInteractions": false,"navigator": false,"saveAs": false,"HTMLCanvasElement": false,"atob": false,"Blob": false
}
}
我想也许它是在“airbnb-base”中定义的,它扩展了,但我在那里也找不到任何东西。
谢谢!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。