ESLint:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
Kangkk​(留言 | 贡献)
第84行: 第84行:
== 示例 ==
== 示例 ==
== 技巧 ==
== 技巧 ==
== 修复代码 ==
{{hc|package.json|<syntaxhighlight lang="javascript">
  "scripts": {
    "lint": "eslint  --fix --ext .js,.vue --ignore-path .gitignore .",
  },
</syntaxhighlight>}}
运行 <syntaxhighlight lang="bash">
npm run lint</syntaxhighlight> 修复代码样式
== error ==
== error ==
* ESLint: Expected indentation of 10 spaces but found 20 spaces.(
* ESLint: Expected indentation of 10 spaces but found 20 spaces.(