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

Commit

Permalink
Remove deprecated rules and re-implenent functionality in naming-conv…
Browse files Browse the repository at this point in the history
…ention rule

These changes are introduced in typescript-eslint 3 and can be read about here: https://github.com/typescript-eslint/typescript-eslint/releases/tag/v3.0.0

Changes made:
- ban-ts-remove is replaced by ban-rs-comment
- The new rule naming-convention is used to re-implement the behavior of a few deprecated rules:
  - interface-name-prefix
  - class-name-casing
  - generic-type-naming
  • Loading branch information
FredrikJT committed Feb 26, 2021
1 parent 33d5aca commit fefe735
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions configs/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,38 @@ module.exports = {
default: 'array'
}],
'@typescript-eslint/await-thenable': 'off', // tslint:await-promise
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',

'@typescript-eslint/no-type-alias': 'off', // tslint:interface-over-type-literal
'@typescript-eslint/consistent-type-definitions': 'off', // tslint:interface-over-type-literal

'@typescript-eslint/class-name-casing': 'error', // tslint:class-name
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'enumMember',
format: undefined // Allow enum members to have names formatted in any way.
},
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: false
}
},
{
selector: 'class',
format: ['PascalCase']
},
{
selector: 'typeParameter',
format: ['PascalCase'],
prefix: ['T']
}
],

'@typescript-eslint/explicit-member-accessibility': 'off', // tslint:member-access
'@typescript-eslint/generic-type-naming': 'error',
'@typescript-eslint/interface-name-prefix': 'error', // tslint:interface-name
'@typescript-eslint/member-ordering': ['error'],

// tslint:no-angle-bracket-type-assertion, tslint: no-object-literal-type-assertion
Expand Down

0 comments on commit fefe735

Please sign in to comment.