We create the test framework for RuleTester, that is an util to test lint rules.
Change TS config to use "moduleResolution": "bundler".
Install vitest and @typescript-eslint/rule-tester.
Define RuleTester setups giving the same functions as vitest, as suggested by documentation.
Define vitest configurations.
To check if it works, we create a first test on existing rule use-option-type-wrapper. Note that RuleTester requires message IDs instead of hard-coded messages, when a rule is triggered.
We create the test framework for RuleTester, that is an util to test lint rules.
"moduleResolution": "bundler"
.vitest
and@typescript-eslint/rule-tester
.vitest
, as suggested by documentation.vitest
configurations.To check if it works, we create a first test on existing rule
use-option-type-wrapper
. Note that RuleTester requires message IDs instead of hard-coded messages, when a rule is triggered.