Plugin working incorrectly in Pug templates
See original GitHub issue- VSCode Version: 1.17.2
- OS Version: Arch Linux, latest
Steps to Reproduce:
-
run
npm install --save-dev eslint-plugin-pug
-
set VSCode config option:
"eslint.validate": [ { "language" : "pug" } ]
-
create some Pug template with
script
tag -
create an error in JS code inside that tag
-
see what VSCode incorrectly highlighting that error
Example on screenshot:
In this example all file is fine, i just added function ss() {}
string and you see what is going.
Please fix 😃 Thanks for you work and have a nice day!
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Plugin working incorrectly in Pug templates #338 - GitHub
Run npm install to install eslint-plugin-pug dependency; Open folder with cloned project in VS Code (vscode need to read settings file in ...
Read more >Vue plugin misbehaving when used with Pug - Stack Overflow
By default the plugin works fine and as expected, but when running the same code with Pug, I ran into issues. Working code:...
Read more >Pug.js tutorial: A beginner's guide with examples
In this Pug.js tutorial, we'll show you how to integrate Vue.js into a backend app using Pug as a templating engine and Express.js....
Read more >@volar/pug-language-service | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >Pug: Getting Started
The general rendering process of Pug is simple. pug.compile() will compile the Pug source code into ... compileFile('template.pug'); // Render a set of...
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
Using Jade I can reproduce this. The error I get back from ESLint looks like this:
I simply take this information and transform it to a VS Code diagnostics. Since the value reported from ESLint spawns multiple lines it does the same in VS Code
If you think it is a problem then please report it to ESLint (https://github.com/eslint/eslint) directly or to the pug plugin.
Sorry, i dont understand you question, can you explain?
I checked it again and saw that it works only with next settings:
Not
pug
as i think before… Linting works only withjade
.Let me explain: i started use VS Code just few days ago, i almost do not configured my VS Code. Just installed few extensions for linting and other.
You can look at my screenshot with installed extensions in my ide.