Skip to content

Commit

Permalink
fix: move @typescript-eslint/experimental-utils to dependencies (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed May 22, 2019
1 parent 9a7d7f0 commit 331457d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -35,6 +35,9 @@
"build": "babel --extensions .js,.ts src --out-dir lib",
"typecheck": "tsc -p ."
},
"dependencies": {
"@typescript-eslint/experimental-utils": "^1.9.1-alpha.3"
},
"devDependencies": {
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.4",
Expand All @@ -46,7 +49,6 @@
"@types/jest": "^24.0.12",
"@types/node": "^12.0.0",
"@typescript-eslint/eslint-plugin": "^1.9.1-alpha.3",
"@typescript-eslint/experimental-utils": "^1.9.1-alpha.3",
"babel-jest": "^24.8.0",
"eslint": "^5.1.0",
"eslint-config-prettier": "^4.1.0",
Expand Down

3 comments on commit 331457d

@evocateur
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jobfedron123
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doest matter if typescript is installed or not, it still breaks. I installed TY globallly and yet it broke.

@SimenB
Copy link
Member Author

@SimenB SimenB commented on 331457d May 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been reverted.

@evocateur yeah, consumers are 100% not supposed to need this, I just wanted to write the rules themselves in TS

Please sign in to comment.