diff --git a/readme.md b/readme.md index 5c418fa6..546532d8 100644 --- a/readme.md +++ b/readme.md @@ -29,15 +29,15 @@ This can be achieved by: And both pin/lock to the same version. -# npm@<7 +# Yarn -`npm@<7` does not automatically install `peerDependencies`, +Yarn does not automatically install `peerDependencies`, so if that's what you're using, install them manually. Here is an example, but use it only for reference, because your decisions regarding version ranges and range specifiers may vary. ``` -npm install --save-dev \ +yarn add --dev \ typescript@\* \ eslint@^8.0.1 \ eslint-plugin-promise@^6.0.0 \ diff --git a/src/index.test.ts b/src/index.test.ts index cdeb31ad..3c373f4a 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -367,11 +367,11 @@ test('Exported rule values do not reference eslint-config-standard ones', (t) => } }) -test('npm install args in readme satisfy peerDeps', async (t) => { +test('yarn install args in readme satisfy peerDeps', async (t) => { const { pkgJson, pkgPath, ourPeerDeps } = await getPkgDetails() const readme = (await readFile(resolve(pkgPath, '..', 'readme.md'))).toString() - const match = readme.match(/```\n(npm install .*?)```/s) - if (match === null) throw new Error() + const match = readme.match(/```\n(yarn add .*?)```/s) + if (match === null) throw new Error("couldn't find yarn add") if (match.length === 0) throw new Error('failed to find code block') if (match.length > 2) throw new Error('matched multiple code blocks') const installArgRanges = Object.fromEntries(