Skip to content

Latest commit

 

History

History
executable file
·
25 lines (15 loc) · 633 Bytes

no-unknown-property.md

File metadata and controls

executable file
·
25 lines (15 loc) · 633 Bytes

Prevent usage of unknown DOM property (no-unknown-property)

In JSX all DOM properties and attributes should be camelCased to be consistent with standard JavaScript style. This can be a possible source of error if you are used to write plain HTML.

Rule Details

The following patterns are considered warnings:

var React = require('react');

var Hello = <div class="hello">Hello World</div>;

The following patterns are not considered warnings:

var React = require('react');

var Hello = <div className="hello">Hello World</div>;

When Not To Use It

If you are not using JSX you can disable this rule.