Eslint参考手册
规则 | Rules
no-tabs
一些风格指南根本不允许使用制表符,包括评论内容。
规则细节
此规则在文件内的任何位置查找制表符:代码,注释或其他任何内容。
此规则的错误代码示例:
var a /t= 2;
/**
* /t/t it's a test function
*/
function test(){}
var x = 1; // /t test
此规则的正确代码示例:
var a = 2;
/**
* it's a test function
*/
function test(){}
var x = 1; // test
何时不使用它
如果你已经制定了标签很好的标准。
兼容性
- JSCS:disallowTabs版本此规则是在ESLint 3.2.0.Resources中引入的
- Rule source
- Documentation source
规则 | Rules相关

ESLint 是一个代码规范和错误检查工具,有以下几个特性。所有东西都是可以插拔的。你可以调用任意的 rule api 或者 formatter api 去打包或者定义 rule or formatter。任意的 rule 都是独立的。没有特定的 coding style,你可以自己配置。
主页 | https://eslint.org/ |
源码 | https://github.com/eslint/eslint |
发布版本 | 4.12.0 |