123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484 |
- {
- "env": {
- "es6": true,
- "node": true
- },
- "parser": "babel-eslint",
- "parserOptions": {
- "ecmaVersion": 8,
- "sourceType": "module",
- "ecmaFeatures": {
- "impliedStrict": true,
- "jsx": true,
- "experimentalObjectRestSpread": true
- }
- },
- "plugins": [
- "react",
- "react-native",
- "babel"
- ],
- "rules": {
- /*
- * possible errors
- */
- "comma-dangle": "error",
- "no-cond-assign": [
- "error",
- "except-parens"
- ],
- "no-console": "error",
- "no-constant-condition": "error",
- "no-control-regex": "error",
- "no-debugger": "warn",
- "no-dupe-args": "error",
- "no-dupe-keys": "error",
- "no-duplicate-case": "error",
- "no-empty": "error",
- "no-empty-character-class": "error",
- "no-ex-assign": "error",
- "no-extra-boolean-cast": "error",
- "no-extra-parens": 0,
- "no-extra-semi": "error",
- "no-func-assign": "error",
- "no-inner-declarations": "error",
- "no-invalid-regexp": "error",
- "no-irregular-whitespace": "error",
- "no-negated-in-lhs": "error",
- "no-obj-calls": "error",
- "no-regex-spaces": "error",
- "no-sparse-arrays": "error",
- "no-unexpected-multiline": "error",
- "no-unreachable": "error",
- "use-isnan": "error",
- "valid-jsdoc": 0,
- "valid-typeof": "error",
- /*
- * best practices
- */
- "accessor-pairs": "warn",
- "array-callback-return": 0,
- "block-scoped-var": "error",
- "complexity": 0,
- "consistent-return": "error",
- "curly": [
- "error",
- "all"
- ],
- "default-case": "error",
- "dot-location": [
- "error",
- "property"
- ],
- "dot-notation": "error",
- "eqeqeq": "error",
- "guard-for-in": "error",
- "no-alert": "error",
- "no-caller": "error",
- "no-case-declarations": "error",
- "no-div-regex": 0,
- "no-else-return": 0,
- "no-empty-function": "error",
- "no-empty-pattern": "error",
- "no-eq-null": "error",
- "no-eval": "error",
- "no-extend-native": "error",
- "no-extra-bind": "error",
- "no-extra-label": "error",
- "no-fallthrough": "error",
- "no-floating-decimal": "error",
- "no-implicit-coercion": "error",
- "no-implicit-globals": 0,
- "no-implied-eval": "error",
- "no-invalid-this": 0,
- "no-iterator": "error",
- "no-labels": "error",
- "no-lone-blocks": "error",
- "no-loop-func": "error",
- "no-magic-numbers": 0,
- "no-multi-spaces": "error",
- "no-multi-str": 0,
- "no-native-reassign": "error",
- "no-new": "error",
- "no-new-func": "error",
- "no-new-wrappers": "error",
- "no-octal": "error",
- "no-octal-escape": "error",
- "no-param-reassign": "error",
- "no-proto": "error",
- "no-redeclare": 0,
- "no-return-assign": 0,
- "no-script-url": "error",
- "no-self-assign": "error",
- "no-self-compare": "error",
- "no-sequences": "error",
- "no-throw-literal": "error",
- "no-unmodified-loop-condition": 0,
- "no-unused-expressions": "error",
- "no-unused-labels": 0,
- "no-useless-call": "error",
- "no-useless-concat": "error",
- "no-void": "error",
- "no-warning-comments": 0,
- "no-with": "error",
- "radix": 0,
- "vars-on-top": 0,
- "wrap-iife": "error",
- "yoda": 0,
- "strict": [
- "error",
- "never"
- ],
- /*
- * variables
- */
- "init-declarations": 0,
- "no-catch-shadow": "error",
- "no-delete-var": "error",
- "no-label-var": "error",
- "no-restricted-globals": "error",
- "no-shadow": "error",
- "no-shadow-restricted-names": "error",
- "no-undef": 0,
- "no-undef-init": "error",
- "no-undefined": 0,
- "no-unused-vars": 0,
- "no-use-before-define": 0,
- /*
- * Node.js
- */
- "callback-return": 0,
- "global-require": 0,
- "handle-callback-err": 0,
- "no-mixed-requires": "error",
- "no-new-require": "error",
- "no-path-concat": "error",
- "no-process-env": 0,
- "no-process-exit": "error",
- "no-restricted-modules": 0,
- "no-sync": 0,
- /*
- * style
- */
- "array-bracket-spacing": [
- "error",
- "never"
- ],
- "block-spacing": "error",
- "brace-style": [
- "error",
- "1tbs"
- ],
- "camelcase": [
- "error",
- {
- "properties": "never"
- }
- ],
- "comma-spacing": [
- "error",
- {
- "before": false,
- "after": true
- }
- ],
- "comma-style": [
- "error",
- "last"
- ],
- "computed-property-spacing": [
- "error",
- "never"
- ],
- "consistent-this": [
- "error",
- "self"
- ],
- "eol-last": [
- "error",
- "unix"
- ],
- "func-names": 0,
- "func-style": 0,
- "id-blacklist": 0,
- "id-length": 0,
- "id-match": 0,
- "indent": [
- "error",
- 2,
- {
- "SwitchCase": 1
- }
- ],
- "jsx-quotes": "error",
- "key-spacing": [
- "error",
- {
- "singleLine": {
- "beforeColon": false,
- "afterColon": true,
- "mode": "strict"
- },
- "multiLine": {
- "beforeColon": false,
- "afterColon": true,
- "mode": "strict"
- }
- }
- ],
- "keyword-spacing": [
- "error",
- {
- "before": true,
- "after": true
- }
- ],
- "linebreak-style": [
- "error",
- "unix"
- ],
- "lines-around-comment": 0,
- "max-depth": [
- "error",
- 4
- ],
- "max-len": [
- "warn",
- 150
- ],
- "max-nested-callbacks": [
- "error",
- 4
- ],
- "max-params": [
- "error",
- 6
- ],
- "max-statements": [
- "error",
- 15,
- {
- "ignoreTopLevelFunctions": true
- }
- ],
- "new-cap": [
- "error",
- {
- "capIsNewExceptions": [
- "Immutable"
- ]
- }
- ],
- "new-parens": "error",
- "newline-after-var": 0,
- "newline-before-return": 0,
- "newline-per-chained-call": 0,
- "no-array-constructor": "error",
- "no-bitwise": 0,
- "no-continue": 0,
- "no-inline-comments": 0,
- "no-lonely-if": "error",
- "no-mixed-spaces-and-tabs": 0,
- "no-multiple-empty-lines": [
- "error",
- {
- "max": 1
- }
- ],
- "no-negated-condition": 0,
- "no-nested-ternary": "error",
- "no-new-object": "error",
- "no-plusplus": 0,
- "no-restricted-syntax": 0,
- "no-spaced-func": "error",
- "no-ternary": 0,
- "no-trailing-spaces": [
- "error",
- {
- "skipBlankLines": true
- }
- ],
- "no-underscore-dangle": 0,
- "no-unneeded-ternary": "error",
- "no-whitespace-before-property": "error",
- "object-curly-spacing": [
- "error",
- "always"
- ],
- "one-var": 0,
- "one-var-declaration-per-line": 0,
- "operator-assignment": 0,
- "operator-linebreak": [
- "error",
- "before"
- ],
- "padded-blocks": [
- "error",
- "never"
- ],
- "quote-props": [
- "error",
- "consistent-as-needed"
- ],
- "quotes": 0,
- "require-jsdoc": 0,
- "semi": [
- "error",
- "always"
- ],
- "semi-spacing": [
- "error",
- {
- "before": false,
- "after": true
- }
- ],
- "sort-imports": 0,
- "sort-vars": 0,
- "space-before-blocks": [
- "error",
- "always"
- ],
- "space-in-parens": [
- "error",
- "never"
- ],
- "space-infix-ops": "error",
- "space-unary-ops": "error",
- "spaced-comment": 0,
- "wrap-regex": "error",
- /*
- * ECMAScript 6
- */
- "arrow-body-style": 0,
- "arrow-parens": [
- "error",
- "always"
- ],
- "arrow-spacing": [
- "error",
- {
- "before": true,
- "after": true
- }
- ],
- "constructor-super": "error",
- "generator-star-spacing": [
- "error",
- "after"
- ],
- "no-class-assign": "error",
- "no-confusing-arrow": "error",
- "no-const-assign": "error",
- "no-dupe-class-members": "error",
- "no-new-symbol": "error",
- "no-restricted-imports": 0,
- "no-this-before-super": "error",
- "no-useless-constructor": 0,
- "no-var": "error",
- "object-shorthand": 0,
- "prefer-arrow-callback": 0,
- "prefer-const": "error",
- "prefer-reflect": 0,
- "prefer-rest-params": "error",
- "prefer-spread": "error",
- "prefer-template": 0,
- "require-yield": 0,
- "template-curly-spacing": [
- "error",
- "never"
- ],
- "yield-star-spacing": [
- "error",
- "after"
- ],
- /*
- * react plugin
- */
- "react/display-name": 0,
- "react/forbid-prop-types": [
- "error",
- {
- "forbid": [
- "any"
- ]
- }
- ],
- "react/no-danger": "error",
- "react/no-deprecated": "error",
- "react/no-did-mount-set-state": "error",
- "react/no-did-update-set-state": "error",
- "react/no-direct-mutation-state": "error",
- "react/no-is-mounted": "error",
- "react/no-multi-comp": "error",
- "react/no-set-state": 0,
- "react/no-string-refs": 0,
- "react/no-unknown-property": 0,
- "react/prefer-es6-class": [
- "error",
- "always"
- ],
- "react/prefer-stateless-function": 0,
- "react/prop-types": 0,
- "react/react-in-jsx-scope": "error",
- "react/require-extension": 0,
- "react/self-closing-comp": "error",
- "react/sort-comp": 0,
- "react/sort-prop-types": 0,
- "react/jsx-wrap-multilines": "error",
- "react/jsx-boolean-value": [
- "error",
- "always"
- ],
- "react/jsx-closing-bracket-location": "error",
- "react/jsx-curly-spacing": [
- "error",
- "never"
- ],
- "react/jsx-equals-spacing": [
- "error",
- "never"
- ],
- "react/jsx-handler-names": [
- "error",
- {
- "eventHandlerPropPrefix": "handle"
- }
- ],
- "react/jsx-indent-props": [
- 0,
- 2
- ],
- "react/jsx-indent": [
- "error",
- 2
- ],
- "react/jsx-key": "error",
- "react/jsx-max-props-per-line": [
- "error",
- {
- "maximum": 2
- }
- ],
- "react/jsx-no-bind": 0,
- "react/jsx-no-duplicate-props": [
- "error",
- {
- "ignoreCase": true
- }
- ],
- "react/jsx-no-literals": "error",
- "react/jsx-no-undef": "error",
- "react/jsx-pascal-case": "error",
- "react/jsx-sort-props": 0,
- "react/jsx-space-before-closing": 0,
- "react/jsx-uses-react": "error",
- "react/jsx-uses-vars": "error",
- /*
- * react-native plugin
- */
- "react-native/no-unused-styles": "error",
- "react-native/split-platform-components": "error"
- }
- }
|