-
Notifications
You must be signed in to change notification settings - Fork 51
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: npm install with npm 7 #592
Conversation
npm install was failing with npm 7 unless using the --legacy-peer-deps flag. Remove dependency to old version of eslint-config-vaadin and stylelint-config-vaadin while adapting the configs to try to keep the rules mostly the same for now. We might consider using the latest version of eslint-config-vaadin and stylelint-config-vaadin again when we migrate away from bower and HTML Imports and maybe migrate this repo to use TypeScript. Fixes #541.
@@ -222,7 +222,7 @@ class Resolver { | |||
? this.constructor.__createUrl( | |||
this.baseUrl, | |||
document.baseURI || document.URL | |||
).href.replace(/[^\/]*$/, '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an unnecessary escape (complained by linter rule). Most characters don't need to be escaped inside a character group []
.
@@ -172,7 +172,7 @@ export class Router extends Resolver { | |||
const baseHref = baseElement && baseElement.getAttribute('href'); | |||
super([], Object.assign({ | |||
// Default options | |||
baseUrl: baseHref && Resolver.__createUrl(baseHref, document.URL).href.replace(/[^\/]*$/, '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an unnecessary escape (complained by linter rule). Most characters don't need to be escaped inside a character group []
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried locally with npm7, works for me
npm install was failing with npm 7 unless using the
--legacy-peer-deps
flag. Remove dependency to old version of
eslint-config-vaadin
and
stylelint-config-vaadin
while adapting the configs to try to keepthe rules mostly the same for now. We might consider using the latest
version of
eslint-config-vaadin
andstylelint-config-vaadin
again whenwe migrate away from bower and HTML Imports and maybe migrate
this repo to use TypeScript.
The problem was old versions of
eslint
andstylelint
declared as peer dependencies ofeslint-config-vaadin
andstylelint-config-vaadin
and we can't yet use newer versions ofeslint-config-vaadin
andstylelint-config-vaadin
because they have changed to support LitElement and TypeScript based projects and those configs don't work as is for vaadin-router which is still based on HTML Imports and doesn't use TS.Fixes #541.