2

I have really simple exaple in react

export default class App extends Component{
  state={
    count:0
  }

I have a ESLint error under state={....:

Parsing error: Unexpected token = eslint

I don't know why... do I have to install ESLint-react plugin?

this my eslintrc.js:

module.exports = {
  env: {
    browser: true,
    es6: true
  },
  extends: [
    'standard'
  ],
  globals: {
    Atomics: 'readonly',
    SharedArrayBuffer: 'readonly'
  },
  parserOptions: {
    ecmaFeatures: {
      jsx: true
    },
    ecmaVersion: 2018,
    sourceType: 'module'
  },
  plugins: [
    'react'
  ],
  rules: {
  }
}
Angelotti
  • 673
  • 1
  • 6
  • 20

0 Answers0