本规范基于 Airbnb 和 Tencent JavaScript 编码规范编写。主要用于IMWEB团队内部项目。
接入指南
项目依赖要求,确保eslint版本大于下面版本:
"peerDependencies": {
"babel-eslint": ">= 7.2.3",
"eslint": ">= ^6.8.0"
}
tnpm install eslint @tencent/eslint-config-imweb --save-dev
.eslintrc.js:
module.exports = {
extends: ['@tencent/eslint-config-imweb'],
}
若项目中使用了typescript,则需要:
1.安装目前最能稳定使用的开发环境依赖:
手动引入:
"devDependencies" : {
"@typescript-eslint/parser": "^3.9.1",
"@typescript-eslint/eslint-plugin": "^3.9.1",
}
或命令行安装:
tnpm install @typescript-eslint/eslint-plugin@3.9.1 @typescript-eslint/parser@3.9.1 --save-dev
2.额外引入ts规则
.eslintrc.js:
module.exports = {
extends: [
'@tencent/eslint-config-imweb',
'@tencent/eslint-config-imweb/ts',
],
}
Tencent Javascript 规范提供了一套降级方案以兼容老项目迁移,若老项目改动过大,可考虑使用。
.eslintrc.js:
module.exports = {
extends: [
'@tencent/eslint-config-imweb',
'@tencent/eslint-config-imweb/ts',
'@tencent/eslint-config-tencent/ts-legacy',
],
}
关于 Prettier
由于目前公司还没有统一的 Prettier 标准配置,团队内的代码风格也没有得出一份最佳实践,所以目前只给出 Prettier 的推荐配置,并未集成在代码中。
安装相关依赖:
tnpm i prettier eslint-config-prettier eslint-plugin-prettier -D
.eslintrc.js:
module.exports = {
extends: [
'@tencent/eslint-config-imweb',
'@tencent/eslint-config-imweb/ts',
'prettier',
'prettier/@typescript-eslint',
'prettier/react',
'plugin:prettier/recommended',
],
};
.prettierrc:
{
"singleQuote": true,
"jsxBracketSameLine": false,
"trailingComma": "all",
"printWidth": 120
}
规则详情
Rule Name:@typescript-eslint/camelcase
["off"]
Rule Name:@typescript-eslint/ban-types
["off"]
Rule Name:@typescript-eslint/consistent-type-assertions
["off",{"assertionStyle":"as","objectLiteralTypeAssertions":"never"}]
Rule Name:@typescript-eslint/explicit-function-return-type
["off"]
Rule Name:@typescript-eslint/explicit-member-accessibility
["off"]
Rule Name:@typescript-eslint/explicit-module-boundary-types
["off"]
Rule Name:@typescript-eslint/member-ordering
["off",{"default":["public-static-field","protected-static-field","private-static-field","static-field","public-static-method","protected-static-method","private-static-method","static-method","public-instance-field","protected-instance-field","private-instance-field","public-field","protected-field","private-field","instance-field","field","constructor","public-instance-method","protected-instance-method","private-instance-method","public-method","protected-method","private-method","instance-method","method"]}]
Rule Name:@typescript-eslint/no-use-before-define
["error",{"enums":false,"functions":false}]
Rule Name:@typescript-eslint/no-var-requires
["warn"]
Rule Name:@typescript-eslint/no-require-imports
["warn"]
Rule Name:no-dupe-class-members
["off"]
Rule Name:no-empty-function
["off",{"allow":["arrowFunctions","functions","methods"]}]
Rule Name:no-invalid-this
["off"]
Rule Name:no-magic-numbers
["off",{"ignore":[],"ignoreArrayIndexes":true,"enforceConst":true,"detectObjects":false}]
Rule Name:no-unused-vars
["off",{"vars":"all","args":"after-used","ignoreRestSiblings":true}]
Rule Name:react/sort-comp
["off",{"order":["static-variables","static-methods","instance-variables","lifecycle","/^on.+$/","getters","setters","/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/","instance-methods","everything-else","rendering"],"groups":{"lifecycle":["displayName","propTypes","contextTypes","childContextTypes","mixins","statics","defaultProps","constructor","getDefaultProps","getInitialState","state","getChildContext","getDerivedStateFromProps","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","getSnapshotBeforeUpdate","componentDidUpdate","componentDidCatch","componentWillUnmount"],"rendering":["/^render.+$/","render"]}}]
Rule Name:new-cap
["off",{"properties":false,"newIsCap":true,"capIsNew":true}]
Rule Name:func-call-spacing
["off","never"]
Rule Name:@typescript-eslint/adjacent-overload-signatures
["error"]
Rule Name:@typescript-eslint/class-literal-property-style
["error","fields"]
Rule Name:@typescript-eslint/consistent-type-definitions
["off"]
Rule Name:@typescript-eslint/func-call-spacing
["error","never"]
Rule Name:@typescript-eslint/method-signature-style
["off"]
Rule Name:@typescript-eslint/no-empty-interface
["error"]
Rule Name:@typescript-eslint/no-inferrable-types
["warn"]
Rule Name:@typescript-eslint/no-namespace
["error",{"allowDeclarations":true,"allowDefinitionFiles":true}]
Rule Name:@typescript-eslint/no-non-null-asserted-optional-chain
["error"]
Rule Name:@typescript-eslint/no-parameter-properties
["off"]
Rule Name:@typescript-eslint/no-this-alias
["error",{"allowDestructuring":true}]
Rule Name:@typescript-eslint/no-unused-expressions
["error",{"allowShortCircuit":true,"allowTernary":true,"allowTaggedTemplates":true}]
Rule Name:@typescript-eslint/no-useless-constructor
["warn"]
Rule Name:@typescript-eslint/prefer-for-of
["warn"]
Rule Name:@typescript-eslint/prefer-function-type
["warn"]
Rule Name:@typescript-eslint/prefer-namespace-keyword
["error"]
Rule Name:@typescript-eslint/prefer-optional-chain
["error"]
Rule Name:@typescript-eslint/triple-slash-reference
["error",{"path":"never","types":"always","lib":"always"}]
Rule Name:@typescript-eslint/type-annotation-spacing
["error"]
Rule Name:@typescript-eslint/typedef
["error",{"arrayDestructuring":false,"arrowParameter":false,"memberVariableDeclaration":false,"objectDestructuring":false,"parameter":false,"propertyDeclaration":true,"variableDeclaration":false}]
Rule Name:@typescript-eslint/unified-signatures
["error"]
Rule Name:@typescript-eslint/ban-ts-comment
["error"]
Rule Name:no-array-constructor
["off"]
Rule Name:@typescript-eslint/no-array-constructor
["error"]
Rule Name:@typescript-eslint/no-empty-function
["error"]
Rule Name:@typescript-eslint/no-explicit-any
["warn"]
Rule Name:@typescript-eslint/no-extra-non-null-assertion
["error"]
Rule Name:no-extra-semi
["off"]
Rule Name:@typescript-eslint/no-extra-semi
["error"]
Rule Name:@typescript-eslint/no-misused-new
["error"]
Rule Name:@typescript-eslint/no-non-null-assertion
["warn"]
Rule Name:@typescript-eslint/no-unused-vars
["warn"]
Rule Name:@typescript-eslint/prefer-as-const
["error"]
Rule Name:array-callback-return
["warn",{"allowImplicit":true}]
Rule Name:arrow-body-style
["off","as-needed"]
Rule Name:arrow-parens
["off","as-needed",{"requireForBlockBody":true}]
Rule Name:arrow-spacing
["error",{"before":true,"after":true}]
Rule Name:brace-style
["error","1tbs",{"allowSingleLine":true}]
Rule Name:camelcase
["error",{"properties":"never","ignoreDestructuring":true,"ignoreImports":true,"allow":["^UNSAFE_"]}]
Rule Name:class-methods-use-this
["off",{"exceptMethods":["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"]}]
Rule Name:consistent-return
["off"]
Rule Name:comma-dangle
["error",{"arrays":"always-multiline","objects":"always-multiline","imports":"always-multiline","exports":"always-multiline","functions":"always-multiline"}]
Rule Name:computed-property-spacing
["error","never"]
Rule Name:dot-notation
["error",{"allowKeywords":true,"allowPattern":""}]
Rule Name:eqeqeq
["error","always",{"null":"ignore"}]
Rule Name:func-names
["warn","as-needed"]
Rule Name:func-style
["off","expression"]
Rule Name:indent
["error",2,{"SwitchCase":1,"VariableDeclarator":1,"outerIIFEBody":1,"FunctionDeclaration":{"parameters":1,"body":1},"FunctionExpression":{"parameters":1,"body":1},"CallExpression":{"arguments":1},"ArrayExpression":1,"ObjectExpression":1,"ImportDeclaration":1,"flatTernaryExpressions":false,"ignoredNodes":["TSXElement","JSXElement","JSXElement > *","JSXAttribute","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXSpreadAttribute","JSXExpressionContainer","JSXOpeningElement","JSXClosingElement","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXText","JSXEmptyExpression","JSXSpreadChild"],"ignoreComments":false}]
Rule Name:max-len
["error",{"code":120,"ignoreStrings":true,"ignoreUrls":true,"ignoreRegExpLiterals":true,"ignoreTemplateLiterals":true,"ignoreComments":true}]
Rule Name:no-await-in-loop
["off"]
Rule Name:no-async-promise-executor
["warn"]
Rule Name:no-confusing-arrow
["error",{"allowParens":true}]
Rule Name:no-continue
["warn"]
Rule Name:no-else-return
["error",{"allowElseIf":false}]
Rule Name:no-iterator
["error"]
Rule Name:no-new-wrappers
["warn"]
Rule Name:no-param-reassign
["warn",{"props":true,"ignorePropertyModificationsFor":["acc","accumulator","e","ctx","context","req","request","res","response","$scope","staticContext"]}]
Rule Name:no-unused-expressions
["off",{"allowShortCircuit":false,"allowTernary":false,"allowTaggedTemplates":false}]
Rule Name:no-restricted-properties
["error",{"object":"arguments","property":"callee","message":"arguments.callee is deprecated"},{"object":"global","property":"isFinite","message":"Please use Number.isFinite instead"},{"object":"self","property":"isFinite","message":"Please use Number.isFinite instead"},{"object":"window","property":"isFinite","message":"Please use Number.isFinite instead"},{"object":"global","property":"isNaN","message":"Please use Number.isNaN instead"},{"object":"self","property":"isNaN","message":"Please use Number.isNaN instead"},{"object":"window","property":"isNaN","message":"Please use Number.isNaN instead"},{"property":"__defineGetter__","message":"Please use Object.defineProperty instead."},{"property":"__defineSetter__","message":"Please use Object.defineProperty instead."},{"object":"Math","property":"pow","message":"Use the exponentiation operator (**) instead."}]
Rule Name:no-shadow
["warn"]
Rule Name:no-script-url
["off"]
Rule Name:no-useless-constructor
["error"]
Rule Name:newline-per-chained-call
["error",{"ignoreChainWithDepth":4}]
Rule Name:no-nested-ternary
["error"]
Rule Name:no-restricted-syntax
["error",{"selector":"ForInStatement","message":"for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array."},{"selector":"LabeledStatement","message":"Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand."},{"selector":"WithStatement","message":"`with` is disallowed in strict mode because it makes code impossible to predict and optimize."}]
Rule Name:no-underscore-dangle
["off",{"allow":["__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"],"allowAfterThis":false,"allowAfterSuper":false,"enforceInMethodNames":true,"allowAfterThisConstructor":false}]
Rule Name:no-unneeded-ternary
["error",{"defaultAssignment":false}]
Rule Name:no-whitespace-before-property
["error"]
Rule Name:no-plusplus
["off",{"allowForLoopAfterthoughts":true}]
Rule Name:object-curly-spacing
["error","always"]
Rule Name:object-curly-newline
["off",{"ObjectExpression":{"minProperties":4,"multiline":true,"consistent":true},"ObjectPattern":{"minProperties":4,"multiline":true,"consistent":true},"ImportDeclaration":{"minProperties":4,"multiline":true,"consistent":true},"ExportDeclaration":{"minProperties":4,"multiline":true,"consistent":true}}]
Rule Name:object-shorthand
["error","always",{"ignoreConstructors":false,"avoidQuotes":true}]
Rule Name:one-var
["error","never"]
Rule Name:operator-linebreak
["error","before",{"overrides":{"=":"none"}}]
Rule Name:quotes
["error","single",{"avoidEscape":true}]
Rule Name:spaced-comment
["error","always",{"line":{"markers":["/"],"exceptions":["-","+"]},"block":{"markers":["!"],"exceptions":["*"],"balanced":true}}]
Rule Name:space-before-function-paren
["error",{"anonymous":"always","named":"never","asyncArrow":"always"}]
Rule Name:prefer-const
["error",{"destructuring":"all","ignoreReadBeforeAssign":true}]
Rule Name:prefer-destructuring
["error",{"VariableDeclarator":{"array":false,"object":true},"AssignmentExpression":{"array":false,"object":false}},{"enforceForRenamedProperties":false}]
Rule Name:prefer-rest-params
["error"]
Rule Name:prefer-spread
["error"]
Rule Name:radix
["error"]
Rule Name:template-curly-spacing
["error","never"]
Rule Name:import/no-extraneous-dependencies
["off",{"devDependencies":["test/**","tests/**","spec/**","**/__tests__/**","**/__mocks__/**","test.{js,jsx}","test-*.{js,jsx}","**/*{.,_}{test,spec}.{js,jsx}","**/jest.config.js","**/jest.setup.js","**/vue.config.js","**/webpack.config.js","**/webpack.config.*.js","**/rollup.config.js","**/rollup.config.*.js","**/gulpfile.js","**/gulpfile.*.js","**/Gruntfile{,.js}","**/protractor.conf.js","**/protractor.conf.*.js","**/karma.conf.js"],"optionalDependencies":false}]
Rule Name:import/no-unresolved
["off",{"commonjs":true,"caseSensitive":true}]
Rule Name:import/extensions
["off","ignorePackages",{"js":"never","mjs":"never","jsx":"never"}]
Rule Name:import/first
["off"]
Rule Name:react/destructuring-assignment
["off","always"]
Rule Name:react/forbid-prop-types
["off",{"forbid":["any","array","object"],"checkContextTypes":true,"checkChildContextTypes":true}]
Rule Name:react/jsx-closing-tag-location
["warn"]
Rule Name:react/jsx-filename-extension
["error",{"extensions":[".jsx",".tsx"]}]
Rule Name:react/jsx-one-expression-per-line
["off",{"allow":"single-child"}]
Rule Name:react/jsx-props-no-spreading
["off",{"html":"enforce","custom":"enforce","explicitSpread":"ignore","exceptions":[]}]
Rule Name:react/jsx-no-script-url
["error",[{"name":"Link","props":["to"]},{"name":"Foo","props":["href","to"]}]]
Rule Name:react/require-default-props
["off",{"forbidDefaultForRequired":true}]
Rule Name:react/no-danger
["warn"]
Rule Name:react/no-did-mount-set-state
["off"]
Rule Name:react/prop-types
["off",{"ignore":[],"customValidators":[],"skipUndeclared":false}]
Rule Name:react/static-property-placement
["off","property assignment"]
Rule Name:jsx-a11y/media-has-caption
["off",{"audio":[],"video":[],"track":[]}]
Rule Name:jsx-a11y/no-static-element-interactions
["off",{"handlers":["onClick","onMouseDown","onMouseUp","onKeyPress","onKeyDown","onKeyUp"]}]
Rule Name:jsx-a11y/click-events-have-key-events
["off"]
Rule Name:jsx-a11y/no-noninteractive-element-to-interactive-role
["off",{"ul":["listbox","menu","menubar","radiogroup","tablist","tree","treegrid"],"ol":["listbox","menu","menubar","radiogroup","tablist","tree","treegrid"],"li":["menuitem","option","row","tab","treeitem"],"table":["grid"],"td":["gridcell"]}]
Rule Name:jsx-a11y/no-noninteractive-element-interactions
["off",{"handlers":["onClick","onMouseDown","onMouseUp","onKeyPress","onKeyDown","onKeyUp"]}]
Rule Name:jsx-a11y/mouse-events-have-key-events
["off"]
Rule Name:jsx-a11y/no-noninteractive-tabindex
["off",{"tags":[],"roles":["tabpanel"]}]
Rule Name:jsx-a11y/anchor-is-valid
["off",{"components":["Link"],"specialLink":["to"],"aspects":["noHref","invalidHref","preferButton"]}]
Rule Name:import/no-duplicates
["error"]
Rule Name:import/no-mutable-exports
["warn"]
Rule Name:import/no-webpack-loader-syntax
["warn"]
Rule Name:import/prefer-default-export
["off"]
Rule Name:array-bracket-spacing
["error","never"]
Rule Name:block-spacing
["error","always"]
Rule Name:comma-spacing
["error",{"before":false,"after":true}]
Rule Name:comma-style
["error","last"]
Rule Name:eol-last
["error","always"]
Rule Name:function-paren-newline
["warn","multiline"]
Rule Name:generator-star-spacing
["warn",{"before":false,"after":true}]
Rule Name:id-length
["off"]
Rule Name:implicit-arrow-linebreak
["warn","beside"]
Rule Name:key-spacing
["error",{"beforeColon":false,"afterColon":true}]
Rule Name:keyword-spacing
["error",{"overrides":{"if":{"after":true},"for":{"after":true},"while":{"after":true},"else":{"after":true}},"before":true,"after":true}]
Rule Name:linebreak-style
["warn","unix"]
Rule Name:no-case-declarations
["error"]
Rule Name:no-const-assign
["error"]
Rule Name:no-eval
["error"]
Rule Name:no-loop-func
["error"]
Rule Name:no-mixed-operators
["error",{"allowSamePrecedence":true}]
Rule Name:no-multi-assign
["error"]
Rule Name:no-multiple-empty-lines
["error",{"max":1,"maxBOF":0,"maxEOF":0}]
Rule Name:no-new-func
["error"]
Rule Name:no-new-object
["error"]
Rule Name:no-prototype-builtins
["error"]
Rule Name:no-trailing-spaces
["error",{"skipBlankLines":false,"ignoreComments":false}]
Rule Name:no-undef
["error"]
Rule Name:no-useless-escape
["error"]
Rule Name:no-var
["error"]
Rule Name:nonblock-statement-body-position
["error","beside"]
Rule Name:padded-blocks
["error","never"]
Rule Name:prefer-arrow-callback
["warn",{"allowNamedFunctions":false,"allowUnboundThis":true}]
Rule Name:prefer-template
["error"]
Rule Name:quote-props
["error","as-needed",{"keywords":false}]
Rule Name:semi
["error","always"]
Rule Name:space-before-blocks
["error"]
Rule Name:space-in-parens
["error","never"]
Rule Name:space-infix-ops
["error"]
Rule Name:wrap-iife
["error","outside"]
Rule Name:react-hooks/rules-of-hooks
["error"]
Rule Name:react-hooks/exhaustive-deps
["warn"]
Rule Name:jsx-a11y/anchor-has-content
["error",{"components":[]}]
Rule Name:jsx-a11y/aria-role
["error",{"ignoreNonDom":false,"ignoreNonDOM":false}]
Rule Name:jsx-a11y/aria-props
["error"]
Rule Name:jsx-a11y/aria-proptypes
["error"]
Rule Name:jsx-a11y/aria-unsupported-elements
["error"]
Rule Name:jsx-a11y/alt-text
["error",{"elements":["img","object","area","input[type=\"image\"]"],"img":[],"object":[],"area":[],"input[type=\"image\"]":[]}]
Rule Name:jsx-a11y/img-redundant-alt
["error"]
Rule Name:jsx-a11y/label-has-for
["off",{"components":[],"required":{"every":["nesting","id"]},"allowChildren":false}]
Rule Name:jsx-a11y/label-has-associated-control
["error",{"labelComponents":[],"labelAttributes":[],"controlComponents":[],"assert":"both","depth":25}]
Rule Name:jsx-a11y/control-has-associated-label
["error",{"labelAttributes":["label"],"controlComponents":[],"ignoreElements":["audio","canvas","embed","input","textarea","tr","video"],"ignoreRoles":["grid","listbox","menu","menubar","radiogroup","row","tablist","toolbar","tree","treegrid"],"depth":5}]
Rule Name:jsx-a11y/no-access-key
["error"]
Rule Name:jsx-a11y/no-onchange
["off"]
Rule Name:jsx-a11y/interactive-supports-focus
["error"]
Rule Name:jsx-a11y/role-has-required-aria-props
["error"]
Rule Name:jsx-a11y/role-supports-aria-props
["error"]
Rule Name:jsx-a11y/tabindex-no-positive
["error"]
Rule Name:jsx-a11y/heading-has-content
["error",{"components":[""]}]
Rule Name:jsx-a11y/html-has-lang
["error"]
Rule Name:jsx-a11y/lang
["error"]
Rule Name:jsx-a11y/no-distracting-elements
["error",{"elements":["marquee","blink"]}]
Rule Name:jsx-a11y/scope
["error"]
Rule Name:jsx-a11y/accessible-emoji
["error"]
Rule Name:jsx-a11y/aria-activedescendant-has-tabindex
["error"]
Rule Name:jsx-a11y/iframe-has-title
["error"]
Rule Name:jsx-a11y/no-autofocus
["error",{"ignoreNonDOM":true}]
Rule Name:jsx-a11y/no-redundant-roles
["error"]
Rule Name:jsx-a11y/no-interactive-element-to-noninteractive-role
["error",{"tr":["none","presentation"]}]
Rule Name:jsx-a11y/autocomplete-valid
["off",{"inputComponents":[]}]
Rule Name:jsx-quotes
["error","prefer-double"]
Rule Name:react/display-name
["off",{"ignoreTranspilerName":false}]
Rule Name:react/forbid-dom-props
["off",{"forbid":[]}]
Rule Name:react/jsx-boolean-value
["error","never",{"always":[]}]
Rule Name:react/jsx-closing-bracket-location
["error","line-aligned"]
Rule Name:react/jsx-curly-spacing
["error","never",{"allowMultiline":true}]
Rule Name:react/jsx-handler-names
["off",{"eventHandlerPrefix":"handle","eventHandlerPropPrefix":"on"}]
Rule Name:react/jsx-indent-props
["error",2]
Rule Name:react/jsx-key
["off"]
Rule Name:react/jsx-max-props-per-line
["error",{"maximum":1,"when":"multiline"}]
Rule Name:react/jsx-no-bind
["error",{"ignoreRefs":true,"allowArrowFunctions":true,"allowFunctions":false,"allowBind":false,"ignoreDOMComponents":true}]
Rule Name:react/jsx-no-duplicate-props
["error",{"ignoreCase":true}]
Rule Name:react/jsx-no-literals
["off",{"noStrings":true}]
Rule Name:react/jsx-no-undef
["error"]
Rule Name:react/jsx-pascal-case
["error",{"allowAllCaps":true,"ignore":[]}]
Rule Name:react/sort-prop-types
["off",{"ignoreCase":true,"callbacksLast":false,"requiredFirst":false,"sortShapeProp":true}]
Rule Name:react/jsx-sort-prop-types
["off"]
Rule Name:react/jsx-sort-props
["off",{"ignoreCase":true,"callbacksLast":false,"shorthandFirst":false,"shorthandLast":false,"noSortAlphabetically":false,"reservedFirst":true}]
Rule Name:react/jsx-sort-default-props
["off",{"ignoreCase":true}]
Rule Name:react/jsx-uses-react
["error"]
Rule Name:react/jsx-uses-vars
["error"]
Rule Name:react/no-deprecated
["error"]
Rule Name:react/no-did-update-set-state
["error"]
Rule Name:react/no-will-update-set-state
["error"]
Rule Name:react/no-direct-mutation-state
["off"]
Rule Name:react/no-is-mounted
["error"]
Rule Name:react/no-multi-comp
["off"]
Rule Name:react/no-set-state
["off"]
Rule Name:react/no-string-refs
["error"]
Rule Name:react/no-unknown-property
["error"]
Rule Name:react/prefer-es6-class
["error","always"]
Rule Name:react/prefer-stateless-function
["error",{"ignorePureComponents":true}]
Rule Name:react/react-in-jsx-scope
["error"]
Rule Name:react/require-render-return
["error"]
Rule Name:react/self-closing-comp
["error"]
Rule Name:react/jsx-wrap-multilines
["error",{"declaration":"parens-new-line","assignment":"parens-new-line","return":"parens-new-line","arrow":"parens-new-line","condition":"parens-new-line","logical":"parens-new-line","prop":"parens-new-line"}]
Rule Name:react/jsx-first-prop-new-line
["error","multiline-multiprop"]
Rule Name:react/jsx-equals-spacing
["error","never"]
Rule Name:react/jsx-indent
["error",2]
Rule Name:react/jsx-no-target-blank
["error",{"enforceDynamicLinks":"always"}]
Rule Name:react/jsx-no-comment-textnodes
["error"]
Rule Name:react/no-render-return-value
["error"]
Rule Name:react/require-optimization
["off",{"allowDecorators":[]}]
Rule Name:react/no-find-dom-node
["error"]
Rule Name:react/forbid-component-props
["off",{"forbid":[]}]
Rule Name:react/forbid-elements
["off",{"forbid":[]}]
Rule Name:react/no-danger-with-children
["error"]
Rule Name:react/no-unused-prop-types
["error",{"customValidators":[],"skipShapeProps":true}]
Rule Name:react/style-prop-object
["error"]
Rule Name:react/no-unescaped-entities
["error"]
Rule Name:react/no-children-prop
["error"]
Rule Name:react/jsx-tag-spacing
["error",{"closingSlash":"never","beforeSelfClosing":"always","afterOpening":"never","beforeClosing":"never"}]
Rule Name:react/jsx-space-before-closing
["off","always"]
Rule Name:react/no-array-index-key
["error"]
Rule Name:react/forbid-foreign-prop-types
["warn",{"allowInPropTypes":true}]
Rule Name:react/void-dom-elements-no-children
["error"]
Rule Name:react/default-props-match-prop-types
["error",{"allowRequiredDefaults":false}]
Rule Name:react/no-redundant-should-component-update
["error"]
Rule Name:react/no-unused-state
["error"]
Rule Name:react/boolean-prop-naming
["off",{"propTypeNames":["bool","mutuallyExclusiveTrueProps"],"rule":"^(is|has)[A-Z]([A-Za-z0-9]?)+","message":""}]
Rule Name:react/no-typos
["error"]
Rule Name:react/jsx-curly-brace-presence
["error",{"props":"never","children":"never"}]
Rule Name:react/no-access-state-in-setstate
["error"]
Rule Name:react/button-has-type
["error",{"button":true,"submit":true,"reset":false}]
Rule Name:react/jsx-child-element-spacing
["off"]
Rule Name:react/no-this-in-sfc
["error"]
Rule Name:react/jsx-max-depth
["off"]
Rule Name:react/jsx-props-no-multi-spaces
["error"]
Rule Name:react/no-unsafe
["off"]
Rule Name:react/jsx-fragments
["error","syntax"]
Rule Name:react/jsx-curly-newline
["error",{"multiline":"consistent","singleline":"consistent"}]
Rule Name:react/state-in-constructor
["error","always"]
Rule Name:react/prefer-read-only-props
["off"]
Rule Name:react/jsx-no-useless-fragment
["off"]
Rule Name:react/no-adjacent-inline-elements
["off"]
Rule Name:react/function-component-definition
["off",{"namedComponents":"function-expression","unnamedComponents":"function-expression"}]
Rule Name:strict
["error","never"]
Rule Name:import/named
["error"]
Rule Name:import/default
["off"]
Rule Name:import/namespace
["off"]
Rule Name:import/export
["error"]
Rule Name:import/no-named-as-default
["error"]
Rule Name:import/no-named-as-default-member
["error"]
Rule Name:import/no-deprecated
["off"]
Rule Name:import/no-commonjs
["off"]
Rule Name:import/no-amd
["error"]
Rule Name:import/no-nodejs-modules
["off"]
Rule Name:import/imports-first
["off"]
Rule Name:import/no-namespace
["off"]
Rule Name:import/order
["error",{"groups":[["builtin","external","internal"]]}]
Rule Name:import/newline-after-import
["error"]
Rule Name:import/no-restricted-paths
["off"]
Rule Name:import/max-dependencies
["off",{"max":10}]
Rule Name:import/no-absolute-path
["error"]
Rule Name:import/no-dynamic-require
["error"]
Rule Name:import/no-internal-modules
["off",{"allow":[]}]
Rule Name:import/unambiguous
["off"]
Rule Name:import/no-unassigned-import
["off"]
Rule Name:import/no-named-default
["error"]
Rule Name:import/no-anonymous-default-export
["off",{"allowArray":false,"allowArrowFunction":false,"allowAnonymousClass":false,"allowAnonymousFunction":false,"allowLiteral":false,"allowObject":false}]
Rule Name:import/exports-last
["off"]
Rule Name:import/group-exports
["off"]
Rule Name:import/no-default-export
["off"]
Rule Name:import/no-named-export
["off"]
Rule Name:import/no-self-import
["error"]
Rule Name:import/no-cycle
["error",{"maxDepth":null,"ignoreExternal":false}]
Rule Name:import/no-useless-path-segments
["error",{"commonjs":true}]
Rule Name:import/dynamic-import-chunkname
["off",{"importFunctions":[],"webpackChunknameFormat":"[0-9a-zA-Z-_/.]+"}]
Rule Name:import/no-relative-parent-imports
["off"]
Rule Name:import/no-unused-modules
["off",{"ignoreExports":[],"missingExports":true,"unusedExports":true}]
Rule Name:constructor-super
["error"]
Rule Name:no-class-assign
["error"]
Rule Name:no-duplicate-imports
["off"]
Rule Name:no-new-symbol
["error"]
Rule Name:no-restricted-exports
["off",{"restrictedNamedExports":["default","then"]}]
Rule Name:no-restricted-imports
["off",{"paths":[],"patterns":[]}]
Rule Name:no-this-before-super
["error"]
Rule Name:no-useless-computed-key
["error"]
Rule Name:no-useless-rename
["error",{"ignoreDestructuring":false,"ignoreImport":false,"ignoreExport":false}]
Rule Name:prefer-numeric-literals
["error"]
Rule Name:prefer-reflect
["off"]
Rule Name:require-yield
["error"]
Rule Name:rest-spread-spacing
["error","never"]
Rule Name:sort-imports
["off",{"ignoreCase":false,"ignoreDeclarationSort":false,"ignoreMemberSort":false,"memberSyntaxSortOrder":["none","all","multiple","single"]}]
Rule Name:symbol-description
["error"]
Rule Name:yield-star-spacing
["error","after"]
Rule Name:init-declarations
["off"]
Rule Name:no-catch-shadow
["off"]
Rule Name:no-delete-var
["error"]
Rule Name:no-label-var
["error"]
Rule Name:no-restricted-globals
["error","isFinite","isNaN","addEventListener","blur","close","closed","confirm","defaultStatus","defaultstatus","event","external","find","focus","frameElement","frames","history","innerHeight","innerWidth","length","location","locationbar","menubar","moveBy","moveTo","name","onblur","onerror","onfocus","onload","onresize","onunload","open","opener","opera","outerHeight","outerWidth","pageXOffset","pageYOffset","parent","print","removeEventListener","resizeBy","resizeTo","screen","screenLeft","screenTop","screenX","screenY","scroll","scrollbars","scrollBy","scrollTo","scrollX","scrollY","self","status","statusbar","stop","toolbar","top"]
Rule Name:no-shadow-restricted-names
["error"]
Rule Name:no-undef-init
["error"]
Rule Name:no-undefined
["off"]
Rule Name:no-use-before-define
["error",{"functions":true,"classes":true,"variables":true}]
Rule Name:array-bracket-newline
["off","consistent"]
Rule Name:array-element-newline
["off",{"multiline":true,"minItems":3}]
Rule Name:capitalized-comments
["off","never",{"line":{"ignorePattern":".*","ignoreInlineComments":true,"ignoreConsecutiveComments":true},"block":{"ignorePattern":".*","ignoreInlineComments":true,"ignoreConsecutiveComments":true}}]
Rule Name:consistent-this
["off"]
Rule Name:function-call-argument-newline
["off","consistent"]
Rule Name:func-name-matching
["off","always",{"includeCommonJSModuleExports":false,"considerPropertyDescriptor":true}]
Rule Name:id-blacklist
["off"]
Rule Name:id-match
["off"]
Rule Name:line-comment-position
["off",{"position":"above","ignorePattern":"","applyDefaultPatterns":true}]
Rule Name:lines-between-class-members
["error","always",{"exceptAfterSingleLine":false}]
Rule Name:lines-around-comment
["off"]
Rule Name:lines-around-directive
["error",{"before":"always","after":"always"}]
Rule Name:max-depth
["off",4]
Rule Name:max-lines
["off",{"max":300,"skipBlankLines":true,"skipComments":true}]
Rule Name:max-lines-per-function
["off",{"max":50,"skipBlankLines":true,"skipComments":true,"IIFEs":true}]
Rule Name:max-nested-callbacks
["off"]
Rule Name:max-params
["off",3]
Rule Name:max-statements
["off",10]
Rule Name:max-statements-per-line
["off",{"max":1}]
Rule Name:multiline-comment-style
["off","starred-block"]
Rule Name:multiline-ternary
["off","never"]
Rule Name:new-parens
["error"]
Rule Name:newline-after-var
["off"]
Rule Name:newline-before-return
["off"]
Rule Name:no-bitwise
["error"]
Rule Name:no-inline-comments
["off"]
Rule Name:no-lonely-if
["error"]
Rule Name:no-mixed-spaces-and-tabs
["error"]
Rule Name:no-negated-condition
["off"]
Rule Name:no-spaced-func
["error"]
Rule Name:no-tabs
["error"]
Rule Name:no-ternary
["off"]
Rule Name:object-property-newline
["error",{"allowAllPropertiesOnSameLine":true,"allowMultiplePropertiesPerLine":false}]
Rule Name:one-var-declaration-per-line
["error","always"]
Rule Name:operator-assignment
["error","always"]
Rule Name:padding-line-between-statements
["off"]
Rule Name:prefer-exponentiation-operator
["off"]
Rule Name:prefer-object-spread
["error"]
Rule Name:require-jsdoc
["off"]
Rule Name:semi-spacing
["error",{"before":false,"after":true}]
Rule Name:semi-style
["error","last"]
Rule Name:sort-keys
["off","asc",{"caseSensitive":false,"natural":true}]
Rule Name:sort-vars
["off"]
Rule Name:space-unary-ops
["error",{"words":true,"nonwords":false,"overrides":{}}]
Rule Name:switch-colon-spacing
["error",{"after":true,"before":false}]
Rule Name:template-tag-spacing
["error","never"]
Rule Name:unicode-bom
["error","never"]
Rule Name:wrap-regex
["off"]
Rule Name:callback-return
["off"]
Rule Name:global-require
["error"]
Rule Name:handle-callback-err
["off"]
Rule Name:no-buffer-constructor
["error"]
Rule Name:no-mixed-requires
["off",false]
Rule Name:no-new-require
["error"]
Rule Name:no-path-concat
["error"]
Rule Name:no-process-env
["off"]
Rule Name:no-process-exit
["off"]
Rule Name:no-restricted-modules
["off"]
Rule Name:no-sync
["off"]
Rule Name:for-direction
["error"]
Rule Name:getter-return
["error",{"allowImplicit":true}]
Rule Name:no-compare-neg-zero
["error"]
Rule Name:no-cond-assign
["error","always"]
Rule Name:no-console
["warn"]
Rule Name:no-constant-condition
["warn"]
Rule Name:no-control-regex
["error"]
Rule Name:no-debugger
["error"]
Rule Name:no-dupe-args
["error"]
Rule Name:no-dupe-else-if
["off"]
Rule Name:no-dupe-keys
["error"]
Rule Name:no-duplicate-case
["error"]
Rule Name:no-empty
["error"]
Rule Name:no-empty-character-class
["error"]
Rule Name:no-ex-assign
["error"]
Rule Name:no-extra-boolean-cast
["error"]
Rule Name:no-extra-parens
["off","all",{"conditionalAssign":true,"nestedBinaryExpressions":false,"returnAssign":false,"ignoreJSX":"all","enforceForArrowConditionals":false}]
Rule Name:no-func-assign
["error"]
Rule Name:no-import-assign
["off"]
Rule Name:no-inner-declarations
["error"]
Rule Name:no-invalid-regexp
["error"]
Rule Name:no-irregular-whitespace
["error"]
Rule Name:no-loss-of-precision
["off"]
Rule Name:no-misleading-character-class
["error"]
Rule Name:no-obj-calls
["error"]
Rule Name:no-regex-spaces
["error"]
Rule Name:no-setter-return
["off"]
Rule Name:no-sparse-arrays
["error"]
Rule Name:no-template-curly-in-string
["error"]
Rule Name:no-unexpected-multiline
["error"]
Rule Name:no-unreachable
["error"]
Rule Name:no-unsafe-finally
["error"]
Rule Name:no-unsafe-negation
["error"]
Rule Name:no-useless-backreference
["off"]
Rule Name:no-negated-in-lhs
["off"]
Rule Name:require-atomic-updates
["off"]
Rule Name:use-isnan
["error"]
Rule Name:valid-jsdoc
["off"]
Rule Name:valid-typeof
["error",{"requireStringLiterals":true}]
Rule Name:accessor-pairs
["off"]
Rule Name:block-scoped-var
["error"]
Rule Name:complexity
["off",11]
Rule Name:curly
["error","multi-line"]
Rule Name:default-case
["error",{"commentPattern":"^no default$"}]
Rule Name:default-case-last
["off"]
Rule Name:default-param-last
["off"]
Rule Name:dot-location
["error","property"]
Rule Name:grouped-accessor-pairs
["off"]
Rule Name:guard-for-in
["error"]
Rule Name:max-classes-per-file
["error",1]
Rule Name:no-alert
["warn"]
Rule Name:no-caller
["error"]
Rule Name:no-constructor-return
["off"]
Rule Name:no-div-regex
["off"]
Rule Name:no-empty-pattern
["error"]
Rule Name:no-eq-null
["off"]
Rule Name:no-extend-native
["error"]
Rule Name:no-extra-bind
["error"]
Rule Name:no-extra-label
["error"]
Rule Name:no-fallthrough
["error"]
Rule Name:no-floating-decimal
["error"]
Rule Name:no-global-assign
["error",{"exceptions":[]}]
Rule Name:no-native-reassign
["off"]
Rule Name:no-implicit-coercion
["off",{"boolean":false,"number":true,"string":true,"allow":[]}]
Rule Name:no-implicit-globals
["off"]
Rule Name:no-implied-eval
["error"]
Rule Name:no-labels
["error",{"allowLoop":false,"allowSwitch":false}]
Rule Name:no-lone-blocks
["error"]
Rule Name:no-multi-spaces
["error",{"ignoreEOLComments":false}]
Rule Name:no-multi-str
["error"]
Rule Name:no-new
["error"]
Rule Name:no-octal
["error"]
Rule Name:no-octal-escape
["error"]
Rule Name:no-proto
["error"]
Rule Name:no-redeclare
["error"]
Rule Name:no-return-assign
["error","always"]
Rule Name:no-return-await
["error"]
Rule Name:no-self-assign
["error",{"props":true}]
Rule Name:no-self-compare
["error"]
Rule Name:no-sequences
["error"]
Rule Name:no-throw-literal
["error"]
Rule Name:no-unmodified-loop-condition
["off"]
Rule Name:no-unused-labels
["error"]
Rule Name:no-useless-call
["off"]
Rule Name:no-useless-catch
["error"]
Rule Name:no-useless-concat
["error"]
Rule Name:no-useless-return
["error"]
Rule Name:no-void
["error"]
Rule Name:no-warning-comments
["off",{"terms":["todo","fixme","xxx"],"location":"start"}]
Rule Name:no-with
["error"]
Rule Name:prefer-promise-reject-errors
["error",{"allowEmptyReject":true}]
Rule Name:prefer-named-capture-group
["off"]
Rule Name:prefer-regex-literals
["off"]
Rule Name:require-await
["off"]
Rule Name:require-unicode-regexp
["off"]
Rule Name:vars-on-top
["error"]
Rule Name:yoda
["error"]