javascript - Javascript 文件由 eslintrc.json 自动更改
问题描述
在 Visual Studio 2015 中,我们有一个包含 c# 和 javascript 文件的解决方案。对于 javascript 文件,我们使用 .eslintrc.json 文件进行代码约定。但是,每次我构建解决方案时,这些文件都会自动更改为此 .eslintrc.json 中的设置(例如将双引号更改为单引号)。有没有办法防止它自动重构everyting,而是给出警告或其他东西?
{
"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”中定义的,它扩展了,但我也找不到任何东西。
谢谢!
解决方案
推荐阅读
- php - 尽管在我的控制器中定义了路由,但无法重定向到路由 [Symfony]
- mongodb - 无法从 Docker 中的 Flask GET 和 POST 数据到 MongoDB
- powershell - 静默模式下的 ISDeploymentWizard 状态
- python - Python中不止两个变量的相关系数
- entity-framework-core - 创建基于角色的动态授权
- julia - in() 函数或 in 运算符的广播版本?
- tibco-ems - 无法连接到“ems”:错误=11,消息=未连接服务器
- powerbi - 对于在 Toad 中快速运行的同一查询,Power BI 运行速度非常慢
- wordpress - 使用 GA 或 FB Pixel 跟踪联属网络营销转化
- python-3.x - matplotlib 在所有 ImageGrid 轴上打勾