Is now using Vitest as a testing framework (previously Jest was being used).
Updated Rules:
Most of the stylistic rules from ESlint were deprecated in previous versions and is now using the rules from this package @stylistic/eslint-plugin as recommended by ESlint.
Most of node rules from ESlint were deprecated in previous versions and is now using the rules from this package eslint-plugin-n as recommended by ESlint
Some plugins are not compatible with Eslint v9 so they need to be wrapped by fixupPluginRules from eslint/compat to be compatible.
To create tests:
go to /testCases.js
add the name of the rule to be testes to rule
add as many correct and incorrect examples of the rule as you need
it only tests for the specified rule, don't need to worry about unused vars and indents (only for the tests of those specific rules) (if a rule is not testable like no-console the example can be empty or not registered)
rules that don't have test because of failure: @stylistic/jsx-quotes, no-multi-str, nodePlugin/no-path-concat
This PR:
ESlint
version to9.0.0
node
version to20
Is now using
Vitest
as a testing framework (previouslyJest
was being used).Updated Rules:
Most of the stylistic rules from
ESlint
were deprecated in previous versions and is now using the rules from this package@stylistic/eslint-plugin
as recommended byESlint
.Most of node rules from
ESlint
were deprecated in previous versions and is now using the rules from this packageeslint-plugin-n
as recommended byESlint
Some plugins are not compatible with
Eslint v9
so they need to be wrapped byfixupPluginRules
fromeslint/compat
to be compatible.To create tests:
/testCases.js
rule
it only tests for the specified rule, don't need to worry about unused vars and indents (only for the tests of those specific rules) (if a rule is not testable like
no-console
the example can be empty or not registered) rules that don't have test because of failure:@stylistic/jsx-quotes
,no-multi-str
,nodePlugin/no-path-concat