1.0.4 • Published 5 years ago

eslint-config-promise-react v1.0.4

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

eslint-config-promise

0: tip nothing 1: warn 2: error

leveldescriptioneslint
0一行代码长度不超过 80enforce a maximum line length (max-len)
0重叠作用域内变量同名disallow variable declarations from shadowing variables declared in the outer scope (no-shadow)
0末尾分号必写require or disallow semicolons instead of ASI (semi)
0不对函数参数直接做修改操作Disallow Reassignment of Function Parameters (no-param-reassign)
2最后一行代码后必须要有空行require or disallow newline at the end of files (eol-last)
2对象最后属性或数组最后元素后不加逗号require or disallow trailing commas (comma-dangle)
2不严格要求驼峰风格Require Camelcase (camelcase)
2函数 () 内需要空格相邻符号可以省略Disallow or enforce spaces inside of parentheses (space-in-parens)
2对象属性采用简略风格Require Object Literal Shorthand Syntax (object-shorthand)
2{} 内需要空格相邻符号可以省略enforce consistent spacing inside braces (object-curly-spacing)
2[] 内需要空格相邻符号或单元素可以省略Disallow or enforce spaces inside of brackets (array-bracket-spacing)
2回调函数用箭头函数Suggest using arrow functions as callbacks. (prefer-arrow-callback)
0箭头函数风格不强制Require parens in arrow function arguments (arrow-parens)
0箭头函数风格不强制Require braces in arrow function body (arrow-body-style)
2函数 () 前不加空格Require or disallow a space before function parenthesis (space-before-function-paren)
2函数 return 不强制指定值require return statements to either always or never specify values (consistent-return)
0允许运算符 ++ --disallow the unary operators ++ and -- (no-plusplus)
2忽略 _ 开头结尾的参数/caughtErrorsDisallow Unused Variables (no-unused-vars)
0变量或属性中允许 _disallow dangling underscores in identifiers (no-underscore-dangle)
0代码块中首尾不强制空行require or disallow padding within blocks (padded-blocks)
1多种优先级的运算符混合加括号,同级可不加Disallow mixes of different operators (no-mixed-operators)
0三元运算可以嵌套使用disallow nested ternary expressions (no-nested-ternary)
0允许位运算符disallow bitwise operators (no-bitwise)
1异步函数中必须有 yieldDisallow generator functions that do not have yield (require-yield)
0类函数中可以不使用 thisEnforce that class methods utilize this (class-methods-use-this)
2允许无返回表达式Disallow Unused Expressions (no-unused-expressions)
0引入文件不强制加后缀名eslint-plugin-import/extensions
0import 后不强制加空行eslint-plugin-import/newline-after-import
0静态标签可以添加交互事件eslint-plugin-jsx-a11y/no-static-element-interactions
0第一个属性不强制换行eslint-plugin-react/jsx-first-prop-new-line
0单文件可以写多个组件eslint-plugin-react/no-multi-comp
1jsx js 文件中都可以写 jsx 语法eslint-plugin-react/jsx-filename-extension
0组件可以不带 stateeslint-plugin-react/prefer-stateless-function
0不强制写 propTypeseslint-plugin-react/prop-types
1vdom 关闭跟在属性后eslint-plugin-react/jsx-closing-bracket-location
1组件函数排序 "static-methods" "lifecycle" "/\^(handle|on).+$/" "everything-else" "rendering"eslint-plugin-react/sort-comp