Closed
Description
Version:
"eslint": "^5.11.1",
"eslint-plugin-react": "^7.12.2"
Config:
"react/jsx-indent": ["warn", 2, { "checkAttributes": true }]
Code:
function Foo() {
return (
<input
type="radio"
defaultChecked
/>
);
}
If no value passed for a prop, ESLint will crash and throw an error like this:
TypeError: Cannot read property 'type' of null
at handleAttribute (D:\Workspace\eslint-demo\node_modules\eslint-plugin-react\lib\rules\jsx-indent.js:256:42)