ember-template-lint / eslint-plugin-hbs

Plugin for eslint which checks inline hbs templates
ISC License
18 stars 8 forks source link

Update ember-template-lint peer dep #43

Closed amk221 closed 2 years ago

amk221 commented 3 years ago

Is it possible for ember-template-lint peer dependency to be updated to 2x?

As it stands, it's difficult (impossible?) to use ember-template-lint in a project along with eslint-plugin-hbs because the versions clash (1x vs 2x)

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: example@0.0.0
npm ERR! Found: ember-template-lint@2.21.0
npm ERR! node_modules/ember-template-lint
npm ERR!   dev ember-template-lint@"^2.18.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer ember-template-lint@"^1.5.3" from eslint-plugin-hbs@1.0.0
npm ERR! node_modules/eslint-plugin-hbs
npm ERR!   peer eslint-plugin-hbs@"^1.0.0" from @my-orgnaisation/eslint-config@4.0.1
npm ERR!   node_modules/@my-organisation/eslint-config from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
amk221 commented 3 years ago

I can work around this by using:

// ember-try.js
npmOptions: ['--legacy-peer-deps']
amk221 commented 2 years ago

I think this is still an issue:

eslint-plugin-hbs wants 3x, but apps ship with 4x now, and my above comment doesn't work because Ember's ci.yml runs with npm i --no-shrinkwrap

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @my-organisation/addon@2.0.0
npm ERR! Found: ember-template-lint@4.4.2
npm ERR! node_modules/ember-template-lint
npm ERR!   dev ember-template-lint@"^4.4.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer ember-template-lint@"^3.6.0" from eslint-plugin-hbs@1.0.3
npm ERR! node_modules/eslint-plugin-hbs
npm ERR!   peer eslint-plugin-hbs@"^1.0.0" from @my-organisation/eslint-config@1.0.0
npm ERR!   node_modules/@my-organisation/eslint-config
npm ERR!     dev @my-organisation/eslint-config@"^1.0.0" from the root project