Merge pull request #11604 from Snuffleupagus/eslint-prefer-starts-ends-with
Enable the `unicorn/prefer-starts-ends-with` ESLint plugin rule
This commit is contained in:
commit
4092aa9fbd
@ -38,6 +38,7 @@
|
||||
"no-unsanitized/method": "error",
|
||||
"no-unsanitized/property": "error",
|
||||
"unicorn/no-array-instanceof": "error",
|
||||
"unicorn/prefer-starts-ends-with": "error",
|
||||
|
||||
// Possible errors
|
||||
"for-direction": "error",
|
||||
|
@ -78,7 +78,7 @@ function extractFilenameFromHeader(getResponseHeader) {
|
||||
}
|
||||
|
||||
function createResponseStatusError(status, url) {
|
||||
if (status === 404 || (status === 0 && /^file:/.test(url))) {
|
||||
if (status === 404 || (status === 0 && url.startsWith("file:"))) {
|
||||
return new MissingPDFException('Missing PDF "' + url + '".');
|
||||
}
|
||||
return new UnexpectedResponseException(
|
||||
|
Loading…
Reference in New Issue
Block a user