Skip to content

Commit c567f6c

Browse files
authored
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
1 parent 7108e08 commit c567f6c

File tree

15 files changed

+1510
-771
lines changed

15 files changed

+1510
-771
lines changed

.eslintignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

.eslintrc.yml

Lines changed: 0 additions & 189 deletions
This file was deleted.

core/base-service/coalesce-badge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ export default function coalesceBadge(
4747
label: overrideLabel,
4848
logo: overrideLogo,
4949
logoColor: overrideLogoColor,
50+
logoSize: overrideLogoSize,
5051
link: overrideLink,
5152
colorB: legacyOverrideColor,
5253
colorA: legacyOverrideLabelColor,
5354
} = overrides
5455
let {
5556
logoWidth: overrideLogoWidth,
56-
logoSize: overrideLogoSize,
5757
color: overrideColor,
5858
labelColor: overrideLabelColor,
5959
} = overrides

core/base-service/legacy-request-handler.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ function handleRequest(cacheHeaderConfig, handlerOptions) {
115115
const result = handlerOptions.handler(
116116
filteredQueryParams,
117117
match,
118-
// eslint-disable-next-line mocha/prefer-arrow-callback
119118
function sendBadge(format, badgeData) {
120119
if (serverUnresponsive) {
121120
return
@@ -128,7 +127,6 @@ function handleRequest(cacheHeaderConfig, handlerOptions) {
128127
makeSend(format, ask.res, end)(svg)
129128
},
130129
)
131-
// eslint-disable-next-line promise/prefer-await-to-then
132130
if (result && result.catch) {
133131
// eslint-disable-next-line promise/prefer-await-to-then
134132
result.catch(err => {

core/service-test-runner/service-tester.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class ServiceTester {
8383
.before(() => {
8484
this.beforeEach()
8585
})
86-
// eslint-disable-next-line mocha/prefer-arrow-callback, promise/prefer-await-to-then
86+
// eslint-disable-next-line promise/prefer-await-to-then
8787
.finally(function () {
8888
// `this` is the IcedFrisby instance.
8989
let responseBody

0 commit comments

Comments
 (0)