Skip to content

Commit

Permalink
MNT Turn on some ESLint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabina Talipova committed Jul 3, 2023
1 parent ce60603 commit 1d82190
Showing 1 changed file with 13 additions and 111 deletions.
124 changes: 13 additions & 111 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
],
Expand All @@ -94,48 +60,22 @@ 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'
],
'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 = {
Expand All @@ -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': [
Expand Down Expand Up @@ -192,33 +129,16 @@ module.exports = {
'off'
],
'react/prefer-stateless-function': [
'off',
'error',
{ 'ignorePureComponents': true }
],
'import/prefer-default-export': [
'off'
],
'import/first': [
'off'
],
'class-methods-use-this': [
'off'
],
// this one makes no sense in some regex contexts
'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'
],
Expand All @@ -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'
],
Expand All @@ -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'
],
Expand Down Expand Up @@ -312,4 +214,4 @@ module.exports = {
}
}
}
};
};

0 comments on commit 1d82190

Please sign in to comment.