Skip to content

Commit

Permalink
Update to ESLint 8.57.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pjonsson committed May 22, 2024
1 parent e7fdecb commit 91744ef
Show file tree
Hide file tree
Showing 6 changed files with 192 additions and 205 deletions.
39 changes: 26 additions & 13 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,32 @@ gulp.task("watch-specs", function (done) {
});

gulp.task("lint", function (done) {
var runExternalModule = require("./buildprocess/runExternalModule");

runExternalModule("eslint/bin/eslint.js", [
"lib",
"test",
"--ext",
".jsx,.js,.ts,.tsx",
"--ignore-pattern",
"lib/ThirdParty",
"--max-warnings",
"264" // TODO: Bring this back to 0
]);

const spawnSync = require("child_process").spawnSync;
// If upgrading to ESLint 9 without changing config file format:
// process.env.ESLINT_USE_FLAT_CONFIG = "false";
const result = spawnSync(
"node_modules/eslint/bin/eslint.js",
[
"lib",
"test",
"--ext",
".jsx,.js,.ts,.tsx",
"--ignore-pattern",
"lib/ThirdParty",
"--max-warnings",
"264" // TODO: Bring this back to 0
],
{
stdio: "inherit",
shell: true
}
);
if (result.status !== 0) {
const PluginError = require("plugin-error");
throw new PluginError("eslint", "ESLint exited with an error.", {
showStack: false
});
}
done();
});

Expand Down
3 changes: 2 additions & 1 deletion lib/Models/Catalog/Ows/WebMapServiceCapabilitiesStratum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ export default class WebMapServiceCapabilitiesStratum extends LoadableStratum(
Array.from(this.capabilitiesLayers.values()).forEach((layer) => {
if (!layer?.MetadataURL) return;
Array.isArray(layer?.MetadataURL)
? metadataUrls.push(...layer?.MetadataURL)
? // eslint-disable-next-line no-unsafe-optional-chaining
metadataUrls.push(...layer?.MetadataURL)
: metadataUrls.push(layer?.MetadataURL as MetadataURL);
});

Expand Down
1 change: 1 addition & 0 deletions lib/Models/Catalog/Ows/WebMapTileServiceCatalogItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ class WebMapTileServiceCatalogItem extends MappableMixin(
let tileMatrixSetLinks: TileMatrixSetLink[] = [];
if (layer?.TileMatrixSetLink) {
if (Array.isArray(layer?.TileMatrixSetLink)) {
// eslint-disable-next-line no-unsafe-optional-chaining
tileMatrixSetLinks = [...layer?.TileMatrixSetLink];
} else {
tileMatrixSetLinks = [layer.TileMatrixSetLink];
Expand Down
1 change: 1 addition & 0 deletions lib/Models/Workflows/TableStylingWorkflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1952,6 +1952,7 @@ export default class TableStylingWorkflow
),
isOpen: true,
selectableDimensions: filterOutUndefined([
// eslint-disable-next-line no-unsafe-optional-chaining
...traits.enum?.map((enumPoint, idx) => {
const dims: SelectableDimensionGroup = {
type: "group",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"babel-plugin-styled-components": "^1.10.7",
"eslint": "^7.20.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^4.6.0",
Expand Down
Loading

0 comments on commit 91744ef

Please sign in to comment.