Skip to content

Commit

Permalink
Change class-methods-use-this to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkpks authored and matejchalk committed Feb 19, 2024
1 parent bd52969 commit 3cf3164
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Refer to [setup instructions in README](../README.md#πŸ—οΈ-setup).

> πŸ”§ Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).<br>πŸ’‘ Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).<br>πŸ§ͺ🚫 Disabled for [test files](../README.md#πŸ§ͺ-test-overrides).<br>πŸ§ͺ⚠️ Severity lessened to warning for [test files](../README.md#πŸ§ͺ-test-overrides).
### 🚨 Errors (116)
### 🚨 Errors (115)

| Plugin | Rule | Options | Autofix | Overrides |
| :-: | :-- | :-- | :-: | :-: |
Expand Down Expand Up @@ -69,7 +69,6 @@ Refer to [setup instructions in README](../README.md#πŸ—οΈ-setup).
| | [valid-typeof](https://eslint.org/docs/latest/rules/valid-typeof)<br>Enforce comparing `typeof` expressions against valid strings | | πŸ’‘ | |
| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [ban-ts-comment](https://typescript-eslint.io/rules/ban-ts-comment)<br>Disallow `@ts-<directive>` comments or require descriptions after directives | | πŸ’‘ | |
| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [ban-types](https://typescript-eslint.io/rules/ban-types)<br>Disallow certain types | | πŸ”§, πŸ’‘ | |
| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [class-methods-use-this](https://typescript-eslint.io/rules/class-methods-use-this)<br>Enforce that class methods utilize `this` | | | |
| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-array-constructor](https://typescript-eslint.io/rules/no-array-constructor)<br>Disallow generic `Array` constructors | | πŸ”§ | |
| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-duplicate-enum-values](https://typescript-eslint.io/rules/no-duplicate-enum-values)<br>Disallow duplicate enum member values | | | |
| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-explicit-any](https://typescript-eslint.io/rules/no-explicit-any)<br>Disallow the `any` type | | πŸ”§, πŸ’‘ | πŸ§ͺ🚫 |
Expand Down Expand Up @@ -131,7 +130,7 @@ Refer to [setup instructions in README](../README.md#πŸ—οΈ-setup).
| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [prefer-single-boolean-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-single-boolean-return.md)<br>Return of boolean expressions should not be wrapped into an "if-then-else" statement | | πŸ’‘ | |
| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [prefer-while](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-while.md)<br>A "while" loop should be used instead of a "for" loop | | πŸ”§ | |

### ⚠️ Warnings (135)
### ⚠️ Warnings (136)

| Plugin | Rule | Options | Autofix | Overrides |
| :-: | :-- | :-- | :-: | :-: |
Expand All @@ -150,6 +149,7 @@ Refer to [setup instructions in README](../README.md#πŸ—οΈ-setup).
| | [prefer-template](https://eslint.org/docs/latest/rules/prefer-template)<br>Require template literals instead of string concatenation | | πŸ”§ | |
| | [radix](https://eslint.org/docs/latest/rules/radix)<br>Enforce the consistent use of the radix argument when using `parseInt()` | | πŸ’‘ | |
| | [yoda](https://eslint.org/docs/latest/rules/yoda)<br>Require or disallow "Yoda" conditions | | πŸ”§ | |
| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [class-methods-use-this](https://typescript-eslint.io/rules/class-methods-use-this)<br>Enforce that class methods utilize `this` | | | |
| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [consistent-type-definitions](https://typescript-eslint.io/rules/consistent-type-definitions)<br>Enforce type definitions to consistently use either `interface` or `type` | <details><summary>type</summary><pre>"type"</pre></details> | πŸ”§ | |
| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [default-param-last](https://typescript-eslint.io/rules/default-param-last)<br>Enforce default parameters to be last | | | |
| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [max-params](https://typescript-eslint.io/rules/max-params)<br>Enforce a maximum number of parameters in function definitions | <details><summary>max: 4</summary><pre>{<br> "max": 4<br>}</pre></details> | | |
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ module.exports = {
// add new "class-methods-use-this" rule (added in @typescript-eslint/[email protected])
...(typescriptEslint.rules['class-methods-use-this']
? {
'@typescript-eslint/class-methods-use-this': 'error',
'@typescript-eslint/class-methods-use-this': 'warn',
}
: {}),
'@typescript-eslint/max-params': ['warn', { max: 4 }],
Expand Down

0 comments on commit 3cf3164

Please sign in to comment.