ecmascript 6 - EsLint from Visual Studio - Unable to use static props on javascript files -


node modules:

  • eslint 1.10.3
  • babel-eslint 4.1.6
  • eslint-plugin-react 3.15.0

sample file being linted:

class notepadcomponent extends react.component {     static displayname = 'notepadcomponent'      static defaultprops = {         activetab: 'type'     } } 

under command line can lint , transpile using babel without issues. problem trying lint visual studio. i'm using web analyzer plugin internally uses eslint.

this visual studio module defines .eslintrc file under c:\users\my-username , i've gone ahead , updated file, , main folder node_modules using configuration:

"parser": "babel-eslint", "ecmafeatures": {     "jsx": true,     "classes":  true     },     "plugins": [         "react"     ],     "env": {         "browser": true,         "node": true,         "es6": true,         "jquery":  true     }, 

but still "jsx parser: unexpected token =" error:

any ideas on getting web analyzer behave same way command-line tool does?

visual studio linting error

actually in es6 defaultprops have set outside class, example:

class notepadcomponent extends react.component {   constructor(props){     super(props);   } } notepadcomponent.defaultprops ={                                activetab:'type'                                } notepadcomponent.displayname = 'notepadcomponent' 

im not sure if it's looking for, maybe you


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -