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

Update stylelint and stylelint-config-wordpress #16985

Closed
wants to merge 2 commits into from
Closed

Conversation

ntwb
Copy link
Member

@ntwb ntwb commented Aug 9, 2019

Description

Updates the stylelint dependencies

How has this been tested?

Running npm run lint-css from the repo root

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@nerrad
Copy link
Contributor

nerrad commented Aug 11, 2019

hmm. I'm getting an error when I check out this branch, run npm install, npm run dev and then npm run lint-css:

[email protected] lint-css /Users/---/WebProjects/vvv/www/wordpress-one/public_html/wp-content/plugins/gutenberg
> wp-scripts lint-style '**/*.scss'

internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'stylelint'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.resolve (internal/modules/cjs/helpers.js:33:19)
    at sync (/Users/---/WebProjects/vvv/www/wordpress-one/public_html/wp-content/plugins/gutenberg/node_modules/resolve-bin/index.js:60:21)
    at Object.<anonymous> (/Users/---/WebProjects/vvv/www/wordpress-one/public_html/wp-content/plugins/gutenberg/packages/scripts/scripts/lint-style.js:46:2)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)

@nerrad
Copy link
Contributor

nerrad commented Aug 11, 2019

I'm also getting a package-lock.json change when I run npm install in this branch:

  • node version: 10.16.2
  • npm version: 6.9.0

@ntwb
Copy link
Member Author

ntwb commented Aug 12, 2019

@nerrad Do you have a node-modules folder in packages/scripts ?

Removing that folder and running npm install from that folder should resolve the issue

@gziolo
Copy link
Member

gziolo commented Aug 12, 2019

It looks like the issue @nerrad has is legitimate:
https://travis-ci.com/WordPress/gutenberg/jobs/223922463

I don't see stylelint changes in package-lock.json file. I spent some time trying to document how we should make those updates of dependencies less problematic:
https://github.com/WordPress/gutenberg/tree/master/packages#managing-dependencies

I still want to test whether manual version change in the corresponding package.json file with lerna bootstrap wouldn't be even simpler to use.

@ntwb
Copy link
Member Author

ntwb commented Aug 12, 2019

Strange, as I did follow the new process to to update the lock file, I had to do this a half dozen times to get it right, the lock file in this PR appears to have the changes I would expect to see:

https://github.com/WordPress/gutenberg/pull/16985/files#diff-32607347f8126e6534ebc7ebaec4853d

I probably won't have time to look at this before the end of the week, so if anyone feels like playing some package lock debug, feel free to 😏

@gziolo gziolo added [Type] Enhancement A suggestion for improvement. [Tool] WP Scripts /packages/scripts labels Aug 12, 2019
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

We still need to make Travis happy before we can land it.

@@ -51,8 +51,8 @@
"read-pkg-up": "^1.0.1",
"resolve-bin": "^0.4.0",
"source-map-loader": "^0.2.4",
"stylelint": "^9.10.1",
"stylelint-config-wordpress": "^13.1.0",
"stylelint": "^10.1.0",
Copy link
Member

Choose a reason for hiding this comment

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

Can we include some notes in the package's CHANGELOG file?

@ntwb
Copy link
Member Author

ntwb commented Dec 31, 2019

New pull request to replace this one in #19370 19370

@ntwb ntwb closed this Dec 31, 2019
@ntwb ntwb deleted the update/stylelint branch December 31, 2019 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Tool] WP Scripts /packages/scripts [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants