Question: Lint a workspace in VSCode?
See original GitHub issueWhen using VSCode workspace with multiple folders/apps, template linting doesn’t run, however the .js files are linted properly. eg.
My Workspace
frontend-ember-app
backend-ember-app
I’ve tried configuring the VSCode eslint extension to lint the entire workspace, the eslint server seems to pickup the config, but template linting doesn’t run for the .hbs files.
What additional config is required?
"settings": {
"eslint.autoFixOnSave": true,
"eslint.workingDirectories": [
{
"directory": "/Users/Me/FrontEndApp",
"changeProcessCWD": true
},
{
"directory": "/Users/Me/BackEndApp",
"changeProcessCWD": true
}
],
"eslint.lintTask.enable": true,
"eslint.lintTask.options": "-c /Users/Me/FrontEndApp/.eslintrc.json --ignore-path /Users/Me/FrontEndApp/.eslintignore ."
}
[Info - 2:10:18 PM] ESLint server is running.
[Info - 2:10:19 PM] ESLint library loaded from: /Users/Me/FrontEndApp/node_modules/eslint/lib/api.js
Reproduction
-Init two ember apps.
-Add both app folders to a workspace in VS code.
-Add an empty <img />
to application.hbs
Expected Result
should get a line error within the VScode editor for the line img tags must have an alt attribute : ember-template-lint
but it doesn’t happen.
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Linting Python in Visual Studio Code
To enable linters, open the Command Palette (Ctrl+Shift+P) and select the Python: Select Linter command. The Select Linter command adds "python.linting.<linter> ...
Read more >How To Enable Linting on Save with Visual Studio Code and ...
Learn how to lint your code on every file save using ESLint rules and VS Code settings.
Read more >Show all warnings and errors in visual studio code
ES-Lint has introduced a new task in VS Code. You have to enable it in the workspace setings. "eslint.lintTask.enable": true.
Read more >User and Workspace Settings - vscode-docs
The workspace settings file is located under the .vscode folder in your project. ... Controls problem severities used in the lint validation.
Read more >No Problems have been detected in the workspace - VS Code
And thank you for your question. In VSCode, SonarLint should detect issues in open files and show them in the “Problems” view. I...
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
I believe that’s true. It’s an issue with the Ember Language server extension for VScode, instead use the “Unstable Ember Language Server” from
lifeart.vscode-ember-unstable
extension instead. It’s a fork and has a lot of improvements, including linting for mono-repos, that from what I’ve heard will eventually be merged into the original Ember Langauge Server.Fixed by https://github.com/ember-template-lint/ember-template-lint/pull/1138 (which will land in a 2.0.0 beta soon).