Questions tagged [lint]

Lint is a C program checking developped in 1978 at the Bell labs and was used as a UNIX utility in 1979. There has now been several Lint-like programs (also code linters) that analyze source code written in possibly different languages, most notably:

  • Pylint: Python linter
  • JSHint: JavaScript linter with out-of-the-box support for renowned libraries
  • ESLint: JavaScript linter with support for ES6 and JSX
  • Findbugs: Java linter

Some linters support IDE integration which can allows to have real-time detection of possible bugs, and possibly automatic fixes.

8 questions
3
votes
1 answer

How to exclude files from outside my workspace from ESLint in VSCode?

When I'm in a workspace and open an external file (from outside of workspace) in VSCode, how can I exclude this file from lint? More specifically from pug-lint but the same applies to ESLint?
MrT77
  • 141
  • 3
3
votes
2 answers

How to suppress some Python errors/warnings in VS Code

I have upgraded my VS Code to the latest version, 1.30.0. Then it starts to complain about unresolved import. This is because my work uses docker, so docker image contains all the dependencies while my local machine doesn't. I don't want to install…
Jerry
  • 290
  • 3
  • 10
2
votes
2 answers

How do I configure markdownlint for Visual Studo Code differently for CHANGELOG files

I like the markdownlint extension for Visual Studio Code, but the default settings do not work well for changelog files. How can I configure markdownlint differently for the CHANGELOG.md file, but use the normal settings for all other markdown…
Scott Nelson
  • 141
  • 5
2
votes
2 answers

VSCode JSDoc type checking

In VSCode, if I write this JS file: /** @type {number} */ let x = 10; /** @type {string} */ let y = x; nothing is underlined in red, and the tooltip over y simply gives let y: string. That is not what I want! I want VSCode to throw me an error, as…
Nino Filiu
  • 195
  • 8
1
vote
0 answers

Atom on Ubuntu not linting code using phpcs; same process works on macOS

My goal here is to install a development environment on Ubuntu, I have most of the necessary parts but I am stuck on the last piece. I am using Atom as the code editor and I want Atom to lint my code using phpcs as I type. I have achieved this on…
brothman01
  • 19
  • 3
1
vote
0 answers

lintr is not working with sublime

I have installed a SublimeLinter via package control, lintr is not available in package control, I have installed it via git. R is connected to sublime, package lintr was installed by install.packages("lintr"). But I get this error: No lint…
IrFe
  • 11
  • 1
0
votes
1 answer

Using two python environments in vscode

Is it possible to have two python environments simultaneously "activated" within vscode? One environment would be the project's env (say, in a local folder venv), and the other environment being the global environment that has the linters and…
Daniel Duque
  • 101
  • 2
0
votes
1 answer

Matching the first line after a bracket in Lint

I'm making a custom rule for programming language Lint to : match 1 or more empty lines after {, and another rule to match empty line before }. As an example in this code, I want these rules to match line 2 and line 5 : class Test { …