Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
44ec31b
feat: migrate from tslint to eslint, step 1
ssimek Jan 16, 2025
583fbad
style: fix first batch of less-common stylistic violations
ssimek Jan 16, 2025
3da4cb6
style: fix key-spacing violations
ssimek Jan 16, 2025
40ecf06
style: fix space-in-parens violations
ssimek Jan 16, 2025
1542900
style: fix spadded-blocks violations
ssimek Jan 16, 2025
fb2ce34
style: fix quote style violations
ssimek Jan 16, 2025
0a81a2d
style: fix max-len style violations
ssimek Jan 16, 2025
d48ef4c
style: fix lines-between-class-members style violations
ssimek Jan 16, 2025
8d5dc34
style: fix spaced-comment style violations
ssimek Jan 16, 2025
c7c9c5d
style: fix block-spacing style violations
ssimek Jan 16, 2025
9fad3c6
style: fix member-delimiter-style style violations
ssimek Jan 16, 2025
d9fa94f
style: suppress indent-binary-ops lint check
ssimek Jan 16, 2025
68e5099
style: fix no-multi-spaces style violations
ssimek Jan 16, 2025
697c3a1
style: fix operator-linebreak style violations
ssimek Jan 16, 2025
f4c594c
style: fix object-curly-spacing style violations
ssimek Jan 16, 2025
e2b71dc
style: fix no-tabs style violations
ssimek Jan 16, 2025
0b692b9
style: fix no-trailing-spaces style violations
ssimek Jan 16, 2025
57a4d7a
style: fix max-statements-per-line style violations
ssimek Jan 16, 2025
f827d9b
style: fix brace-style style violations
ssimek Jan 16, 2025
b6eb451
style: fix indent style violations
ssimek Jan 16, 2025
fd49abe
style: fix lint rule violations with rare occurrence
ssimek Jan 16, 2025
6a9ce8e
fix: fix errors not being logged during remote extension startup (cau…
ssimek Jan 16, 2025
2120a41
style: fix no-for-in-array linter rule violations
ssimek Jan 16, 2025
1508f38
style: fix no-unsafe-function-type linter rule violations
ssimek Jan 16, 2025
e8524a0
style: fix no-fallthrough linter rule violations
ssimek Jan 16, 2025
a6bd238
style: fix no-redundant-type-constituents linter rule violations
ssimek Jan 16, 2025
b1dcee6
style: fix no-useless-catch linter rule violations
ssimek Jan 16, 2025
afedd35
style: fix no-undef linter rule violations
ssimek Jan 16, 2025
fcb1faf
style: fix no-case-declarations linter rule violations
ssimek Jan 16, 2025
9f3b41b
style: fix unbound-method linter rule violations
ssimek Jan 16, 2025
7978e95
style: fix no-constant-condition linter rule violations, removed a bi…
ssimek Jan 16, 2025
d3fb83c
style: fix no-unnecessary-type-assertion linter rule violations
ssimek Jan 16, 2025
2435a08
style: fix no-unsafe-enum-comparison linter rule violations
ssimek Jan 16, 2025
a839d95
style: fix no-prototype-builtins linter rule violations, included rem…
ssimek Jan 16, 2025
a175ded
ci: fix lint action
ssimek Jan 17, 2025
0c97ebe
style: improve config files for ESLint
ssimek Jan 17, 2025
d855332
style: fix prefer-const linter rule violations
ssimek Jan 17, 2025
5ce25a1
style: fix restrict-template-expressions rule violations
ssimek Jan 17, 2025
97532ea
style: fix no-empty rule violations, actually logging many of the sil…
ssimek Jan 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
if: steps.cache-npm.outputs.cache-hit != 'true'
run: |
npm install

build:
name: Build
needs: setup
Expand Down Expand Up @@ -58,4 +58,4 @@ jobs:
path: ./node_modules
key: npm-${{ hashFiles('./package-lock.json') }}
- name: Lint Project
run: ./node_modules/tslint/bin/tslint --project .
run: npm run lint
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"recommendations": [
"tobermory.es6-string-html",
"ms-vscode.vscode-typescript-tslint-plugin"
"dbaeumer.vscode-eslint"
]
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.useTabStops": false,
"files.trimTrailingWhitespace": false,
"eslint.useFlatConfig": true,
"files.trimTrailingWhitespace": true,
"files.exclude": {
"out": false,
"dist": true,
Expand Down
88 changes: 88 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import stylistic from '@stylistic/eslint-plugin';
import globals from 'globals';

export default tseslint.config(
{
ignores: ['out/', 'dist/'],
},
eslint.configs.recommended,
tseslint.configs.recommendedTypeChecked,
stylistic.configs.customize({
arrowParens: 'always',
braceStyle: '1tbs',
commaDangle: 'only-multiline',
indent: 4,
quotes: 'single',
semi: 'always',
}),
{
files: ['resources/*.js'],
languageOptions: {
globals: {
acquireVsCodeApi: true, // available for VSCode WebViews
},
},
},
{
languageOptions: {
globals: {
...globals.node,
...globals.browser,
},
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},

rules: {
'@typescript-eslint/no-base-to-string': 'off', // 1 instance

'@stylistic/indent-binary-ops': 'off', // this is a weird rule
'@stylistic/max-len': ['error', {
code: 160,
ignoreTrailingComments: true,
}],
'@stylistic/max-statements-per-line': ['error', {
ignoredNodes: ['IfStatement'],
}],
'@stylistic/member-delimiter-style': ['error', {
multiline: { delimiter: 'semi' },
singleline: { delimiter: 'semi' },
}],
'@stylistic/no-multi-spaces': ['error', {
ignoreEOLComments: true,
}],
'@stylistic/quote-props': ['error', 'as-needed', {
unnecessary: false,
}],
}
},
{
// the following rules are being heavily violated in the current codebase,
// we should work on being able to enable them...
rules: {
'@typescript-eslint/no-unsafe-member-access': 'off', // 742 instances
'@typescript-eslint/no-unsafe-call': 'off', // 432 instances
'@typescript-eslint/no-unsafe-assignment': 'off', // 429 instances
'@typescript-eslint/no-unsafe-argument': 'off', // 401 instances
'@typescript-eslint/no-explicit-any': 'off', // 226 instances
'@typescript-eslint/no-unused-vars': 'off', // 204 instances
'@typescript-eslint/no-unsafe-return': 'off', // 83 instances
'@typescript-eslint/no-misused-promises': 'off', // 57 instances
'@typescript-eslint/no-floating-promises': 'off', // 55 instances
'no-useless-escape': 'off', // 38 instances
'@typescript-eslint/prefer-promise-reject-errors': 'off', // 36 instances
'no-async-promise-executor': 'off', // 29 instances
'@typescript-eslint/no-require-imports': 'off', // 24 instances
'no-cond-assign': 'off', // 21 instances
'@typescript-eslint/require-await': 'off', // 11 instances
}
},
{
files: ['**/*.{js,mjs}'],
extends: [tseslint.configs.disableTypeChecked],
},
);
Loading
Loading