Upgrade prettier and eslint compatibility libraries to latest (#7478)

* chore: upgrade prettier and eslint libraries to latest

- upgrade prettier
- upgrade eslint
- upgrade eslint-plugin-prettier
- upgrade eslint-config-prettier

* chore: run lint:fix

* chore: add `prettier-eslint` devDependency

- The `prettier-eslint` vscode plugin sinc v6.0.0 no longer provides this package so we must install it as a devDependency so that autoformat works.

* chore: add recommended extensions file for vscode users

* Update extensions.json

* Revert "Update extensions.json"

This reverts commit 942f341a75abf68842a0d6e3a1d5092bc9f00c51.

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
This commit is contained in:
Jesse Mazzella 2024-02-06 16:16:22 -08:00 committed by GitHub
parent 539b43325a
commit cd6adbadde
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 29 additions and 14 deletions

14
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,14 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"Vue.volar",
"Vue.vscode-typescript-vue-plugin",
"dbaeumer.vscode-eslint",
"rvest.vs-code-prettier-eslint"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": ["octref.vetur"]
}

View File

@ -28,12 +28,12 @@
"d3-axis": "3.0.0",
"d3-scale": "4.0.2",
"d3-selection": "3.0.0",
"eslint": "8.54.0",
"eslint-config-prettier": "9.0.0",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-compat": "4.2.0",
"eslint-plugin-no-unsanitized": "4.0.2",
"eslint-plugin-playwright": "0.12.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-simple-import-sort": "10.0.0",
"eslint-plugin-unicorn": "49.0.0",
"eslint-plugin-vue": "9.18.1",
@ -67,7 +67,8 @@
"painterro": "1.2.87",
"plotly.js-basic-dist-min": "2.20.0",
"plotly.js-gl2d-dist-min": "2.20.0",
"prettier": "2.8.7",
"prettier": "3.2.5",
"prettier-eslint": "16.3.0",
"printj": "1.3.1",
"resolve-url-loader": "5.0.0",
"sanitize-html": "2.11.0",

View File

@ -46,14 +46,14 @@ describe('DeviceMatchers', function () {
return 'is' + deviceType[0].toUpperCase() + deviceType.slice(1);
}
['mobile', 'phone', 'tablet', 'landscape', 'portrait', 'landscape', 'touch'].forEach(function (
deviceType
) {
it('detects when a device is a ' + deviceType + ' device', function () {
mockAgent[method(deviceType)].and.returnValue(true);
expect(DeviceMatchers[deviceType](mockAgent)).toBe(true);
mockAgent[method(deviceType)].and.returnValue(false);
expect(DeviceMatchers[deviceType](mockAgent)).toBe(false);
});
});
['mobile', 'phone', 'tablet', 'landscape', 'portrait', 'landscape', 'touch'].forEach(
function (deviceType) {
it('detects when a device is a ' + deviceType + ' device', function () {
mockAgent[method(deviceType)].and.returnValue(true);
expect(DeviceMatchers[deviceType](mockAgent)).toBe(true);
mockAgent[method(deviceType)].and.returnValue(false);
expect(DeviceMatchers[deviceType](mockAgent)).toBe(false);
});
}
);
});