Skip to content

Commit

Permalink
feat: @typescript-eslint/ban-ts-comment
Browse files Browse the repository at this point in the history
BREAKING CHANGE: @typescript-eslint/ban-ts-comment

Co-authored-by: Shahar Dawn Or <mightyiampresence@gmail.com>
  • Loading branch information
rostislav-simonik and mightyiam committed Jan 17, 2023
1 parent 907dd6a commit 13e53c0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ test('export', (t): void => {
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-comment': ['error', {
'ts-expect-error': 'allow-with-description',
'ts-ignore': true,
'ts-nocheck': true,
'ts-check': false,
minimumDescriptionLength: 3
}],
'@typescript-eslint/brace-style': ['error', '1tbs', { allowSingleLine: true }],
'@typescript-eslint/comma-dangle': ['error', {
arrays: 'never',
Expand Down Expand Up @@ -363,7 +370,6 @@ test('all plugin rules are considered', (t) => {
// This serves as a todo list and should ideally eventually end up empty
// and then fail upon plugin upgrades where new rules are released.
const notYetConsideredRules: string[] = [
'ban-ts-comment',
'ban-tslint-comment',
'ban-types',
'class-literal-property-style',
Expand Down
7 changes: 7 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ const config: Linter.Config = {
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-comment': ['error', {
'ts-expect-error': 'allow-with-description',
'ts-ignore': true,
'ts-nocheck': true,
'ts-check': false,
minimumDescriptionLength: 3
}],
'@typescript-eslint/comma-dangle': ['error', {
arrays: 'never',
objects: 'never',
Expand Down

0 comments on commit 13e53c0

Please sign in to comment.