如何将忽略Eslint文件校验设置成长尾词?
- 内容介绍
- 文章标签
- 相关推荐
本文共计130个文字,预计阅读时间需要1分钟。
打开 ESLint 的配置文件 `.eslintrc.js`,配置如下:
javascriptrules: { allowasync-await: off, allowdebugger: off, no-console: off}
打开eslint的配置文件.eslintrc.jsrules:{allowasync-awaitgenerator-star-spacing:off,allowdebuggerdu打开eslint的配置文件.eslintrc.js
rules: {// allow async-awaitgenerator-star-spacing: off,// allow debugger during developmentno-console: off, // 在这里禁止掉console报错检查no-debugger: process.env.NODE_ENV production ? error : off,indent: off,no-irregular-whitespace: off, // 这里禁止掉 空格报错检查"space-before-function-paren": off, // 方法名和刮号之间需要有一格空格object-curly-spacing: off, }
在rules最后添加’indent’并设置为off或0
indent是eslint的一个检查规则eslint常用的有十几个规则不想用那个规则检查就设置该规则为off就可以了。
本文共计130个文字,预计阅读时间需要1分钟。
打开 ESLint 的配置文件 `.eslintrc.js`,配置如下:
javascriptrules: { allowasync-await: off, allowdebugger: off, no-console: off}
打开eslint的配置文件.eslintrc.jsrules:{allowasync-awaitgenerator-star-spacing:off,allowdebuggerdu打开eslint的配置文件.eslintrc.js
rules: {// allow async-awaitgenerator-star-spacing: off,// allow debugger during developmentno-console: off, // 在这里禁止掉console报错检查no-debugger: process.env.NODE_ENV production ? error : off,indent: off,no-irregular-whitespace: off, // 这里禁止掉 空格报错检查"space-before-function-paren": off, // 方法名和刮号之间需要有一格空格object-curly-spacing: off, }
在rules最后添加’indent’并设置为off或0
indent是eslint的一个检查规则eslint常用的有十几个规则不想用那个规则检查就设置该规则为off就可以了。

