Skip to content

Commit

Permalink
test: all plugin rules are considered
Browse files Browse the repository at this point in the history
Co-authored-by: Shahar Dawn Or <mightyiampresence@gmail.com>
  • Loading branch information
rostislav-simonik and mightyiam committed Jan 5, 2023
1 parent 15ab644 commit f91887f
Showing 1 changed file with 119 additions and 0 deletions.
119 changes: 119 additions & 0 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,3 +353,122 @@ test('configs of equivalents are supersets of upstream', (t) => {
})
})
})

test('all plugin rules are considered', (t) => {
const intentionallyExcludedRules: string[] = [
]
// Some of these rules may have been considered but the reason for their exclusion
// is not captured here.
// 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[] = [
'adjacent-overload-signatures',
'array-type',
'await-thenable',
'ban-ts-comment',
'ban-tslint-comment',
'ban-types',
'class-literal-property-style',
'consistent-generic-constructors',
'consistent-indexed-object-style',
'consistent-type-assertions',
'consistent-type-definitions',
'consistent-type-exports',
'consistent-type-imports',
'default-param-last',
'explicit-function-return-type',
'explicit-member-accessibility',
'explicit-module-boundary-types',
'init-declarations',
'member-delimiter-style',
'member-ordering',
'method-signature-style',
'naming-convention',
'no-base-to-string',
'no-confusing-non-null-assertion',
'no-confusing-void-expression',
'no-duplicate-enum-values',
'no-duplicate-imports',
'no-dynamic-delete',
'no-empty-function',
'no-empty-interface',
'no-explicit-any',
'no-extra-non-null-assertion',
'no-extra-semi',
'no-extraneous-class',
'no-floating-promises',
'no-for-in-array',
'no-implicit-any-catch',
'no-implied-eval',
'no-inferrable-types',
'no-invalid-this',
'no-invalid-void-type',
'no-loop-func',
'no-magic-numbers',
'no-meaningless-void-operator',
'no-misused-new',
'no-misused-promises',
'no-namespace',
'no-non-null-asserted-nullish-coalescing',
'no-non-null-asserted-optional-chain',
'no-non-null-assertion',
'no-parameter-properties',
'no-redundant-type-constituents',
'no-require-imports',
'no-restricted-imports',
'no-shadow',
'no-this-alias',
'no-type-alias',
'no-unnecessary-boolean-literal-compare',
'no-unnecessary-condition',
'no-unnecessary-qualifier',
'no-unnecessary-type-arguments',
'no-unnecessary-type-assertion',
'no-unnecessary-type-constraint',
'no-unsafe-argument',
'no-unsafe-assignment',
'no-unsafe-call',
'no-unsafe-declaration-merging',
'no-unsafe-member-access',
'no-unsafe-return',
'no-useless-empty-export',
'no-var-requires',
'non-nullable-type-assertion-style',
'padding-line-between-statements',
'parameter-properties',
'prefer-as-const',
'prefer-enum-initializers',
'prefer-for-of',
'prefer-function-type',
'prefer-includes',
'prefer-literal-enum-member',
'prefer-namespace-keyword',
'prefer-nullish-coalescing',
'prefer-optional-chain',
'prefer-readonly',
'prefer-readonly-parameter-types',
'prefer-reduce-type-parameter',
'prefer-regexp-exec',
'prefer-return-this-type',
'prefer-string-starts-ends-with',
'prefer-ts-expect-error',
'promise-function-async',
'require-array-sort-compare',
'require-await',
'restrict-plus-operands',
'restrict-template-expressions',
'return-await',
'sort-type-constituents',
'sort-type-union-intersection-members',
'strict-boolean-expressions',
'switch-exhaustiveness-check',
'triple-slash-reference',
'type-annotation-spacing',
'typedef',
'unbound-method',
'unified-signatures'
]
const inexplicablyExcludedRules = Object.keys(typescriptEslintRules)
.filter((rule) => !Object.keys(ourRules).includes(rule) && !intentionallyExcludedRules.includes(rule) && !notYetConsideredRules.includes(rule))
t.deepEqual(inexplicablyExcludedRules, [])
})

0 comments on commit f91887f

Please sign in to comment.