Skip to content

Commit 664eead

Browse files
missjingatian25
authored andcommittedSep 10, 2019
feat: no-this-alias allow self=this (#48)
1 parent 23142f1 commit 664eead

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
 

‎lib/rules/typescript.js

+10
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,15 @@ module.exports = {
9898
* @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/triple-slash-reference.md
9999
*/
100100
'@typescript-eslint/triple-slash-reference': 'off',
101+
102+
/**
103+
* @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-this-alias.md
104+
*/
105+
'@typescript-eslint/no-this-alias': [
106+
'error',
107+
{
108+
allowedNames: [ 'self' ], // Allow `const self = this`; `[]` by default
109+
},
110+
],
101111
},
102112
};

0 commit comments

Comments
 (0)
Please sign in to comment.