Unexpected error comes out when everything is ok
SidKwok opened this issue · 1 comments
SidKwok commented
This is ok and no error comes out.
return (
<p>
I'm {this.state.name}
</p>
)
when I add any character after this like:
return (
<p>
I'm {this.state.name} any string here
</p>
)
and the error comes out:
Expected indentation of 8 space characters but found 1. (react/jsx-indent)
my eslint config :
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
env: {
es6: true,
commonjs: true,
browser: true,
},
extends: [
'standard',
'standard-react'
],
plugins: [
'react',
'babel',
'promise'
],
'rules': {
'arrow-parens': 0,
'generator-star-spacing': 0,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
}
}
Is it a bug or something wrong with my config?
feross commented
There was a bug in eslint-plugin-react
(released in a patch version) for the last 2 days. It was just fixed. Try removing your node_modules
folder and reinstalling. It should work!