Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Document behavior for tslint.json in subfolders when config file is specified via CLI flag #4762

Closed
Akuukis opened this issue Jun 12, 2019 · 6 comments

Comments

@Akuukis
Copy link

Akuukis commented Jun 12, 2019

Bug Report

  • TSLint version: 5.11.0
  • TypeScript version: 3.3.4000
  • Running TSLint via: CLI (and applies to VSCode too)

Repo structure

packages/
    workspaces/
        package1/
            src/index.ts
            tslint.json
tslint.json
tsconfig.json

Actual behavior

yarn run tslint -p tsconfig.json                 # subfolder tslint.json takes precedence.
yarn run tslint -p tsconfig.json -c tslint.json  # subfolder tslint.json seems ignored.

Expected behavior

I expected that passing default value wont change the behavior.

Related issues

#4568
#4570

@adidahiya
Copy link
Contributor

Can you elaborate on your use case? In your example it seems like the first command, yarn run tslint -p tsconfig.json, is sufficient.

@Akuukis
Copy link
Author

Akuukis commented Jun 14, 2019

@adidahiya Yes, that's enough for my use-case, but it was frustrating and took quite a time to figure out what caused the problem - I didn't expect that passing the default value would change the behavior, and I prefer to explicitly list parameters in my scripts. Not fixing but rather documenting the different would also solve my use-case.

I see another problem here - if someone is forced to use config file with non-default name, then currently it's impossible to achieve sub-folder behavior.

@adidahiya
Copy link
Contributor

I didn't expect that passing the default value would change the behavior

I don't think this expectation is so clear-cut; I could imagine someone arguing the opposite.

Also regarding a config file named something other than tslint.json... that seems like a rare / low priority use case. I'm open to other ideas if people feel strongly about this and have a concrete proposal on what to change, but for now I find the current behavior ok.

@Akuukis
Copy link
Author

Akuukis commented Jun 15, 2019

Ok, then let's document this difference?

@adidahiya adidahiya changed the title nonstandard behavior for tslint.json in subfolders Document behavior for tslint.json in subfolders when config file is specified via CLI flag Jun 18, 2019
@adidahiya adidahiya added this to To do in OSS fellowship Sep 10, 2019
@JoshuaKGoldberg
Copy link
Contributor

☠️ TSLint's time has come! ☠️

TSLint is no longer accepting most feature requests per #4534. See typescript-eslint.io for the new, shiny way to lint your TypeScript code with ESLint. ✨

It was a pleasure open sourcing with you all!

OSS fellowship automation moved this from To do to Done Nov 3, 2019
@JoshuaKGoldberg
Copy link
Contributor

🤖 Beep boop! 👉 TSLint is deprecated 👈 (#4534) and you should switch to typescript-eslint! 🤖

🔒 This issue is being locked to prevent further unnecessary discussions. Thank you! 👋

@palantir palantir locked and limited conversation to collaborators Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

No branches or pull requests

3 participants