Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate out an ESLint Shareable Config package #801

Closed
zenflow opened this issue Aug 17, 2020 · 1 comment · May be fixed by #802
Closed

Separate out an ESLint Shareable Config package #801

zenflow opened this issue Aug 17, 2020 · 1 comment · May be fixed by #802
Labels
kind: feature New feature or request scope: integration Related to an integration, not necessarily to core (but could influence core) solution: duplicate This issue or pull request already exists

Comments

@zenflow
Copy link

zenflow commented Aug 17, 2020

Current Behavior

Sometimes I want to use tsdx's wonderful eslint configuration, but don't need the other functions of tsdx (build & test), for whatever reason (see comment #634 (comment) for specific examples).

One way to do this is to just install the whole tsdx package but that will come with a large volume of unused dependencies.

Another way to do it is to just use eslint-config-tsdx, an eslint shareable config with the rules of tsdx. This way we don't get the large volume of unused dependencies, but that package (right now) just mirrors the configuration that lives in tsdx, and the two can become out-of-sync.

Desired Behavior

  1. I would like to be able to install and use just the eslint configuration from tsdx, without the added weight of the other parts of tsdx (build & test).

  2. I would also like to be sure I'm using the same eslint configuration in this scenario as when using tsdx itself.

Suggested Solution

My proposed solution is simply to use eslint-config-tsdx (an eslint shareable config with the rules of tsdx, as mentioned above) here, in the extends field of the generated eslint config. This way we can achieve both things listed under "Desired Behavior".

See #634 (comment) for a more detailed/verbose description of my proposed solution.

I will put my proposed solution into the form of a PR to make it perfectly clear.

Who does this impact? Who is this for?

This is for users who want to use tsdx's linting functionality without using tsdx's other functionalities. This should only impact them; other users should not be impacted at all besides getting a simplified (but equivalent) output from tsdx lint --write-file.

Describe alternatives you've considered

Some options are described above (under Current Behavior) but have their drawbacks.

Additional context

The use case for this feature is originally described here: #634 (comment)

@agilgur5
Copy link
Collaborator

agilgur5 commented Aug 17, 2020

Duplicate of #634 ... Please don't knowingly make duplicate issues, they confuse people and unnecessarily take more time to respond to...

Repository owner locked and limited conversation to collaborators Aug 17, 2020
@agilgur5 agilgur5 added solution: duplicate This issue or pull request already exists kind: feature New feature or request scope: integration Related to an integration, not necessarily to core (but could influence core) labels Aug 17, 2020
@agilgur5 agilgur5 changed the title Use an eslint shareable config which can also be used independently of tsdx Separate out an ESLint Shareable Config package Aug 17, 2020
zenflow added a commit to zenflow/tsdx that referenced this issue Aug 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind: feature New feature or request scope: integration Related to an integration, not necessarily to core (but could influence core) solution: duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants