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 5, 2023
1 parent ce60603 commit 9c5ffea
Showing 1 changed file with 8 additions and 70 deletions.
78 changes: 8 additions & 70 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,21 @@ const todo = {
'arrow-parens': [
'off'
],
'indent': [
'off'
],
'react/no-find-dom-node': [
// can use refs instead
'off',
],
'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'
],
'no-unused-vars': [
'off',
'error',
{
'vars': 'local',
'ignoreRestSiblings': true
Expand All @@ -54,34 +45,18 @@ const todo = {
'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,14 +69,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'
Expand All @@ -115,27 +88,12 @@ const todo = {
'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 +117,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,27 +147,19 @@ 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'
],
Expand Down Expand Up @@ -255,18 +202,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 +250,4 @@ module.exports = {
}
}
}
};
};

0 comments on commit 9c5ffea

Please sign in to comment.