/*eslint no-irregular-whitespace: ["error", { "skipTemplates": true }]*//*eslint-env es6*/functionthing(){return`template <NBSP>string`;} When Not To Use It If you decide that you wish to use whitespace other than tabs and spaces outside of strings in your application. ...
通过以上方法,你可以有效地避免和解决“irregular whitespace not allowed no-irregular-whitespace”错误,确保代码的整洁和可维护性。
thisno-irregular-whitespaceno-iteratorno-label-varno-labelsno-lone-blocksno-lonely-ifno-loop-funcno-loss-of-precisionno-magic-numbersno-misleading-character-classno-multi-assignno-multi-strno-negated-conditionno-nested-ternaryno-newno-new-funcno-new-native-nonconstructorno-new-symbolno-new-...
The "extends": "eslint:recommended" property in a configuration file enables this rule. Invalid or irregular whitespace causes issues with ECMAScript 5 parsers and also makes code harder to debug in a similar nature to mixed tabs and spaces. Various whitespace characters can be inputted by progr...
/*eslint no-irregular-whitespace: ["error", { "skipRegExps": true }]*/function thing() { return / <NBSP>regexp/; } skipTemplates Examples of additional correct code for this rule with the { "skipTemplates": true } option: /*eslint no-irregular-whitespace: ["error", { "skipTemplat...
{ "extends": ["eslint:recommended"], "env": { "es6": true, "browser": true, "jest": true, "node": true }, "rules": { "no-unused-vars": "off", "no-irregular-whitespace": [ "error", { "skipTemplates": true } ] } } What did you do? Please include the actual source...
Related issue: #29600 (comment) Description Add no-irregular-whitespace rule for .eslintrc.json. no-irregular-whitespace has options, I think we not need it for now. https://eslint.org/docs/latest/...
这可以显示配置并且没有错误,我还可以在列表中看到我的插件配置 "error", }但是当我输入eslint index.ts时,它显示错误 1:1 error Definition for rule '@bluelovers/no-irregular-whitespace' was not found @bluelov 浏览10提问于2019-06-01得票数12 ...
no-irregular-whitespace 禁止不规则空格,无效或不规则的空格会导致 ECMAScript 5 解析器出现问题,并且还会使代码更难调试,类似于混合制表符和空格。
禁止不规则的空白 (no-irregular-whitespace) The"extends": "eslint:recommended"property in a configuration file enables this rule. 配置文件中的"extends": "eslint:recommended"属性启用了此规则。 Invalid or irregular whitespace causes issues with ECMAScript 5 parsers and also makes code harder to debu...