ES6+ linting
See original GitHub issueI have a component which uses ES6+ features e.g.
myComponent extends React.Component { static propTypes = {
This throws a syntax error as expected because it is an ES6+ feature. In the past I have installed the relevant npm modules e.g. ("babel-preset-stage-0"😃 and altered the babel.rc file and it has been successful but even with these additions in this setup, i’m still getting syntax errors:
My babel.rc file looks like this
{
"presets": [
["env", {
"targets": {
"node": true
}
}],
"react",
"stage-0",
"es2015"
]
}
Package.json:
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Find and fix problems in your JavaScript code - ESLint ...
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >Linting React JSX with ESLint (in ES6) | egghead.io
ESLint is a JavaScript linter (static analysis tool) that offers full support for ES6, JSX, and other modern tools via plugins. We walk...
Read more >What is linting and how can it save you time? - freeCodeCamp
lint, or a linter, is a tool that analyzes source code to flag programming errors, bugs, stylistic errors, and suspicious constructs.
Read more >Lint the Code - Rediscovering JavaScript: ES6, ES7 & ES8
Get introduced to different types of lint tools and learn how to ensure secure, error-free code by linting code. We'll cover the following....
Read more >A deep dive into linting in Node.js - LogRocket Blog
Take a deep dive into code linting Node.js, including why you should be using a linter and how they can help improve your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Decorators and static properties have been now added to the kit
Thanks for reporting. I’ll add ES7 support to the next release, hopefully tomorrow.
.babelrc
is solely to kick-start the Webpack build process; all code-level syntax is handled inside thebrowser.js
andserver.js
Webpack config files inkit/webpack
, so that’s where plugins and transforms need to go.Will report back here when decorator and static support is added.