Skip to content

Commit

Permalink
Update dependencies and upgrade to ESLint 9 (#154)
Browse files Browse the repository at this point in the history
* Update dependencies
* Fix API extractor
* Upgrade to ESLint 9
* Simplify ESLint rules
* Fix lint issues
* Update Docker image for Playwright
  • Loading branch information
MattiasBuelens authored Oct 12, 2024
1 parent 04e4192 commit f32598d
Show file tree
Hide file tree
Showing 41 changed files with 1,622 additions and 1,830 deletions.
277 changes: 0 additions & 277 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
name: ${{ matrix.browser }}
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.42.0-jammy
image: mcr.microsoft.com/playwright:v1.48.0-noble
strategy:
fail-fast: false
matrix:
Expand Down
56 changes: 56 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import globals from 'globals';
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import stylistic from '@stylistic/eslint-plugin';

export default tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
stylistic.configs.customize({
indent: 2,
semi: true,
arrowParens: false,
commaDangle: 'never',
quotes: 'single',
quoteProps: 'consistent',
blockSpacing: true,
braceStyle: '1tbs'
}),
{
languageOptions: {
globals: {
...globals.node,
...globals.browser,
ReadableStream: false,
WritableStream: false,
TransformStream: false,
ByteLengthQueuingStrategy: false,
CountQueuingStrategy: false,
AbortSignal: false,
DEBUG: false,
GCController: false,
gc: false,
globalThis: false
},

ecmaVersion: 2018,
sourceType: 'module'
},

rules: {
'no-self-compare': 'error',

'prefer-const': ['error', {
ignoreReadBeforeAssign: true
}],

'@stylistic/function-paren-newline': ['error', 'multiline'],

'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-redeclare': 'error',
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/no-useless-constructor': 'error'
}
}
);
2 changes: 0 additions & 2 deletions etc/web-streams-polyfill.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
```ts

/// <reference lib="es2018.asynciterable" />

// @public
export interface AbortSignal {
readonly aborted: boolean;
Expand Down
Loading

0 comments on commit f32598d

Please sign in to comment.