diff --git a/.eslintrc.js b/.eslintrc.js index 8cfdc3c..26babac 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,72 +16,38 @@ const todo = { ignore: ['children'] } ], - 'comma-dangle': [ - 'off' - ], - 'arrow-parens': [ - 'off' - ], - 'indent': [ - 'off' - ], 'react/no-find-dom-node': [ // can use refs instead - 'off', + 'error', ], 'react/default-props-match-prop-types': [ 'off' ], - 'react/no-access-state-in-setstate': [ - 'off' - ], 'default-param-last': [ 'off' ], 'max-classes-per-file': [ - 'off' - ], - 'no-param-reassign': [ - 'off' + 'error', + { + ignoreExpressions: true, + } ], 'no-unused-vars': [ - 'off', + 'error', { 'vars': 'local', 'ignoreRestSiblings': true } ], - 'implicit-arrow-linebreak': [ - 'off' - ], - 'no-param-reassign': [ - 'off' - ], 'no-redeclare': [ 'off' ], - 'no-restricted-globals': [ - 'off' - ], - 'no-dupe-keys': [ - 'off' - ], - // the following can be automatically fixed via the --fix option - 'import/order': [ - 'off' - ], - 'import/no-cycle': [ - 'off' - ], 'function-paren-newline': [ 'off' ], 'object-curly-newline': [ 'off' ], - 'no-multiple-empty-lines': [ - 'off' - ], 'prefer-object-spread': [ 'off' ], @@ -94,14 +60,12 @@ const todo = { 'function-call-argument-newline': [ 'off' ], - 'no-unneeded-ternary': [ - 'off' - ], - 'semi-style': [ - 'off' - ], 'lines-between-class-members': [ - 'off' + 'error', + 'always', + { + 'exceptAfterSingleLine': true + } ], 'react/jsx-curly-newline': [ 'off' @@ -109,33 +73,9 @@ const todo = { 'react/jsx-wrap-multilines': [ 'off' ], - 'react/jsx-tag-spacing': [ - 'off' - ], 'react/jsx-one-expression-per-line': [ 'off' ], - 'react/jsx-fragments': [ - 'off' - ], - 'react/jsx-curly-brace-presence': [ - 'off' - ], - 'react/jsx-closing-tag-location': [ - 'off' - ], - 'react/jsx-no-useless-fragment': [ - 'off' - ], - 'react/no-unused-state': [ - 'off' - ], - 'react/forbid-foreign-prop-types': [ - 'off' - ], - 'react/no-deprecated': [ - 'off' - ], }; module.exports = { @@ -159,9 +99,6 @@ module.exports = { 'import/no-extraneous-dependencies': [ 'off' ], - 'import/no-unresolved': [ - 'off' - ], // turned off because the PHP side returns dangling properties which trigger this... // could revise later and add exceptions for PHP data 'no-underscore-dangle': [ @@ -192,15 +129,9 @@ module.exports = { 'off' ], 'react/prefer-stateless-function': [ - 'off', + 'error', { 'ignorePureComponents': true } ], - 'import/prefer-default-export': [ - 'off' - ], - 'import/first': [ - 'off' - ], 'class-methods-use-this': [ 'off' ], @@ -208,17 +139,6 @@ module.exports = { 'no-useless-escape': [ 'off' ], - // these accessibility rules will be a detriment to existing code/styles, - // perhaps in the future - 'jsx-a11y/href-no-hash': [ - 'off' - ], - 'jsx-a11y/iframe-has-title': [ - 'off' - ], - 'jsx-a11y/anchor-has-content': [ - 'off' - ], 'jsx-a11y/control-has-associated-label': [ 'off' ], @@ -228,24 +148,15 @@ module.exports = { 'jsx-a11y/no-static-element-interactions': [ 'off' ], - 'jsx-a11y/anchor-is-valid': [ - 'off' - ], 'no-prototype-builtins': [ 'off' ], - 'prefer-destructuring': [ - 'off' - ], 'prefer-promise-reject-errors': [ 'off' ], 'no-promise-executor-return': [ 'off' ], - 'func-names': [ - 'off' - ], 'react/destructuring-assignment': [ 'off' ], @@ -255,18 +166,9 @@ module.exports = { 'react/button-has-type': [ 'off' ], - 'react/no-array-index-key': [ - 'off' - ], - 'react/jsx-indent': [ - 'off' - ], 'react/sort-comp': [ 'off' ], - 'react/no-unused-prop-types': [ - 'off' - ], 'react/no-unused-class-component-methods': [ 'off' ], @@ -312,4 +214,4 @@ module.exports = { } } } -}; +}; \ No newline at end of file