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

fix: move @typescript-eslint/experimental-utils to dependencies #267

Merged
merged 1 commit into from May 22, 2019

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented May 22, 2019

From mobile, seems correct?

@SimenB
Copy link
Member Author

SimenB commented May 22, 2019

🎉 This PR is included in version 22.6.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@evocateur
Copy link

This completely breaks any consumer that doesn't have typescript installed.

> eslint --cache --cache-location ./node_modules/.cache/eslint/ *.js packages

Error: Cannot read config file: $PWD/node_modules/eslint-plugin-zillow/lib/eslint-plugin-zillow.js
Error: Cannot find module 'typescript'
Referenced from: $PWD/.eslintrc.yaml
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> ($PWD/node_modules/@typescript-eslint/typescript-estree/dist/parser.js:17:25)

It's unclear to me why an eslint plugin needs experimental typescript plugins in its dependencies.

@eaviles
Copy link

eaviles commented May 22, 2019

I'm still getting this error. See below:

$ jq '.version' node_modules/eslint-plugin-jest/package.json
"22.6.2"
avilesle at ROSELCDV0085289 in kinesis (release/1.0.2)
$ npm run eslint

> lifion-kinesis@1.0.1 eslint /Users/avilesle/Documents/Stash/OHCM/ditc/kinesis
> eslint . --ext .js,.json

Error: Cannot read config file: /Users/avilesle/Documents/Stash/OHCM/ditc/kinesis/node_modules/eslint-plugin-jest/lib/index.js
Error: Cannot find module 'typescript'
Referenced from: /Users/avilesle/Documents/Stash/OHCM/ditc/kinesis/node_modules/eslint-config-lifion/lib/index.js
Referenced from: /Users/avilesle/Documents/Stash/OHCM/ditc/kinesis/package.json
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/avilesle/Documents/Stash/OHCM/ditc/kinesis/node_modules/@typescript-eslint/typescript-estree/dist/parser.js:17:25)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! lifion-kinesis@1.0.1 eslint: `eslint . --ext .js,.json`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the lifion-kinesis@1.0.1 eslint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/avilesle/.npm/_logs/2019-05-22T16_38_10_085Z-debug.log
avilesle at ROSELCDV0085289 in kinesis (release/1.0.2)

@ranyitz
Copy link
Contributor

ranyitz commented May 22, 2019

@evocateur I think it's being used for some of the rules, for example here which means that if it won't be in eslint-plugin-jest's dependencies it will break the consumer.

experimental-utils has a peer dependency on TypeScript though, which I think was not taken into consideration as a breaking change when starting adding support for typescript.

@SimenB one optional solution is to say typescript is a peerDependency of eslint-plugin-jest but as this is a breaking change, I would consider adding it in a major version.

This is just an observation so I may be wrong here 😅 Let me know what you think.

@shazron
Copy link

shazron commented May 22, 2019

Even after installing typescript as a peer dep, there is this error: #268

@SimenB
Copy link
Member Author

SimenB commented May 22, 2019

Yeah, this is an unintended regression after rewriting 2 rules to TS - it was supposed to be an implementation detail! I'll revert and figure out a path forward once I'm at a computer.

So sorry about the mess! 🙏

@hbroer
Copy link

hbroer commented May 22, 2019

All fine. Shit happens :) I installed greenkeeper yesterday and this was a nice test of its integration :D He went so mad ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants