Move devDependencies from individual packages to root package.json - #302
Move devDependencies from individual packages to root package.json#302ntwb wants to merge 10 commits into
devDependencies from individual packages to root package.json#302Conversation
|
|
||
| import chalk from 'chalk'; | ||
| import eslint from 'eslint'; | ||
|
|
There was a problem hiding this comment.
Why this change? With it, the coding standards should actually fail on this...?
There was a problem hiding this comment.
I suspected it was a bug fix in import/order, as all 3 of these imports are external and should not have a blank line between them, particularly the package scope @ character is what was the false positive
Running the tests when including the blank line results in:
Code
import chalk from 'chalk';
import eslint from 'eslint';
import apiFetch from '@wordpress/api-fetch';
Test
/Users/netweb/Code/humanmade/coding-standards/packages/eslint-config-humanmade/fixtures/pass/import-order.js
6:1 error There should be no empty line within import group import/order
✖ 1 problem (1 error, 0 warnings)
1 error and 0 warnings potentially fixable with the `--fix` option.
1 unexpected error!
There was a problem hiding this comment.
Hm, so, with the current coding standards (rule config as per #219), it should require @wordpress/* imports to come separately. Which is something that has recently been discussed, and might get changed eventually (see https://github.com/humanmade/coding-standards/issues/297).
Not sure if something changed in the ESLint rule...
There was a problem hiding this comment.
Thanks, I'll take a closer look to try to determine why the rule is failing in this PR, as based on the above it shouldn't be, thanks
Details
This PR moves the
devDependenciesfrom individual Node.js packages to the rootpackage.jsonfile, this is because we can run the tests for both packages from the root directory instead of each package directoryActual version bumps to the
devDependencieswill follow in further PRs on MondayAdditional PRs will follow for the
peerDependencieschangesIdeally my initial plan is to release updated versions as v2.0.0 with as few breaking changes as possible
I originally added a Node.js job, but it fails due to a Travis CI issue, so I removed it,will add this back when switching to GitHub Actions
Test Instructions
Install Node.js v16, install dependencies, run tests:
Test Results