azz / prettier-tslint

Code ➡️ prettier ➡️ tslint --fix ➡️ Formatted Code ✨
https://npm.im/prettier-tslint
MIT License
225 stars 13 forks source link

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

Open mschnee opened 6 years ago

mschnee commented 6 years ago

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

azz commented 6 years ago

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

mschnee commented 6 years ago

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.

aleclarson commented 5 years ago

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

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