-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add test for ESLint v8 * fix * fix * fix * fix * fix babel * fix * fix test * fix * fix * fix * fix * fix * fix
- Loading branch information
Showing
51 changed files
with
1,227 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ function sh(command) { | |
return new Promise((resolve, reject) => { | ||
spawn(command, [], { shell: true, stdio: "inherit" }) | ||
.on("error", reject) | ||
.on("exit", exitCode => { | ||
.on("exit", (exitCode) => { | ||
if (exitCode) { | ||
reject(new Error(`Exit with non-zero ${exitCode}`)) | ||
} else { | ||
|
@@ -29,19 +29,19 @@ function sh(command) { | |
: `^${requestedVersion}` | ||
|
||
// Install ESLint of the requested version | ||
await sh(`npm install eslint@${requestedVersionSpec}`) | ||
await sh(`npm install eslint@${requestedVersionSpec} --legacy-peer-deps`) | ||
|
||
// Install ESLint submodule of the requested version | ||
const installedVersion = require("eslint").CLIEngine.version | ||
const installedVersion = require("eslint/package.json").version | ||
cd("test/fixtures/eslint") | ||
if (!installedVersion.startsWith("7.")) { | ||
await sh(`git checkout v${installedVersion}`) | ||
} | ||
if (installedVersion.startsWith("5.")) { | ||
await sh("npm install [email protected]") | ||
} | ||
await sh("npm install") | ||
})().catch(error => { | ||
await sh("npm install --legacy-peer-deps") | ||
})().catch((error) => { | ||
console.error(error) | ||
process.exitCode = 1 | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"eslint": "<8" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"eslint": "<8" | ||
} |
Oops, something went wrong.