mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* 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>
20 lines
524 B
TypeScript
20 lines
524 B
TypeScript
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}'),
|
|
};
|