Skip to content

Commit

Permalink
Chore: update typescript-eslint monorepo to v8 (major) (#1323)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian Emmer <10749361+emmercm@users.noreply.github.com>
  • Loading branch information
renovate[bot] and emmercm authored Aug 31, 2024
1 parent ea55b6a commit 21c7490
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 113 deletions.
148 changes: 57 additions & 91 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@
"@types/which": "3.0.4",
"@types/xml2js": "0.4.14",
"@types/yargs": "17.0.33",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
"@typescript-eslint/eslint-plugin": "8.3.0",
"@typescript-eslint/parser": "8.3.0",
"auto-changelog": "2.4.0",
"caxa": "3.0.1",
"eslint": "8.57.0",
Expand Down
9 changes: 2 additions & 7 deletions src/modules/dats/datScanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ import ProgressBar, { ProgressBarSymbol } from '../../console/progressBar.js';
import DriveSemaphore from '../../driveSemaphore.js';
import bufferPoly from '../../polyfill/bufferPoly.js';
import fsPoly from '../../polyfill/fsPoly.js';
import CMProParser, {
DATProps,
DiskProps,
GameProps,
ROMProps,
} from '../../types/dats/cmpro/cmProParser.js';
import CMProParser, { DATProps, GameProps, ROMProps } from '../../types/dats/cmpro/cmProParser.js';
import DAT from '../../types/dats/dat.js';
import DATObject, { DATObjectProps } from '../../types/dats/datObject.js';
import Disk from '../../types/dats/disk.js';
Expand Down Expand Up @@ -402,7 +397,7 @@ export default class DATScanner extends Scanner {
}),
);

let gameDisks: DiskProps[] = [];
let gameDisks: ROMProps[] = [];
if (game.disk) {
if (Array.isArray(game.disk)) {
gameDisks = game.disk;
Expand Down
8 changes: 2 additions & 6 deletions src/types/dats/cmpro/cmProParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ExpectedError from '../../expectedError.js';
export interface DATProps extends CMProObject {
clrmamepro?: ClrMameProProps;
game?: GameProps | GameProps[];
resource?: ResourceProps | ResourceProps[];
resource?: ROMProps | ROMProps[];
}

export interface ClrMameProProps extends CMProObject {
Expand Down Expand Up @@ -31,7 +31,7 @@ export interface GameProps extends CMProObject {
romof?: string;
sampleof?: string;
rom?: ROMProps | ROMProps[];
disk?: DiskProps | DiskProps[];
disk?: ROMProps | ROMProps[];
sample?: SampleProps | SampleProps[];
// NON-STANDARD PROPERTIES
comment?: string;
Expand All @@ -57,14 +57,10 @@ export interface ROMProps extends CMProObject {
// serial?: string,
}

export interface DiskProps extends ROMProps {}

export interface SampleProps extends CMProObject {
name: string;
}

export interface ResourceProps extends GameProps {}

type CMProValue = CMProObject | string | undefined;

type CMProObject = { [key: string]: CMProValue | CMProValue[] };
Expand Down
10 changes: 3 additions & 7 deletions test/driveSemaphore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ describe('map', () => {

it('should handle thrown literals', async () => {
await expect(
new DriveSemaphore(1).map(
['file'],
// eslint-disable-next-line @typescript-eslint/no-throw-literal
() => {
throw 'message';
},
),
new DriveSemaphore(1).map(['file'], () => {
throw 'message';
}),
).rejects.toThrow('message');
});
});

0 comments on commit 21c7490

Please sign in to comment.