Pug templates. Highlighting js errors in VS Code working incorrectly
See original GitHub issueHello and thanks for this library!
I have errors in checking JS code in my Pug templates.
I described all details in issue to VS Code ESLint plugin because think what error in it, but we realized that the root of the problem is somewhere else. I also created an issue in eslint-plugin-pug repository about it. I just dont know where root of problem, therefore creating this issue also.
Please, can you read above issue and say you thoughts about it?
- ESLint Version: 4.10.0
- Node Version: 8.8.1
- npm Version: 5.5.1
What parser (default, Babel-ESLint, etc.) are you using?
I dont know, sorry 😦 I just use Visual Studio Code and plugins for linting.
I use Visual Studio Code ide, vscode-eslint plugin, eslint-plugin-pug plugin.
Please show your full configuration:
Configuration
module.exports = {
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module",
},
"plugins": [
"react",
"html",
"pug"
],
"globals" : {
"$" : true,
"jQuery" : true,
"Loader" : true,
"Navigation" : true,
"UserParams" : true,
"opts" : true,
"trans" : true,
"ENV" : true,
"User" : true,
"HeaderToggler" : true,
"RiotApps" : true,
"riot" : true,
"SystemJS" : true,
},
"rules": {
"no-undef": 1,
"no-unused-vars": 1,
"no-console": "off",
"no-case-declarations" : "off",
"indent": [ "error", 4, {
"SwitchCase" : 1 ,
"ArrayExpression" : "off",
"ObjectExpression" : "off",
} ],
"linebreak-style": [
"error",
"unix"
],
"semi": [
"error",
"never"
],
"react/jsx-uses-vars": [2]
}
};
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
You can try to play with linting js code in Pug files if you clone this repository.
.some-element
.testing
script.
function ss() {
}
I dont know how VS Code using eslint, sorry.
What did you expect to happen?
VS Code correctly highlight js errors in my Pug files.
What actually happened? Please include the actual, raw output from ESLint.
VS Code incorrectly highlight js errors in my Pug files.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Many thanks, now everything works fine! 😃
Great, I’ll close this issue then.