Skip to content

Commit

Permalink
update eslintrules + obvious mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
smwhr committed Aug 3, 2024
1 parent 7eaacc9 commit 16c2fbd
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,21 @@ module.exports = {
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
"@typescript-eslint/no-unsafe-enum-comparison": "off",
"prefer-const": "off",
"prefer-spread": "off",
"prefer-rest-params": "off",
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/Parser/ParsedHierarchy/Divert/Divert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ export class Divert extends ParsedObject {
const externalName: string | null = this.target
? this.target.firstComponent
: null;
const external = context.externals.get(externalName as any);
const external = context.externals.get(externalName as string);
if (!external) {
throw new Error("external not found");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export abstract class Expression extends ParsedObject {
return "Expression";
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
public Equals(obj: ParsedObject): boolean {
return false;
}
Expand Down
1 change: 1 addition & 0 deletions src/compiler/Parser/ParsedHierarchy/Flow/FlowBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export abstract class FlowBase extends ParsedObject implements INamedContent {
return finalContent;
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
public PreProcessTopLevelObjects(_: ParsedObject[]): void {
// empty by default, used by Story to process included file references
}
Expand Down
2 changes: 2 additions & 0 deletions src/engine/ListDefinition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ export class ListDefinition {
item = InkListItem.Null;
return { result: item, exists: false };
}

public TryGetValueForItem(
item: InkListItem,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
/* out */ intVal: number
): TryGetResult<number> {
if (!item.itemName) return { result: 0, exists: false };
Expand Down
1 change: 1 addition & 0 deletions src/engine/TypeAssertion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export function isEquatable(type: any) {

function unsafeTypeAssertion<T>(
obj: any,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
type: (new () => T) | (Function & { prototype: T })
) {
return obj as T;
Expand Down
1 change: 1 addition & 0 deletions src/tests/specs/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export {};

declare global {
namespace jest {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface Matchers<R> {
toContainStringContaining(expected: string): CustomMatcherResult;
}
Expand Down

0 comments on commit 16c2fbd

Please sign in to comment.