Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

feat: use TS variant of class-methods-use-this #358

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,16 @@ module.exports = {
'object-curly-spacing': 'off',
'@typescript-eslint/object-curly-spacing': baseStyleRules['object-curly-spacing'],

// The base rule works fine with Typescript, but the Typescript version has
// additional options for our users.
'class-methods-use-this': 'off',
'@typescript-eslint/class-methods-use-this': [
baseBestPracticesRules['class-methods-use-this'][0],
{
...baseBestPracticesRules['class-methods-use-this'][1],
},
],

// Append 'ts' and 'tsx' to Airbnb 'import/extensions' rule
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md
'import/extensions': [
Expand Down