Eslint-plugin-react: react/jsx-indent wants 2 spaces when I specify 4 spaces

Created on 6 Apr 2017  路  1Comment  路  Source: yannickcr/eslint-plugin-react

eslint 3.18.0, eslint-plugin-react 6.10.3

setting:

"react/jsx-indent": ["error", 4],

minimal test which causes an error:

                    <Input
                        name="notional"
                        label="notional"
                        size={InputSizes.FullWidth}
                        defaultValue="50000"
                        isActive={isActive}
                        hasError={hasError}
                        onChange={handleNotionalChange}

result

  64:25  error  Expected indentation of 22 space characters but found 24  react/jsx-indent-props
  65:25  error  Expected indentation of 22 space characters but found 24  react/jsx-indent-props
  66:25  error  Expected indentation of 22 space characters but found 24  react/jsx-indent-props
  67:25  error  Expected indentation of 22 space characters but found 24  react/jsx-indent-props
  68:25  error  Expected indentation of 22 space characters but found 24  react/jsx-indent-props
  69:25  error  Expected indentation of 22 space characters but found 24  react/jsx-indent-props
  70:25  error  Expected indentation of 22 space characters but found 24  react/jsx-indent-props

It seems to always want 2 spaces, despite me specifying the use of 4 spaces.

Most helpful comment

I see the error now.

'react/jsx-indent' !== 'react/jsx-indent-props'

>All comments

I see the error now.

'react/jsx-indent' !== 'react/jsx-indent-props'

Was this page helpful?
0 / 5 - 0 ratings