非常教程

Eslint参考手册

规则 | Rules

规则 | Rules

规则 | Rules
accessor-pairs 详细
array-bracket-newline 详细
array-bracket-spacing 详细
array-callback-return 详细
array-element-newline 详细
arrow-body-style 详细
arrow-parens 详细
arrow-spacing 详细
block-scoped-var 详细
block-spacing 详细
brace-style 详细
callback-return 详细
camelcase 详细
capitalized-comments 详细
class-methods-use-this 详细
comma-dangle 详细
comma-spacing 详细
comma-style 详细
complexity 详细
computed-property-spacing 详细
consistent-return 详细
consistent-this 详细
constructor-super 详细
curly 详细
default-case 详细
dot-location 详细
dot-notation 详细
eol-last 详细
eqeqeq 详细
for-direction 详细
func-call-spacing 详细
func-name-matching 详细
func-names 详细
func-style 详细
function-paren-newline 详细
generator-star 详细
generator-star-spacing 详细
getter-return 详细
global-require 详细
global-strict 详细
guard-for-in 详细
handle-callback-err 详细
id-blacklist 详细
id-length 详细
id-match 详细
implicit-arrow-linebreak 详细
indent 详细
indent-legacy 详细
init-declarations 详细
jsx-quotes 详细
key-spacing 详细
keyword-spacing 详细
line-comment-position 详细
linebreak-style 详细
lines-around-comment 详细
lines-around-directive 详细
lines-between-class-members 详细
max-depth 详细
max-len 详细
max-lines 详细
max-nested-callbacks 详细
max-params 详细
max-statements 详细
max-statements-per-line 详细
multiline-comment-style 详细
multiline-ternary 详细
new-cap 详细
new-parens 详细
newline-after-var 详细
newline-before-return 详细
newline-per-chained-call 详细
no-alert 详细
no-array-constructor 详细
no-arrow-condition 详细
no-await-in-loop 详细
no-bitwise 详细
no-buffer-constructor 详细
no-caller 详细
no-case-declarations 详细
no-catch-shadow 详细
no-class-assign 详细
no-comma-dangle 详细
no-compare-neg-zero 详细
no-cond-assign 详细
no-confusing-arrow 详细
no-console 详细
no-const-assign 详细
no-constant-condition 详细
no-continue 详细
no-control-regex 详细
no-debugger 详细
no-delete-var 详细
no-div-regex 详细
no-dupe-args 详细
no-dupe-class-members 详细
no-dupe-keys 详细
no-duplicate-case 详细
no-duplicate-imports 详细
no-else-return 详细
no-empty 详细
no-empty-character-class 详细
no-empty-class 详细
no-empty-function 详细
no-empty-label 详细
no-empty-pattern 详细
no-eq-null 详细
no-eval 详细
no-ex-assign 详细
no-extend-native 详细
no-extra-bind 详细
no-extra-boolean-cast 详细
no-extra-label 详细
no-extra-parens 详细
no-extra-semi 详细
no-extra-strict 详细
no-fallthrough 详细
no-floating-decimal 详细
no-func-assign 详细
no-global-assign 详细
no-implicit-coercion 详细
no-implicit-globals 详细
no-implied-eval 详细
no-inline-comments 详细
no-inner-declarations 详细
no-invalid-regexp 详细
no-invalid-this 详细
no-irregular-whitespace 详细
no-iterator 详细
no-label-var 详细
no-labels 详细
no-lone-blocks 详细
no-lonely-if 详细
no-loop-func 详细
no-magic-numbers 详细
no-mixed-operators 详细
no-mixed-requires 详细
no-mixed-spaces-and-tabs 详细
no-multi-assign 详细
no-multi-spaces 详细
no-multi-str 详细
no-multiple-empty-lines 详细
no-native-reassign 详细
no-negated-condition 详细
no-negated-in-lhs 详细
no-nested-ternary 详细
no-new 详细
no-new-func 详细
no-new-object 详细
no-new-require 详细
no-new-symbol 详细
no-new-wrappers 详细
no-obj-calls 详细
no-octal 详细
no-octal-escape 详细
no-param-reassign 详细
no-path-concat 详细
no-plusplus 详细
no-process-env 详细
no-process-exit 详细
no-proto 详细
no-prototype-builtins 详细
no-redeclare 详细
no-regex-spaces 详细
no-reserved-keys 详细
no-restricted-globals 详细
no-restricted-imports 详细
no-restricted-modules 详细
no-restricted-properties 详细
no-restricted-syntax 详细
no-return-assign 详细
no-return-await 详细
no-script-url 详细
no-self-assign 详细
no-self-compare 详细
no-sequences 详细
no-shadow 详细
no-shadow-restricted-names 详细
no-space-before-semi 详细
no-spaced-func 详细
no-sparse-arrays 详细
no-sync 详细
no-tabs 详细
no-template-curly-in-string 详细
no-ternary 详细
no-this-before-super 详细
no-throw-literal 详细
no-trailing-spaces 详细
no-undef 详细
no-undef-init 详细
no-undefined 详细
no-underscore-dangle 详细
no-unexpected-multiline 详细
no-unmodified-loop-condition 详细
no-unneeded-ternary 详细
no-unreachable 详细
no-unsafe-finally 详细
no-unsafe-negation 详细
no-unused-expressions 详细
no-unused-labels 详细
no-unused-vars 详细
no-use-before-define 详细
no-useless-call 详细
no-useless-computed-key 详细
no-useless-concat 详细
no-useless-constructor 详细
no-useless-escape 详细
no-useless-rename 详细
no-useless-return 详细
no-var 详细
no-void 详细
no-warning-comments 详细
no-whitespace-before-property 详细
no-with 详细
no-wrap-func 详细
nonblock-statement-body-position 详细
object-curly-newline 详细
object-curly-spacing 详细
object-property-newline 详细
object-shorthand 详细
one-var 详细
one-var-declaration-per-line 详细
operator-assignment 详细
operator-linebreak 详细
padded-blocks 详细
padding-line-between-statements 详细
prefer-arrow-callback 详细
prefer-const 详细
prefer-destructuring 详细
prefer-numeric-literals 详细
prefer-promise-reject-errors 详细
prefer-reflect 详细
prefer-rest-params 详细
prefer-spread 详细
prefer-template 详细
quote-props 详细
quotes 详细
radix 详细
require-await 详细
require-jsdoc 详细
require-yield 详细
rest-spread-spacing 详细
Rules 详细
semi 详细
semi-spacing 详细
semi-style 详细
sort-imports 详细
sort-keys 详细
sort-vars 详细
space-after-function-name 详细
space-after-keywords 详细
space-before-blocks 详细
space-before-function-paren 详细
space-before-function-parentheses 详细
space-before-keywords 详细
space-in-brackets 详细
space-in-parens 详细
space-infix-ops 详细
space-return-throw-case 详细
space-unary-ops 详细
space-unary-word-ops 详细
spaced-comment 详细
spaced-line-comment 详细
strict 详细
switch-colon-spacing 详细
symbol-description 详细
template-curly-spacing 详细
template-tag-spacing 详细
unicode-bom 详细
use-isnan 详细
valid-jsdoc 详细
valid-typeof 详细
vars-on-top 详细
wrap-iife 详细
wrap-regex 详细
yield-star-spacing 详细
yoda 详细
Eslint

ESLint 是一个代码规范和错误检查工具,有以下几个特性。所有东西都是可以插拔的。你可以调用任意的 rule api 或者 formatter api 去打包或者定义 rule or formatter。任意的 rule 都是独立的。没有特定的 coding style,你可以自己配置。

主页 https://eslint.org/
源码 https://github.com/eslint/eslint
发布版本 4.12.0