G
G
Georqiii2020-12-09 11:12:04
JavaScript
Georqiii, 2020-12-09 11:12:04

How to make Eslint work without installing a package?

Eslint is not in devDependencies in the project's package.json, but there is a script that launches a docker container, inside which the project directory is mounted (node_modules is already in the container before mounting) and inside which lint is launched.

"scripts": {
    "lint": docker run --rm -it -v $(pwd):/container/myFolder myContainer sh -c 'cd myFolder/ && /container/node_modules/eslint/bin/eslint.js'
}


And it all works as it should.

This way eslint is not in node_modules which is a big advantage for me. However, in this scenario, eslint does not work in the ide itself (webstorm, vs code), which is bad in itself. Is there a way to make eslint work for at least jetbrains products without specifying it in devDependencies?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question