-
Notifications
You must be signed in to change notification settings - Fork 18
[SBA-02b] migrate from deprecated tslint to typescript-eslint #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| // @ts-check | ||
|
|
||
| import eslint from '@eslint/js'; | ||
| import { defineConfig, globalIgnores } from 'eslint/config'; | ||
| import tseslint from 'typescript-eslint'; | ||
| import { includeIgnoreFile } from '@eslint/compat'; | ||
| import { fileURLToPath, URL } from 'node:url'; | ||
| import eslintConfigPrettier from 'eslint-config-prettier/flat'; | ||
|
|
||
| const gitignorePath = fileURLToPath(new URL('.gitignore', import.meta.url)); | ||
|
|
||
| export default defineConfig( | ||
| eslint.configs.recommended, | ||
| tseslint.configs.recommended, | ||
| eslintConfigPrettier, | ||
| includeIgnoreFile(gitignorePath), | ||
| globalIgnores(['dist/**/*'], 'Ignore Dist Directory'), | ||
| globalIgnores(['demos/**/*'], 'Ignore Demos Directory'), | ||
| globalIgnores(['lib/wasm_exec.js'], 'Ignore Wasm Exec File'), | ||
| globalIgnores(['webpack.config.js'], 'Ignore Webpack Config File'), | ||
| { | ||
| files: ['**/*.test.ts'], | ||
| rules: { | ||
| '@typescript-eslint/no-explicit-any': 'off' | ||
| } | ||
| } | ||
| ); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| declare var global: any; | ||
| declare const global: unknown; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thoughts on the following block instead?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This causes TS errors which I couldn't figure out how to get around. I think it's creating a circular dependency on imports, but I'm not sure. |
||
|
|
||
| interface GoInstance { | ||
| run(instance: WebAssembly.Instance): Promise<void>; | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a good project to add
eslint-plugin-securityif we wanted.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any specific rules that you think we need? I tried using this on the fully implemented POC branch and it only produced a bunch of false positives on the detect-object-injection rule, like this example which is valid. I don't really see the benefit of adding this if it's going to cause us to have to add a bunch of ignores to the codebase.