Chore: Additional betterer tests for type assertions and explicit any (#45901)

* Add betterer tests to prevent adding more type assertions and explicit any's into the codebase

* update betterer results file

* better glob matching

* updated results

* update results again...

* use more up to date betterer packages

* they're devdeps...

* Commit latest betterer results

* latest .betterer.results

Co-authored-by: joshhunt <josh@trtr.co>
This commit is contained in:
Ashley Harrison
2022-06-23 11:36:20 +01:00
committed by GitHub
parent e935ba2954
commit ded3d53d89
6 changed files with 13744 additions and 86 deletions

View File

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