If you’ve missed the announcement, check out this blog post. Using multiple JavaScript versions in a projectĪdvanced import of ESLint code style rules.Support for script-versions in Create React App.Advanced import of ESLint code style rules.Here are the new features you can try in this week’s EAP build (173.2463.22). Previously, in WebStorm 2017.2, you could only import code style rules that were explicitly written in ESLint JSON configuration files. Now, it’s also possible to apply rules from more complex configuration files written in JavaScript and YAML, as well as from configurations that use extends. To do so, use the action Apply ESLint code style rules, which is available in the context menu of the config file. WebStorm will send a special command to ESLint asking for a full summary of the applied rules in JSON. It will then parse the output and apply the rules to the IDE settings. You will see the list of applied rules in the IDE log. Please note that this action requires ESLint to be installed in your project. It also means that the import won’t happen automatically, as it happens for the. Now you can generate JSX tags with Emmet that will have text inside the tag or value in curly braces.ĭiv syntax can also be very useful in HTML and other template files. ![]() Support for script-versions in Create React App It’s possible to generate a new React app using create-react-app from the IDE Welcome screen (click Create New Project and select React App in the list on the left). Now when you do this, you can customize your app and specify the name of the package to be used instead of react-scripts. This name will be passed to create-react-app after the –scripts-version tag. Now it is also possible to run and debug Jest tests in the IDE when using the alternative react-scripts version. ![]() Using multiple JavaScript versions in a project Specify the path to this package in the Jest run/debug configuration (for example, the react-script-ts, react-super-scripts or react-awesome-scripts packages). If you’re working on a JavaScript project that uses both ECMAScript 5.1 and newer ECMAScript version or JSX or Flow, you now have two options for how to configure it in WebStorm. The easiest option is to enable the highest language version for the whole project in Preferences | Languages and Frameworks | JavaScript. For example, if you use ES5.1 and JSX, enable JSX (since it’s a superset of ES5.1 and ES6). Now you can also configure different JavaScript language versions for different folders. The version specified on the main settings page will be applied by default for all other JavaScript files in the project.Ĭlick the … button next to the drop-down with the version, then select a folder and the language version used for its files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |