Eslint - Leave Extraneous Parentheses - eslint

I'm using VS Code to write Angular apps in TypeScript. I have the Prettier and ESLint extensions installed and I want to configure ESLint to not remove unnecessary parentheses. ESLint has a "no-extra-parens" and I'd like to turn it off.
As a background, the Angular projects have very low test coverage. With unit tests and integration tests I need to be sure not to break existing functionality. My company would have greater confidence in the formatting changes if the unneeded parentheses are left intact.

Related

How keep tests shortcuts/icons once `auto-run` is switched off from the extension sidebar?

Currently Jest in my VSCode uses the --watch parameter (I use the Orta.vscode-jest extension), which mean when I save a file, it will run all tests in uncommitted files.
It's a good default behavior but sometimes my upcoming commit may imply multiple files and I don't want to waste 75% of my time and resources on tests I don't to focus on.
After reading documentation, I found I can turn off the auto-run (see arrow below), so now when saving nothing happens, and I was expecting a way to trigger manually the test I want.
Unfortunately once done it's like if the extension was totally shut down. See below, I have no longer the ability to run tests through the extension.
Do you know a way to solve this? Keeping icon buttons to trigger manually specific tests?
I saw some homemade solution https://stackoverflow.com/a/55279902/3608410 (see Running a selected Jest test in Visual Studio Code) but I feel it's weird since we have a powerful extension already installed.
(maybe I missed something...)
Thank you,
Didn't see that before but if doing a right click in the test file where needed, in the menu I'm able to run a specific test, handy!

Visual Studio Code check require statements

Having refactored the filenames and folder structure of various of Node.js applications, I have found it incredibly time consuming to manually fix all relative require statement paths.
const myRequire = require('../../my-require')
May become
const myRequire = require('./my-require')
Could Visual Studio Code underline relative require statements that it suspects are incorrect?
Install the eslint plugin for Visual Studio Code
Configure the project to use eslint and eslint-plugin-require-path-exists.
Visual Studio Code will show all eslint errors within the editor, including require statements that cannot be resolved.

Sublime Text : how to detect coding errors (non existing variables...)

I'm using Sublime Text and I'm fairly new to it.
I'd like to have my coding errors highlighted : missing semi colon, non existing variables...
But even installing the linters, Sublime Linter package and jslint and jshint, it doesn't work the way I want.
JSLint is way too strict: it was giving me errors for using tabs instead of spaces.
What I want is :
errors about missing semi colons
errors if I use a variable that I haven't defined anywhere
How can I do this ? I've checked before here on this forum, and on Google, but I haven't found anything :(
Nicolas.
I think ESLint will fit your needs. It's newer than jshint and jslint.
You can read a comparison here: https://www.sitepoint.com/comparison-javascript-linting-tools/.
It's really flexible in specifying the linting rules.
The primary reason ESLint was created was to allow developers to
create their own linting rules. ESLint is designed to have all rules
completely pluggable.
The rules that will help you with missing semicolons and undefined variables are semi and no-undef.
You can use it in Sublime with the SublimeLinter-eslint or SublimeLinter-contrib-eslint_d plugin. The second one is faster, and it allows me to enable linting to be executed as I type.

Fix or disable Stylus preprocessing for Basic/Starter node.js web project

I've created both a Basic Express 3 project and a Starter Express 3 project in Visual Studio 2015 Community Edition and I notice that, although the .styl file is where I'm supposed to write my styles, there's no syntax support / IntelliSense / coloring.
Web Essentials 2015.1 is installed but doesn't seem to bring anything extra to the table in this regard.
Can I either
make this Stylus support work out of the box for the templates or
disable this particular css preprocessing altogether in favor of simple css?
because as it stands now, this is killing productivity.
Removing the .styl file will break the file watch and will avoid the preprocessor compiling a css file based upon the .styl file.
You can now simply use standard css or add e.g. a LESS file instead.
It was a straightforward answer to a straightforward question, but one that might prove useful to someone.

How to do linting with Questasim?

I was using linting tool HAL from Cadence. Now I have to use Questasim. But I don't know about the tools or switch that I can use for linting.
Is there any tool from Mentor(Questaism) like HAL from Cadence (HAL is a separate tool for linting only).
OR
Is there any switch that I have to use to enable Questasim for linting with any of these "Vlog | Vopt| Vsim| Qverilog".
Questasim Perform lint checking at lower level only,
-lint Perform lint-style checks
i.e. vlog -lint
Better to go for standalone tool for linting.

Resources