Skip to content

Feature/65543 upgrade eslint to v9#2975

Merged
GuyHarwood merged 35 commits intomasterfrom
feature/65543-upgrade-eslint-v9
Jan 22, 2025
Merged

Feature/65543 upgrade eslint to v9#2975
GuyHarwood merged 35 commits intomasterfrom
feature/65543-upgrade-eslint-v9

Conversation

@GuyHarwood
Copy link
Copy Markdown
Contributor

@GuyHarwood GuyHarwood commented Nov 15, 2024

  • upgrade eslint from 8 > 9
  • remove standard
  • remove deprecated plugins

@GuyHarwood GuyHarwood self-assigned this Nov 15, 2024
@GuyHarwood
Copy link
Copy Markdown
Contributor Author

closing until all lint issues fixed to avoid pointless CI work

@GuyHarwood GuyHarwood closed this Nov 15, 2024
@GuyHarwood
Copy link
Copy Markdown
Contributor Author

core linter rules passing

@GuyHarwood GuyHarwood reopened this Nov 19, 2024
@GuyHarwood
Copy link
Copy Markdown
Contributor Author

GuyHarwood commented Dec 31, 2024

exploring prettier...

dev/mtc/admin ❯❯❯ npx prettier . --write --no-semi --single-quote --trailing-comma none

produces 501~ file changes on just the admin app.

will leave for now, pending discussion with wider team.

@GuyHarwood GuyHarwood marked this pull request as ready for review December 31, 2024 11:38
@GuyHarwood GuyHarwood added the CI Enabled Travis will only build PRs with this label assigned label Dec 31, 2024
@GuyHarwood GuyHarwood requested a review from seastate6 January 3, 2025 12:51
Copy link
Copy Markdown
Contributor

@seastate6 seastate6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Fantastic work! Adding comments.

You might want to consider whether we want the additional testing burden of modernising (var => consts) the frontend code. This code might be minified, but it is not transpiled, and is delivered as-is which means these changes could affect anyone still using IE11/10 or Safari 10 (or earlier).

Comment thread admin/delete-this-old-eslint-v8.txt Outdated
Comment thread admin/tests-integration/check-form.service.spec.js
Comment thread tslib/old.eslintrc.json Outdated
Comment thread tslib/src/azure/app-insights.ts Outdated
import config from '../config'
import { isNil } from 'ramda'
const appInsights = require('applicationinsights')
import * as appInsights from 'applicationinsights'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alarm bells are ringing here. Please do test this. Application Insights is very sensitive to ejs / cjs differences and although we are writing typescript esm, we are compiling to cjs to be run on node.

Comment thread tslib/src/caching/redis-service.ts Outdated
@@ -40,7 +40,7 @@ export interface IRedisService {
* @param {Array<string>} keys an array of keys to invalidate
* @returns {Promise<Array<[error: Error | null, result: unknown]> | null | undefined>}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The jsdoc is out of date now the call sig has changed. Please consider either updating or deleting the jsdoc.

@@ -25,7 +25,7 @@ export interface IRedisService {
* @param {Array<string>} keys an array of keys to invalidate
* @returns {Promise<void>}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The jsdoc type and the typescript types are misaligned. You can probably delete the jsdoc for *.ts files.

@GuyHarwood
Copy link
Copy Markdown
Contributor Author

@jon-shipley based on our SPA browser policy and the govuk guidance we are ok to update the browser JS...

for...of browser compatibility is OK - https://caniuse.com/?search=for...of
const browser compatibility is OK - https://caniuse.com/const

Copy link
Copy Markdown
Contributor

@seastate6 seastate6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@GuyHarwood GuyHarwood merged commit ead6f1d into master Jan 22, 2025
@GuyHarwood GuyHarwood deleted the feature/65543-upgrade-eslint-v9 branch January 22, 2025 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Enabled Travis will only build PRs with this label assigned Requires Tech Sign Off Tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants