Skip to content

Commit

Permalink
fixup! edit
Browse files Browse the repository at this point in the history
  • Loading branch information
tamuratak committed Oct 21, 2024
1 parent 7059789 commit 24fd428
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 13 deletions.
13 changes: 3 additions & 10 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ const commonRules = {
}],
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-return": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
Expand All @@ -39,15 +35,12 @@ const commonRules = {
"ignoreRestSiblings": true
}
],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-unsafe-enum-comparison": "off",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-readonly": "error",
"no-return-await": "off",
"@typescript-eslint/return-await": "error",
"require-await": "off",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/restrict-template-expressions": "off",
"curly": "error",
"default-case": "error",
"eol-last": "error",
Expand Down Expand Up @@ -107,7 +100,7 @@ export default tseslint.config(
],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
...tseslint.configs.stylistic,
{
languageOptions: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class LabelDefinitionUpdater {
return this.getRefFromNodeArray(node.args, lines)
}
if (latexParser.isLstlisting(node)) {
const arg = (node as latexParser.Lstlisting).arg
const arg = node.arg
if (arg) {
return this.getRefFromNode(arg, lines)
}
Expand Down
1 change: 1 addition & 0 deletions src/components/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ export class Server {
}
} catch (err: unknown) {
if (err instanceof vscode.FileSystemError || err instanceof Error) {
/* eslint-disable-next-line @typescript-eslint/no-unsafe-member-access */
const code = (err as any)?.code as unknown
if (code === 'FileNotFound' || code === 'ENOENT') {
response.writeHead(404)
Expand Down
1 change: 1 addition & 0 deletions src/providers/completionlib/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export interface CmdSignature {
}

function isCmdItemEntry(obj: any): obj is CmdItemEntry {
/* eslint-disable-next-line @typescript-eslint/no-unsafe-member-access */
return (typeof obj.command === 'string') && (typeof obj.snippet === 'string')
}

Expand Down
1 change: 1 addition & 0 deletions src/providers/completionlib/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface EnvItemEntry {
}

function isEnvItemEntry(obj: any): obj is EnvItemEntry {
/* eslint-disable-next-line @typescript-eslint/no-unsafe-member-access */
return (typeof obj.name === 'string')
}

Expand Down
1 change: 1 addition & 0 deletions test/build.index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export function run(): Promise<void> {
})
} catch (e) {
console.error(e)
/* eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors */
reject(e)
}
})
Expand Down
1 change: 1 addition & 0 deletions test/completion.index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export function run(): Promise<void> {
})
} catch (e) {
console.error(e)
/* eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors */
reject(e)
}
})
Expand Down
1 change: 1 addition & 0 deletions test/multiroot-ws.index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export function run(): Promise<void> {
})
} catch (e) {
console.error(e)
/* eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors */
reject(e)
}
})
Expand Down
1 change: 1 addition & 0 deletions test/rootfile.index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export function run(): Promise<void> {
})
} catch (e) {
console.error(e)
/* eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors */
reject(e)
}
})
Expand Down
1 change: 1 addition & 0 deletions test/unittest.index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export function run(): Promise<void> {
})
} catch (e) {
console.error(e)
/* eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors */
reject(e)
}
})
Expand Down
2 changes: 1 addition & 1 deletion test/unittests/components/linter.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-argument */
/* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access */

import * as vscode from 'vscode'
import * as fs from 'node:fs'
Expand Down
2 changes: 1 addition & 1 deletion test/unittests/providers/structure.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-argument */
/* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access */

import * as vscode from 'vscode'
import * as path from 'node:path'
Expand Down
1 change: 1 addition & 0 deletions test/viewer.index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export function run(): Promise<void> {
})
} catch (e) {
console.error(e)
/* eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors */
reject(e)
}
})
Expand Down

0 comments on commit 24fd428

Please sign in to comment.