![]() ![]() For a long time this was one of the most requested new features requested for Prettier but since version 1.19.0 it is now an option. The Vuejs standard is to not indent the style and script section of the Vue Template file. Most of the errors are a result of a long standing issue with Prettier and Vuejs. This does not help the errors but eventually will. ![]() In the ESLint package field select the the package from the project node_modules. Go to Settings/Languages & Frameworks/Esling and select "Manual ESLint configuration". Set up Webstorm to use the project EsLint. This adds a space around self closing tags Okay, so first tweak: Settings/Editor/Code Style/HTML in the Other tab, select the "In Empty Tag" checkbox. Start the dev server: yarn dev and we have at least 36 errors. Open the project in Webstorm., open src/pages/index.vue, and Reformat Code from the Code menu. When you open the project on the browser it opens with no errors. Change to the project directory and start the dev server: yarn dev or npm run dev. Notice the configuration runs eslint -fix at the end to correct any errors based on the default eslint and prettier configuration. You output should look something like below:Įnter fullscreen mode Exit fullscreen mode I am selecting the defaults but I add Axios (although not required for thus tutorial), select both Eslint, and Prettier. To get started create a Nuxt App: yarn create nuxt-app nuxt-linting or npx create-nuxt-app nuxt-linting. Again, the purpose of this article is to troubleshoot getting Nuxt.js, Linting, and Webstorm to play nicely together. ![]() The first time I created a Nuxtjs project and opened Webstorm and used the Reformat Code tool, my world turned red (36 errors). Webstorm in its default configuration, uses code formating based on Standard JS but can easily be configured to new standards. This article is about my troubleshooting getting Nuxt.js, linting, and Webstorm to play nicely together. Recently I starting experimenting with Vue.js and Nuxt.js, partly out of curiosity and partly to learn a new framework, before I start a job search in a few months. Cover Photo by Raphael Schaller on Unsplash ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |