Skip to content

Commit

Permalink
feat(config/eslint): disable class-methods-use-this rule
Browse files Browse the repository at this point in the history
It makes the interface less stable. If you change a method between instance and
class, you have to change all invocations. Whether or not it uses `this` is an
implementation detail that should not matter for the interface

Co-authored-by: Jamie Rolfs <[email protected]>
  • Loading branch information
maxp-hover and jrolfs committed Apr 12, 2022
1 parent 4460c1f commit ba848a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/config/__tests__/__snapshots__/eslintrc.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Object {
"@typescript-eslint/no-implied-eval": "off",
"@typescript-eslint/no-throw-literal": "off",
"@typescript-eslint/return-await": "off",
"class-methods-use-this": "off",
"import/no-extraneous-dependencies": Array [
"error",
Object {
Expand Down Expand Up @@ -197,6 +198,7 @@ Object {
"@typescript-eslint/no-implied-eval": "off",
"@typescript-eslint/no-throw-literal": "off",
"@typescript-eslint/return-await": "off",
"class-methods-use-this": "off",
"import/no-extraneous-dependencies": Array [
"error",
Object {
Expand Down
1 change: 1 addition & 0 deletions src/config/helpers/build-eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const buildConfig = ({withReact = false} = {}) => {
ifReact('plugin:react-hooks/recommended'),
].filter(Boolean),
rules: {
'class-methods-use-this': 'off',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': [
'error',
Expand Down

0 comments on commit ba848a9

Please sign in to comment.