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

Upgrade stylelint-config to use stylelint v15 #284

Closed
1 task done
Tracked by #266
tobeycodes opened this issue Feb 28, 2023 · 7 comments
Closed
1 task done
Tracked by #266

Upgrade stylelint-config to use stylelint v15 #284

tobeycodes opened this issue Feb 28, 2023 · 7 comments
Assignees

Comments

@tobeycodes
Copy link
Member

Is your enhancement related to a problem? Please describe.

I was performing routine maintenance on a project and updating out of date packages. We use styelint-config and stylelint-config-standard-scss. The latest version of that requires styelint v15 and this package is locked to v14. I have reviewed the migration guide and I do not believe we are effected by any breaking changes here. https://stylelint.io/migration-guide/to-15/

npm ERR! Found: stylelint@14.16.1
npm ERR! node_modules/stylelint
npm ERR!   peer stylelint@"^14.0.0" from @10up/stylelint-config@2.0.4
npm ERR!   node_modules/@10up/stylelint-config
npm ERR!     peer @10up/stylelint-config@">=2.0.4" from 10up-toolkit@5.1.0
npm ERR!     node_modules/10up-toolkit
npm ERR!       dev 10up-toolkit@"^5.1.0" from the root project
npm ERR!   peer stylelint@"^14.2" from @wordpress/stylelint-config@20.0.3
npm ERR!   node_modules/@10up/stylelint-config/node_modules/@wordpress/stylelint-config
npm ERR!     @wordpress/stylelint-config@"^20.0.2" from @10up/stylelint-config@2.0.4
npm ERR!     node_modules/@10up/stylelint-config
npm ERR!       peer @10up/stylelint-config@">=2.0.4" from 10up-toolkit@5.1.0
npm ERR!       node_modules/10up-toolkit
npm ERR!         dev 10up-toolkit@"^5.1.0" from the root project
npm ERR!   10 more (stylelint-config-recommended, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev stylelint-config-standard-scss@"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: stylelint@15.2.0
npm ERR! node_modules/stylelint
npm ERR!   peer stylelint@"^15.0.0" from stylelint-config-standard-scss@7.0.1
npm ERR!   node_modules/stylelint-config-standard-scss
npm ERR!     dev stylelint-config-standard-scss@"*" 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.

Locking stylelint-config-standard-scss to ^5.0.0 resolves the problem.

Designs

No response

Describe alternatives you've considered

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@nicholasio
Copy link
Member

Thanks @tobeycodes this will be fixed with the next toolkit major.

@Antonio-Laguna
Copy link
Member

I am pinging a bunch of people here to drive discussion. @joesnellpdx @nicholasio @fabiankaegy @darylldoyle

As with most of these packages, we get stuck because of WordPress script package dependencies which, in radical candor, I'm starting to not like. I do see the benefit of aligning ourselves with WP since it's easier to contribute back. It's just a tad frustrating.

@wordpress/stylelint-config is stuck with Stylelint version 14.2 so we have no way of moving this forward right now.

Even if we move out of @wordpress package, we'd still need to consider what I shared here: WordPress/gutenberg#50336 (comment)

Moving to Stylelint 15 implies 76 stylistic rules are no longer with us which either we replicate with a package (we have fewer constraints than WP) or we ignore (which I don't recommend)

Opening this to discuss what should be our way forward. It could well be to wait and see what Gutenberg team has to say but I wanted to update here too for internal visibility

@Antonio-Laguna Antonio-Laguna self-assigned this May 17, 2023
@nicholasio
Copy link
Member

I definitely don't like most of the @wordpress packages so I have no issue moving out of it. Additionally, 10up-toolkit is not only used in the context of WP these days and we don't need to box ourselves to what WP necessarily does.

I'm curious about the prettier option - we don't use the WP fork would that be an option for us?

@Antonio-Laguna
Copy link
Member

@nicholasio Prettier on CSS would be a great way to annoy developers from what I've heard. See this stylelint/stylelint#6619 (comment) as a somewhat detailed example but I've seen more from other companies.

Regarding moving out of it I don't have a strong opinion against it and more inclined towards it so let's see what others have to say!

@nicholasio
Copy link
Member

The https://www.npmjs.com/package/stylelint-stylistic package seems like a good route for us if we move out of the wp package.

@darylldoyle
Copy link
Contributor

Like @nicholasio, I can also see the advantages of making the toolkit framework agnostic. That said, it's very based around WP as it stands, and my concern with breaking that out would be making it more difficult for engineers to get up and running with it.

Would it be worth taking this into a separate discussion to go over the pros/cons of doing so as not to derail this issue?

@Antonio-Laguna
Copy link
Member

Sure @darylldoyle !

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

No branches or pull requests

4 participants