Replacements for eslint-plugin-jest-dom
eslint-plugin-jest-dom-ya
eslint-plugin-jest-dom-ya is the actively maintained successor forked by an established contributor, with ESLint v10 support and continued development.
ts
import jestDomPlugin from 'eslint-plugin-jest-dom'
import jestDomYaPlugin from 'eslint-plugin-jest-dom-ya'
export default [
jestDomPlugin.configs["flat/recommended"],
jestDomYaPlugin.configs["flat/recommended"],
{
plugins: {
'jest-dom': jestDomPlugin
'jest-dom-ya': jestDomYaPlugin
},
rules: {
"jest-dom/prefer-checked": "error",
"jest-dom-ya/prefer-checked": "error",
"jest-dom/prefer-enabled-disabled": "error",
"jest-dom-ya/prefer-enabled-disabled": "error"
}
}
]If you're using a legacy config format:
ts
module.exports = {
extends: [
'eslint:recommended',
'plugin:jest-dom/recommended',
'plugin:jest-dom-ya/recommended'
],
rules: {
'jest-dom/prefer-checked': 'error',
'jest-dom-ya/prefer-checked': 'error'
}
}