API & Client: pre-commit lint
This commit is contained in:
@ -1,477 +0,0 @@
|
||||
{
|
||||
"root": true,
|
||||
"parser": "babel-eslint",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2017,
|
||||
"sourceType": "module",
|
||||
"ecmaFeatures": {
|
||||
"jsx": true,
|
||||
"module": true,
|
||||
"experimentalObjectRestSpread": true
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"es6": true,
|
||||
"jest": true
|
||||
},
|
||||
"rules": {
|
||||
"no-alert": "warn",
|
||||
"no-array-constructor": "off",
|
||||
"no-await-in-loop": "off",
|
||||
"no-bitwise": "off",
|
||||
"no-caller": "warn",
|
||||
"no-case-declarations": "error",
|
||||
"no-catch-shadow": "off",
|
||||
"no-class-assign": "error",
|
||||
"no-compare-neg-zero": "warn",
|
||||
"no-cond-assign": "error",
|
||||
"no-confusing-arrow": "off",
|
||||
"no-console": [
|
||||
"error",
|
||||
{
|
||||
"allow": [
|
||||
"warn",
|
||||
"error",
|
||||
"info"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-const-assign": "error",
|
||||
"no-constant-condition": "error",
|
||||
"no-continue": "off",
|
||||
"no-control-regex": "error",
|
||||
"no-debugger": "off",
|
||||
"no-delete-var": "error",
|
||||
"no-div-regex": "off",
|
||||
"no-dupe-args": "error",
|
||||
"no-dupe-class-members": "error",
|
||||
"no-dupe-keys": "error",
|
||||
"no-duplicate-case": "error",
|
||||
"no-duplicate-imports": "warn",
|
||||
"no-else-return": "warn",
|
||||
"no-empty": "error",
|
||||
"no-empty-character-class": "error",
|
||||
"no-empty-function": "off",
|
||||
"no-empty-pattern": "error",
|
||||
"no-eq-null": "warn",
|
||||
"no-eval": "error",
|
||||
"no-ex-assign": "error",
|
||||
"no-extend-native": "error",
|
||||
"no-extra-bind": "warn",
|
||||
"no-extra-boolean-cast": "error",
|
||||
"no-extra-label": "warn",
|
||||
"no-extra-parens": "off",
|
||||
"no-extra-semi": "off",
|
||||
"no-fallthrough": "error",
|
||||
"no-floating-decimal": "off",
|
||||
"no-func-assign": "error",
|
||||
"no-global-assign": "error",
|
||||
"no-implicit-coercion": "off",
|
||||
"no-implicit-globals": "off",
|
||||
"no-implied-eval": "error",
|
||||
"no-inline-comments": "off",
|
||||
"no-inner-declarations": "error",
|
||||
"no-invalid-regexp": "error",
|
||||
"no-invalid-this": "error",
|
||||
"no-irregular-whitespace": [
|
||||
"warn",
|
||||
{
|
||||
"skipStrings": true,
|
||||
"skipTemplates": true
|
||||
}
|
||||
],
|
||||
"no-iterator": "off",
|
||||
"no-label-var": "off",
|
||||
"no-labels": "off",
|
||||
"no-lone-blocks": "warn",
|
||||
"no-lonely-if": "warn",
|
||||
"no-loop-func": "warn",
|
||||
"no-magic-numbers": "off",
|
||||
"no-mixed-operators": "off",
|
||||
"no-mixed-requires": "off",
|
||||
"no-mixed-spaces-and-tabs": "error",
|
||||
"no-multi-assign": "off",
|
||||
"no-multi-spaces": "error",
|
||||
"no-multi-str": "off",
|
||||
"no-multiple-empty-lines": "warn",
|
||||
"no-native-reassign": "off",
|
||||
"no-negated-condition": "warn",
|
||||
"no-negated-in-lhs": "off",
|
||||
"no-nested-ternary": "off",
|
||||
"no-new": "off",
|
||||
"no-new-func": "off",
|
||||
"no-new-object": "off",
|
||||
"no-new-require": "off",
|
||||
"no-new-symbol": "error",
|
||||
"no-new-wrappers": "off",
|
||||
"no-obj-calls": "error",
|
||||
"no-octal": "error",
|
||||
"no-octal-escape": "off",
|
||||
"no-param-reassign": "off",
|
||||
"no-path-concat": "warn",
|
||||
"no-plusplus": "off",
|
||||
"no-process-env": "off",
|
||||
"no-process-exit": "off",
|
||||
"no-proto": "off",
|
||||
"no-prototype-builtins": "off",
|
||||
"no-redeclare": "error",
|
||||
"no-regex-spaces": "error",
|
||||
"no-restricted-globals": "off",
|
||||
"no-restricted-imports": "off",
|
||||
"no-restricted-modules": "off",
|
||||
"no-restricted-properties": "off",
|
||||
"no-restricted-syntax": "off",
|
||||
"no-return-assign": "off",
|
||||
"no-return-await": "warn",
|
||||
"no-script-url": "error",
|
||||
"no-self-assign": "error",
|
||||
"no-self-compare": "error",
|
||||
"no-sequences": "warn",
|
||||
"no-shadow": "warn",
|
||||
"no-shadow-restricted-names": "warn",
|
||||
"no-whitespace-before-property": "error",
|
||||
"no-spaced-func": "off",
|
||||
"no-sparse-arrays": "error",
|
||||
"no-sync": "off",
|
||||
"no-tabs": "error",
|
||||
"no-ternary": "off",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-this-before-super": "error",
|
||||
"no-throw-literal": "warn",
|
||||
"no-undef": "error",
|
||||
"no-undef-init": "warn",
|
||||
"no-undefined": "error",
|
||||
"no-unexpected-multiline": "error",
|
||||
"no-underscore-dangle": "off",
|
||||
"no-unmodified-loop-condition": "off",
|
||||
"no-unneeded-ternary": "error",
|
||||
"no-unreachable": "error",
|
||||
"no-unsafe-finally": "error",
|
||||
"no-unsafe-negation": "error",
|
||||
"no-unused-expressions": [
|
||||
"error",
|
||||
{
|
||||
"allowShortCircuit": true,
|
||||
"allowTernary": true
|
||||
}
|
||||
],
|
||||
"no-unused-labels": "error",
|
||||
"no-unused-vars": "error",
|
||||
"no-use-before-define": "off",
|
||||
"no-useless-call": "error",
|
||||
"no-useless-computed-key": "off",
|
||||
"no-useless-concat": "off",
|
||||
"no-useless-constructor": "error",
|
||||
"no-useless-escape": "warn",
|
||||
"no-useless-rename": "error",
|
||||
"no-useless-return": "error",
|
||||
"no-void": "off",
|
||||
"no-var": "off",
|
||||
"no-warning-comments": [
|
||||
"warn",
|
||||
{
|
||||
"terms": [
|
||||
"todo",
|
||||
"fixme",
|
||||
"xxx"
|
||||
],
|
||||
"location": "start"
|
||||
}
|
||||
],
|
||||
"no-with": "off",
|
||||
"array-bracket-spacing": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"array-callback-return": "off",
|
||||
"arrow-body-style": [
|
||||
"error",
|
||||
"as-needed"
|
||||
],
|
||||
"arrow-parens": [
|
||||
"error",
|
||||
"as-needed"
|
||||
],
|
||||
"arrow-spacing": "error",
|
||||
"accessor-pairs": "off",
|
||||
"block-scoped-var": "warn",
|
||||
"block-spacing": "error",
|
||||
"brace-style": [
|
||||
"error",
|
||||
"1tbs"
|
||||
],
|
||||
"callback-return": "off",
|
||||
"camelcase": [
|
||||
"warn", {
|
||||
"properties": "never"
|
||||
}],
|
||||
"capitalized-comments": "off",
|
||||
"class-methods-use-this": "off",
|
||||
"comma-dangle": "off",
|
||||
"comma-spacing": "error",
|
||||
"comma-style": [
|
||||
"error",
|
||||
"last"
|
||||
],
|
||||
"complexity": "off",
|
||||
"computed-property-spacing": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"consistent-return": "off",
|
||||
"consistent-this": "off",
|
||||
"constructor-super": "error",
|
||||
"curly": "error",
|
||||
"default-case": "off",
|
||||
"dot-location": [
|
||||
"warn",
|
||||
"property"
|
||||
],
|
||||
"dot-notation": "error",
|
||||
"eol-last": "error",
|
||||
"eqeqeq": [
|
||||
"error",
|
||||
"smart"
|
||||
],
|
||||
"func-call-spacing": "error",
|
||||
"func-names": "off",
|
||||
"func-name-matching": "off",
|
||||
"func-style": "off",
|
||||
"generator-star-spacing": "error",
|
||||
"global-require": "off",
|
||||
"guard-for-in": "warn",
|
||||
"handle-callback-err": "off",
|
||||
"id-blacklist": "off",
|
||||
"id-length": "off",
|
||||
"id-match": "off",
|
||||
"indent": "off",
|
||||
"init-declarations": "off",
|
||||
"jsx-quotes": "error",
|
||||
"key-spacing": "error",
|
||||
"keyword-spacing": "error",
|
||||
"linebreak-style": "error",
|
||||
"line-comment-position": "off",
|
||||
"lines-around-comment": "off",
|
||||
"lines-around-directive": "off",
|
||||
"max-depth": "warn",
|
||||
"max-len": "error",
|
||||
"max-lines": [
|
||||
"warn",
|
||||
500
|
||||
],
|
||||
"max-nested-callbacks": "warn",
|
||||
"max-params": "off",
|
||||
"max-statements": "off",
|
||||
"max-statements-per-line": "error",
|
||||
"multiline-ternary": "off",
|
||||
"new-cap": "off",
|
||||
"new-parens": "error",
|
||||
"newline-after-var": "off",
|
||||
"newline-before-return": "off",
|
||||
"newline-per-chained-call": "off",
|
||||
"object-curly-newline": "off",
|
||||
"object-curly-spacing": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"object-property-newline": [
|
||||
"error",
|
||||
{
|
||||
"allowMultiplePropertiesPerLine": true
|
||||
}
|
||||
],
|
||||
"object-shorthand": "off",
|
||||
"one-var": "off",
|
||||
"one-var-declaration-per-line": "off",
|
||||
"operator-assignment": "warn",
|
||||
"operator-linebreak": "error",
|
||||
"padded-blocks": "off",
|
||||
"prefer-arrow-callback": "off",
|
||||
"prefer-const": "warn",
|
||||
"prefer-destructuring": "warn",
|
||||
"prefer-numeric-literals": "warn",
|
||||
"prefer-promise-reject-errors": "warn",
|
||||
"prefer-reflect": "off",
|
||||
"prefer-rest-params": "error",
|
||||
"prefer-spread": "error",
|
||||
"prefer-template": "warn",
|
||||
"quote-props": [
|
||||
"error",
|
||||
"as-needed"
|
||||
],
|
||||
"quotes": [
|
||||
"warn",
|
||||
"single", {
|
||||
"avoidEscape": true
|
||||
}
|
||||
],
|
||||
"radix": "off",
|
||||
"require-await": "error",
|
||||
"require-jsdoc": "off",
|
||||
"require-yield": "error",
|
||||
"rest-spread-spacing": "error",
|
||||
"semi": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"semi-spacing": "error",
|
||||
"sort-keys": "off",
|
||||
"sort-imports": "off",
|
||||
"sort-vars": "off",
|
||||
"space-before-blocks": "error",
|
||||
"space-before-function-paren": "off",
|
||||
"space-in-parens": "error",
|
||||
"space-infix-ops": "error",
|
||||
"space-unary-ops": "error",
|
||||
"spaced-comment": "error",
|
||||
"strict": "off",
|
||||
"symbol-description": "off",
|
||||
"template-curly-spacing": "off",
|
||||
"template-tag-spacing": "off",
|
||||
"unicode-bom": "error",
|
||||
"use-isnan": "error",
|
||||
"valid-jsdoc": "off",
|
||||
"valid-typeof": "error",
|
||||
"vars-on-top": "warn",
|
||||
"wrap-iife": "off",
|
||||
"wrap-regex": "off",
|
||||
"no-template-curly-in-string": "warn",
|
||||
"yield-star-spacing": "error",
|
||||
"yoda": "off",
|
||||
"react/display-name": "error",
|
||||
"react/forbid-component-props": "off",
|
||||
"react/forbid-prop-types": "off",
|
||||
"react/no-array-index-key": "error",
|
||||
"react/no-children-prop": "error",
|
||||
"react/no-danger": "warn",
|
||||
"react/no-danger-with-children": "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-find-dom-node": "error",
|
||||
"react/no-is-mounted": "error",
|
||||
"react/no-multi-comp": "error",
|
||||
"react/no-render-return-value": "error",
|
||||
"react/no-set-state": "off",
|
||||
"react/no-string-refs": "error",
|
||||
"react/no-unescaped-entities": "error",
|
||||
"react/no-unknown-property": "error",
|
||||
"react/no-unused-prop-types": "off",
|
||||
"react/prefer-es6-class": "error",
|
||||
"react/prefer-stateless-function": "error",
|
||||
"react/prop-types": "off",
|
||||
"react/react-in-jsx-scope": "error",
|
||||
"react/react-default-props": "off",
|
||||
"react/require-optimization": "off",
|
||||
"react/require-render-return": "error",
|
||||
"react/self-closing-comp": "error",
|
||||
"react/sort-comp": "error",
|
||||
"react/sort-prop-types": "error",
|
||||
"react/style-prop-object": "off",
|
||||
"react/jsx-boolean-value": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"react/jsx-closing-bracket-location": "error",
|
||||
"react/jsx-curly-spacing": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"react/jsx-equals-spacing": "error",
|
||||
"react/jsx-filename-extension": "error",
|
||||
"react/jsx-first-prop-new-line": [
|
||||
"error",
|
||||
"multiline-multiprop"
|
||||
],
|
||||
"react/jsx-handler-names": "error",
|
||||
"react/jsx-indent": "off",
|
||||
"react/jsx-indent-props": "off",
|
||||
"react/jsx-key": "error",
|
||||
"react/jsx-max-props-per-line": "off",
|
||||
"react/jsx-no-bind": "off",
|
||||
"react/jsx-no-comment-textnodes": "error",
|
||||
"react/jsx-no-duplicate-props": "error",
|
||||
"react/jsx-no-literals": "off",
|
||||
"react/jsx-no-target-blank": "error",
|
||||
"react/jsx-no-undef": "error",
|
||||
"react/jsx-pascal-case": ["error", {
|
||||
"ignore": ["_"]
|
||||
}],
|
||||
"react/jsx-sort-props": "off",
|
||||
"react/jsx-tag-spacing": [
|
||||
"error",
|
||||
{
|
||||
"beforeSelfClosing": "always"
|
||||
}
|
||||
],
|
||||
"react/jsx-uses-react": "error",
|
||||
"react/jsx-uses-vars": "error",
|
||||
"react/jsx-wrap-multilines": "error",
|
||||
"import/no-unresolved": "error",
|
||||
"import/named": "error",
|
||||
"import/default": "error",
|
||||
"import/namespace": "error",
|
||||
"import/no-restricted-paths": "off",
|
||||
"import/no-absolute-path": "error",
|
||||
"import/no-dynamic-require": "off",
|
||||
"import/no-internal-modules": "off",
|
||||
"import/no-webpack-loader-syntax": "error",
|
||||
"import/export": "error",
|
||||
"import/no-named-as-default": "warn",
|
||||
"import/no-named-as-default-member": "warn",
|
||||
"import/no-deprecated": "warn",
|
||||
"import/no-extraneous-dependencies": "warn",
|
||||
"import/no-mutable-exports": "warn",
|
||||
"import/unambiguous": "off",
|
||||
"import/no-commonjs": "off",
|
||||
"import/no-amd": "error",
|
||||
"import/no-nodejs-modules": "off",
|
||||
"import/first": "warn",
|
||||
"import/no-duplicates": "error",
|
||||
"import/no-namespace": "warn",
|
||||
"import/extensions": "warn",
|
||||
"import/order": [
|
||||
"error",
|
||||
{
|
||||
"newlines-between": "always",
|
||||
"groups": [
|
||||
"builtin",
|
||||
"external",
|
||||
[
|
||||
"parent",
|
||||
"sibling",
|
||||
"index"
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"import/newline-after-import": [
|
||||
"error",
|
||||
{
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"import/prefer-default-export": "off",
|
||||
"import/max-dependencies": "off",
|
||||
"import/no-unassigned-import": "off",
|
||||
"import/no-named-default": "warn",
|
||||
"import/no-anonymous-default-export": "off"
|
||||
},
|
||||
"plugins": [
|
||||
"react",
|
||||
"import"
|
||||
],
|
||||
"settings": {
|
||||
"import/resolver": {
|
||||
"node": {
|
||||
"extensions": [
|
||||
".js",
|
||||
".jsx"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -3,7 +3,11 @@ import { connect } from 'react-redux'
|
||||
import { Redirect } from 'react-router-dom'
|
||||
|
||||
import Form from './Form'
|
||||
import { emptyForm, handleFormChange, handleUserFormSubmit } from '../../actions'
|
||||
import {
|
||||
emptyForm,
|
||||
handleFormChange,
|
||||
handleUserFormSubmit
|
||||
} from '../../actions'
|
||||
import { isLoggedIn } from '../../utils'
|
||||
|
||||
class UserForm extends React.Component {
|
||||
|
Reference in New Issue
Block a user