Chore: reintroduce type assertion test + change emitted metric names (#51375)

* reintroduce type assertion test + change emitted metric names

* rename test to better eslint to be more generic
This commit is contained in:
Ashley Harrison
2022-06-25 12:45:38 +01:00
committed by GitHub
parent c8f814196a
commit 0124dc8e6b
4 changed files with 4579 additions and 212 deletions

View File

@@ -3,18 +3,14 @@ import { eslint } from '@betterer/eslint';
export default {
'no enzyme tests': () => regexp(/from 'enzyme'/g).include('**/*.test.*'),
'no explicit any': () =>
'better eslint': () =>
eslint({
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/consistent-type-assertions': [
'error',
{
assertionStyle: 'never',
},
],
}).include('**/*.{ts,tsx}'),
// TODO reenable this test
// 'no type assertions': () =>
// eslint({
// '@typescript-eslint/consistent-type-assertions': [
// 'error',
// {
// assertionStyle: 'never',
// },
// ],
// }).include('**/*.{ts,tsx}'),
};