Releases: ezhlobo/eslint-plugin-react-pug
Releases · ezhlobo/eslint-plugin-react-pug
v0.8.4
v0.8.3
Fixed
-
We now handle nested spreading properly and mark all variables inside it as used
The following code doesn't trigger a warning. However, if there is
props.style.id
used in props, we require the definition forid
.const Component = props => pug` div(...props.style) ` Component.propTypes = { style: PropTypes.shape({ one: PropTypes.string, }), }
-
Fixed false-errors when we use main props object inside iteration over any prop.
The following code doesn't trigger any reports:
const Component = props => pug` each item in props.list div(key=item.id ...item another=props.test) ` Component.propTypes = { list: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string, })), test: PropTypes.bool, }
v0.8.2
Fixed
-
Stop crashes when we use iterations over basic variables, not related to props.
function Component() { const list = [] return pug` each item in list div(key=item.id)= item.test ` }
In this example we were trying to attach
item.id
anditem.test
to props.
v0.8.1
v0.8.0
v0.7.1
Fixed
-
Since it became possible to support spreading attributes (babel-plugin-transform-react-pug#v7.0.1) we make it possible to lint too.
The following syntax is now available:
button(type="button" ...props)