Migrate to ESLint 9 (#10762)
* update ESLint related packages * migrate to flat config format * Fix prefer-const error Fixes 'overrideLogoSize' is never reassigned. Use 'const' instead * remove irrelevant eslint-disable comment These comments came from a swizzled upstream component but never did anything in our codebase. ESLint 9 does not allow disable comments for rules that are not registered. * remove irrelevant eslint-disable comments These were here because in the past we were applying mocha lint rules to files which contained no tests ESLint 9 now flags eslint-disable comments that aren't doing anythings * remove irrelevant eslint-disable comment ESLint 9 now flags eslint-disable comments that aren't doing anything * there are no .tsx files in our code any more * include .mjs files in linting and formatting * update sort-class-members rule for openApi property and update the handful of files violating it
This commit is contained in:
@@ -47,13 +47,13 @@ export default function coalesceBadge(
|
||||
label: overrideLabel,
|
||||
logo: overrideLogo,
|
||||
logoColor: overrideLogoColor,
|
||||
logoSize: overrideLogoSize,
|
||||
link: overrideLink,
|
||||
colorB: legacyOverrideColor,
|
||||
colorA: legacyOverrideLabelColor,
|
||||
} = overrides
|
||||
let {
|
||||
logoWidth: overrideLogoWidth,
|
||||
logoSize: overrideLogoSize,
|
||||
color: overrideColor,
|
||||
labelColor: overrideLabelColor,
|
||||
} = overrides
|
||||
|
||||
@@ -115,7 +115,6 @@ function handleRequest(cacheHeaderConfig, handlerOptions) {
|
||||
const result = handlerOptions.handler(
|
||||
filteredQueryParams,
|
||||
match,
|
||||
// eslint-disable-next-line mocha/prefer-arrow-callback
|
||||
function sendBadge(format, badgeData) {
|
||||
if (serverUnresponsive) {
|
||||
return
|
||||
@@ -128,7 +127,6 @@ function handleRequest(cacheHeaderConfig, handlerOptions) {
|
||||
makeSend(format, ask.res, end)(svg)
|
||||
},
|
||||
)
|
||||
// eslint-disable-next-line promise/prefer-await-to-then
|
||||
if (result && result.catch) {
|
||||
// eslint-disable-next-line promise/prefer-await-to-then
|
||||
result.catch(err => {
|
||||
|
||||
@@ -83,7 +83,7 @@ class ServiceTester {
|
||||
.before(() => {
|
||||
this.beforeEach()
|
||||
})
|
||||
// eslint-disable-next-line mocha/prefer-arrow-callback, promise/prefer-await-to-then
|
||||
// eslint-disable-next-line promise/prefer-await-to-then
|
||||
.finally(function () {
|
||||
// `this` is the IcedFrisby instance.
|
||||
let responseBody
|
||||
|
||||
Reference in New Issue
Block a user