Closed
Description
Is there an existing issue for this?
- I have searched the existing issues and my issue is unique
- My issue appears in the command-line and not only in the text editor
Description Overview
shadowrootmode
attribute of <template>
is in Baseline 2024, so I expected eslint-plugin-react to recognize it.
Code:
package.json:
{
"type": "module",
"devDependencies": {
"@eslint/js": "9.23.0",
"eslint": "9.23.0",
"eslint-plugin-react": "7.37.4",
"react": "19.0.0"
}
}
eslint.config.js:
import js from "@eslint/js";
import react from "eslint-plugin-react";
export default [
js.configs.recommended,
react.configs.flat.recommended,
react.configs.flat['jsx-runtime'],
{
files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'],
rules: {
'react/no-unknown-property': 'error',
},
},
];
src/example.jsx:
export const Template = () => (
<template shadowrootmode="open"></template>
);
results in
Unknown property 'shadowrootmode' found
(react/no-unknown-property)
[2:13-34]
Expected Behavior
shadowrootmode, shadowrootclonable, and shadowrootdelegatesfocus should be recognized (but probably not experimental shadowrootserializable
).
eslint-plugin-react version
7.37.4
eslint version
9.23.0
node version
20.16.0