Skip to content

Commit

Permalink
fix(eslint): Lint problems
Browse files Browse the repository at this point in the history
  • Loading branch information
JumpLink committed Sep 20, 2024
1 parent 99709fe commit 1dc8dd0
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"no-debugger": "off",
"@typescript-eslint/triple-slash-reference": "off",
"camelcase": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-empty-object-type": "off"
"@typescript-eslint/camelcase": "off"
},
"parserOptions": {
"requireConfigFile": false,
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/commands/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class TypeScriptFormatter extends Formatter {
tabWidth: 4,
})
} catch (error) {
Logger.warn('[TypeScriptFormatter] Failed to format with prettier, returning original input', error)
return Promise.resolve(input)
}
}
Expand Down
3 changes: 1 addition & 2 deletions packages/lib/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ module.exports = {
'no-debugger': 'off',
'@typescript-eslint/triple-slash-reference': 'off',
camelcase: 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/camelcase': 'off'
},
parserOptions: {
tsconfigRootDir: __dirname,
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/src/generators/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export interface VirtualMethodJson extends NodeJson {
parameters: ParameterJson[];
returnType: TypeJson[] | TypeJson;
}
export interface MetadataJson extends Json {}
export type MetadataJson = Json;
export interface ConstJson extends NodeJson {
kind: NodeKind.constant;
name: string;
Expand Down
3 changes: 1 addition & 2 deletions packages/lib/src/gir/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ export class IntrospectedRecord extends IntrospectedBaseClass {
clazz._copyBaseProperties(this);

if (superType) {
clazz.superType;
clazz.superType = superType;
}

clazz._structFor = _structFor;
Expand Down Expand Up @@ -1400,7 +1400,6 @@ export class IntrospectedRecord extends IntrospectedBaseClass {
// "simple" records.
if (!this.isSimple()) {
return null;
("not simple");
}

// Because we may have to recursively check
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/src/types/gir-instance-parameter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import * as parser from '@gi.ts/parser'
* So the callable is surely a method of a class, and this parameter points to the instance of the object.
* In C++, this would be equivalent to the pointer this which is not passed to the method, in Python it's equivalent to self.
**/
export interface GirInstanceParameter extends parser.GirInstanceParameter {}
export type GirInstanceParameter = parser.GirInstanceParameter

0 comments on commit 1dc8dd0

Please sign in to comment.