Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 0 additions & 20 deletions .eslintignore

This file was deleted.

39 changes: 0 additions & 39 deletions .eslintrc.js

This file was deleted.

4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
pip install "jupyterlab>=4.6.0b1,<5"
jlpm install

- name: Build the extension
run: |
jlpm build

- name: Run pre-commit
uses: pre-commit/action@v3.0.1
with:
Expand Down
69 changes: 69 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* Copyright (c) Jupyter Development Team.
* Distributed under the terms of the Modified BSD License.
*/

import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import prettierRecommended from 'eslint-plugin-prettier/recommended';
import jupyter from '@jupyter/eslint-plugin';

export default tseslint.config(
{
// Replaces the former .eslintignore
ignores: [
'**/lib/**',
'**/node_modules/**',
'**/style/**',
'**/*.d.ts',
'**/test/**',
'**/ui-tests/**',
'**/labextension/**',
'docs/**',
'tests/**',
'eslint.config.mjs',
'.eslintrc.js',
'jupyter-config/**',
'jupyter_collaboration/**',
'**/babel.config.js',
'**/jest.config.js'
]
},
js.configs.recommended,
...tseslint.configs.recommended,
prettierRecommended,
{
plugins: { jupyter }
},
...jupyter.configs.recommended,
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
sourceType: 'module'
}
},
rules: {
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: true
}
}
],
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-use-before-define': 'off',
curly: ['error', 'all'],
eqeqeq: 'error',
'prefer-arrow-callback': 'error'
}
}
);
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"clean:all": "lerna run clean:all",
"docs": "typedoc",
"eslint": "jlpm eslint:check --fix",
"eslint:check": "eslint . --ext .ts,.tsx",
"eslint:check": "eslint .",
"install:extension": "lerna run install:extension",
"lint": "jlpm prettier && jlpm eslint && jlpm stylelint",
"lint:check": "jlpm prettier:check && jlpm eslint:check",
Expand All @@ -54,13 +54,13 @@
"watch": "lerna run watch --parallel"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "~5.55.0",
"@typescript-eslint/parser": "~5.55.0",
"eslint": "~8.36.0",
"eslint-config-prettier": "~8.7.0",
"eslint-plugin-jest": "~27.2.1",
"eslint-plugin-prettier": "~4.2.1",
"eslint-plugin-react": "~7.32.2",
"@eslint/js": "^9.30.0",
"@jupyter/eslint-plugin": "^1.0.1",
"eslint": "^9.30.0",
"eslint-config-prettier": "^10.1.5",
"eslint-plugin-jest": "^28.13.0",
"eslint-plugin-prettier": "^5.5.1",
"eslint-plugin-react": "^7.37.5",
"lerna": "^6.5.1",
"prettier": "^2.8.4",
"rimraf": "^4.1.2",
Expand All @@ -69,6 +69,7 @@
"stylelint-config-standard": "^30.0.1",
"stylelint-prettier": "^3.0.0",
"typedoc": "~0.23.28",
"typescript": "~5.9.3"
"typescript": "~5.9.3",
"typescript-eslint": "^8.35.0"
}
}
4 changes: 2 additions & 2 deletions packages/collaboration-extension/src/collaboration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const rtcGlobalAwarenessPlugin: JupyterFrontEndPlugin<IAwareness> = {
provides: IGlobalAwareness,
activate: (
app: JupyterFrontEnd,
state: StateDB,
state: IStateDB,
factory: IAwarenessProviderFactory
): IAwareness => {
const { user } = app.serviceManager;
Expand All @@ -108,7 +108,7 @@ export const rtcGlobalAwarenessPlugin: JupyterFrontEndPlugin<IAwareness> = {

factory.create(awarenessOptions);

state.changed.connect(async () => {
(state as StateDB).changed.connect(async () => {
const data: any = await state.toJSON();
const current: string = data['layout-restorer:data']?.main?.current || '';

Expand Down
Loading
Loading