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

Avoid installing extra packages #33

Open
danielpza opened this issue Nov 6, 2018 · 1 comment
Open

Avoid installing extra packages #33

danielpza opened this issue Nov 6, 2018 · 1 comment
Labels
dependencies This issue is related to the Lynt's dependencies or devDependencies. eslint This issue is exclusive to the eslint side of things. tslint This issue is exclusive to the tslint side of things.

Comments

@danielpza
Copy link
Contributor

In a typescript project the eslint dependencies are not needed and vice versa. I mostly use lynt for typescript and don't want to have extra dependencies even on development, the eslint configurations files are not that bad, but it also includes babel-eslint wich includes its own packages like babel-parser.
Would you consider adding an option to prevent adding eslint packages for typescript project.

I was thinking of making two extra package, lynt-ts and lynt-js, so you can opt out of using eslint in typescript projects, like

# for typescript
$ npm i lynt lynt-ts

# for js
$ npm i lynt lynt-js

I know this is an extra step but it is a short one

@saadq
Copy link
Owner

saadq commented Nov 27, 2018

Hey @danielpa9708, very sorry about the delay in my response. I've been away for a bit, but should now have some more time to continue work on open-source stuff.

When I first created the project, I had been considering making lynt and tslynt as two separate projects, mainly due to the huge size of babel-eslint, which as you mention is a really big package for TypeScript users who won't even be using it. I ended up deciding not to go that way for "simplicity" and to just make life easier regardless for js/flow/react/ts users.

Nowadays, I'm pretty much all-in on TypeScript, so I definitely feel the pain a lot more. I think I agree with you in that we should be able to opt-in out of eslint/babel stuff.

So there's two ways we could probably do this.

  1. Your approach:
# for typescript
$ npm i lynt lynt-ts

# for js
$ npm i lynt lynt-js

2: Lynt becomes something you should install globally, and then you run lynt --init to set it up for a specific project, which installs all the necessary packages you will need

# for typescript
$ lynt --init --typescript

# for js
$ lynt --init

I think I'm leaning more towards your approach. I'll look into implementing this soon, unless I get some other feedback on alternative suggestions.

@saadq saadq added eslint This issue is exclusive to the eslint side of things. tslint This issue is exclusive to the tslint side of things. dependencies This issue is related to the Lynt's dependencies or devDependencies. labels Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies This issue is related to the Lynt's dependencies or devDependencies. eslint This issue is exclusive to the eslint side of things. tslint This issue is exclusive to the tslint side of things.
Projects
None yet
Development

No branches or pull requests

2 participants