Skip to content

Commit ba848a9

Browse files
maxp-hoverjrolfs
andcommitted
feat(config/eslint): disable class-methods-use-this rule
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]>
1 parent 4460c1f commit ba848a9

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/config/__tests__/__snapshots__/eslintrc.js.snap

+2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ Object {
6666
"@typescript-eslint/no-implied-eval": "off",
6767
"@typescript-eslint/no-throw-literal": "off",
6868
"@typescript-eslint/return-await": "off",
69+
"class-methods-use-this": "off",
6970
"import/no-extraneous-dependencies": Array [
7071
"error",
7172
Object {
@@ -197,6 +198,7 @@ Object {
197198
"@typescript-eslint/no-implied-eval": "off",
198199
"@typescript-eslint/no-throw-literal": "off",
199200
"@typescript-eslint/return-await": "off",
201+
"class-methods-use-this": "off",
200202
"import/no-extraneous-dependencies": Array [
201203
"error",
202204
Object {

src/config/helpers/build-eslint.js

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const buildConfig = ({withReact = false} = {}) => {
5151
ifReact('plugin:react-hooks/recommended'),
5252
].filter(Boolean),
5353
rules: {
54+
'class-methods-use-this': 'off',
5455
'import/prefer-default-export': 'off',
5556
'import/no-extraneous-dependencies': [
5657
'error',

0 commit comments

Comments
 (0)