Skip to content

v0.8.3

Compare
Choose a tag to compare
@ezhlobo ezhlobo released this 28 Aug 06:07
· 1 commit to master since this release

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 for id.

    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,
    }