prettier-tslint icon indicating copy to clipboard operation
prettier-tslint copied to clipboard

Cannot run prettier-tslint on a file in a path with the name "node_modules"

Open mschnee opened this issue 7 years ago • 3 comments

The following does not work:

prettier-tslint check ./packages/node_modules/@scope/packageName/src/path/to/file.ts

Prettier addresses this by having a --with-node-modules option, which changes the default filter.

This is fixed by #20

mschnee avatar Oct 17 '18 17:10 mschnee

Curious what the use case for formatting files in node_modules is? Wouldn't you just use yarn workspaces or lerna bootstrap?

azz avatar Oct 22 '18 12:10 azz

Very much like the folks working on PouchDB, neither lerna nor yarn workspaces actually suit my needs. The specific reasons for me include unmanageable build times (hours versus minutes), problems in creating distribution tarballs that include all bundledDependencies, and incompatibilities with some automation and tooling.

Not that I don't use lerna on some projects, just that I'm working with some where it's not the right tool.

mschnee avatar Nov 03 '18 22:11 mschnee

Why wouldn't you lint your files before installing them elsewhere?

If not your files: Why are you linting third-party files?

aleclarson avatar Dec 10 '18 01:12 aleclarson