Skip to content

Commit e9b897f

Browse files
committed
pin node, revert to no-dangling-commas
1 parent f0fc3e2 commit e9b897f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+473
-472
lines changed

binder/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies:
1010
- jupyterlab >=2,<3.0.0a0
1111
- notebook >=4.3.1
1212
# build dependencies
13-
- nodejs
13+
- nodejs >=10,<14
1414
# for python language server (and development)
1515
- black
1616
- flake8 >=3.5

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
}
3030
},
3131
"prettier": {
32-
"singleQuote": true
32+
"singleQuote": true,
33+
"trailingComma": "none"
3334
},
3435
"private": true,
3536
"scripts": {

packages/.eslintrc.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
es6: true,
55
commonjs: true,
66
node: true,
7-
'jest/globals': true,
7+
'jest/globals': true
88
},
99
root: true,
1010
extends: [
@@ -13,18 +13,18 @@ module.exports = {
1313
'plugin:@typescript-eslint/recommended',
1414
'prettier/@typescript-eslint',
1515
'plugin:react/recommended',
16-
'plugin:jest/recommended',
16+
'plugin:jest/recommended'
1717
],
1818
ignorePatterns: [
1919
'**/node_modules/**/*',
2020
'**/lib/**/*',
2121
'**/_*.ts',
2222
'**/_*.d.ts',
23-
'**/typings/**/*.d.ts',
23+
'**/typings/**/*.d.ts'
2424
],
2525
parser: '@typescript-eslint/parser',
2626
parserOptions: {
27-
project: 'packages/tsconfig.eslint.json',
27+
project: 'packages/tsconfig.eslint.json'
2828
},
2929
plugins: ['@typescript-eslint', 'jest'],
3030
rules: {
@@ -59,11 +59,11 @@ module.exports = {
5959
'react/display-name': 'off',
6060
'prefer-spread': 'off',
6161
'@typescript-eslint/triple-slash-reference': 'off',
62-
'no-async-promise-executor': 'off',
62+
'no-async-promise-executor': 'off'
6363
},
6464
settings: {
6565
react: {
66-
version: 'detect',
67-
},
68-
},
66+
version: 'detect'
67+
}
68+
}
6969
};

packages/jupyterlab-go-to-definition/jest.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const reuseFromUpstream = [
66
'moduleNameMapper',
77
'reporters',
88
'setupFiles',
9-
'setupFilesAfterEnv',
9+
'setupFilesAfterEnv'
1010
];
1111

1212
let local = {
@@ -15,9 +15,9 @@ let local = {
1515
transform: {
1616
'\\.(ts|tsx)?$': 'ts-jest',
1717
'\\.(js|jsx)?$': './transform.js',
18-
'\\.svg$': 'jest-raw-loader',
18+
'\\.svg$': 'jest-raw-loader'
1919
},
20-
transformIgnorePatterns: ['/node_modules/(?!(@jupyterlab/.*)/)'],
20+
transformIgnorePatterns: ['/node_modules/(?!(@jupyterlab/.*)/)']
2121
};
2222

2323
for (const option of reuseFromUpstream) {

packages/jupyterlab-go-to-definition/src/editors/codemirror/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export class CodeMirrorExtension extends CodeMirrorTokensProvider
8181
this.jumper.jump_to_definition({
8282
token: token,
8383
mouseEvent: event,
84-
origin: target,
84+
origin: target
8585
});
8686
}
8787
event.preventDefault();
@@ -148,7 +148,7 @@ export class CodeMirrorExtension extends CodeMirrorTokensProvider
148148
token = {
149149
value: lookupName,
150150
offset: 0, // dummy offset
151-
type: lookupType,
151+
type: lookupType
152152
};
153153
}
154154

packages/jupyterlab-go-to-definition/src/index.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {
22
JupyterFrontEnd,
3-
JupyterFrontEndPlugin,
3+
JupyterFrontEndPlugin
44
} from '@jupyterlab/application';
55
import { ICommandPalette } from '@jupyterlab/apputils';
66
import { INotebookTracker } from '@jupyterlab/notebook';
@@ -25,7 +25,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
2525
INotebookTracker,
2626
ISettingRegistry,
2727
ICommandPalette,
28-
IDocumentManager,
28+
IDocumentManager
2929
],
3030
activate: (
3131
app: JupyterFrontEnd,
@@ -111,25 +111,25 @@ const plugin: JupyterFrontEndPlugin<void> = {
111111
jumpNotebook: 'go-to-definition:notebook',
112112
jumpFileEditor: 'go-to-definition:file-editor',
113113
jumpBackNotebook: 'go-to-definition:notebook-back',
114-
jumpBackFileEditor: 'go-to-definition:file-editor-back',
114+
jumpBackFileEditor: 'go-to-definition:file-editor-back'
115115
};
116116

117117
// Add the command to the palette.
118118
palette.addItem({
119119
command: cmdIds.jumpNotebook,
120-
category: 'Notebook Cell Operations',
120+
category: 'Notebook Cell Operations'
121121
});
122122
palette.addItem({
123123
command: cmdIds.jumpBackNotebook,
124-
category: 'Notebook Cell Operations',
124+
category: 'Notebook Cell Operations'
125125
});
126126
palette.addItem({
127127
command: cmdIds.jumpFileEditor,
128-
category: 'Text Editor',
128+
category: 'Text Editor'
129129
});
130130
palette.addItem({
131131
command: cmdIds.jumpBackFileEditor,
132-
category: 'Text Editor',
132+
category: 'Text Editor'
133133
});
134134

135135
function isEnabled(tracker: any) {
@@ -156,7 +156,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
156156
notebook.activeCellIndex
157157
);
158158
},
159-
isEnabled: isEnabled(notebookTracker),
159+
isEnabled: isEnabled(notebookTracker)
160160
});
161161

162162
app.commands.addCommand(cmdIds.jumpBackNotebook, {
@@ -167,7 +167,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
167167
let jumper = new NotebookJumper(notebook_widget, documentManager);
168168
jumper.jump_back();
169169
},
170-
isEnabled: isEnabled(notebookTracker),
170+
isEnabled: isEnabled(notebookTracker)
171171
});
172172

173173
app.commands.addCommand(cmdIds.jumpFileEditor, {
@@ -184,7 +184,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
184184

185185
jumper.jump_to_definition({ token, origin: null });
186186
},
187-
isEnabled: isEnabled(fileEditorTracker),
187+
isEnabled: isEnabled(fileEditorTracker)
188188
});
189189

190190
app.commands.addCommand(cmdIds.jumpBackFileEditor, {
@@ -195,35 +195,35 @@ const plugin: JupyterFrontEndPlugin<void> = {
195195
let jumper = new FileEditorJumper(fileEditorWidget, documentManager);
196196
jumper.jump_back();
197197
},
198-
isEnabled: isEnabled(fileEditorTracker),
198+
isEnabled: isEnabled(fileEditorTracker)
199199
});
200200

201201
const bindings = [
202202
{
203203
selector: '.jp-Notebook.jp-mod-editMode',
204204
keys: ['Ctrl Alt B'],
205-
command: cmdIds.jumpNotebook,
205+
command: cmdIds.jumpNotebook
206206
},
207207
{
208208
selector: '.jp-Notebook',
209209
keys: ['Alt O'],
210-
command: cmdIds.jumpBackNotebook,
210+
command: cmdIds.jumpBackNotebook
211211
},
212212
{
213213
selector: '.jp-FileEditor',
214214
keys: ['Ctrl Alt B'],
215-
command: cmdIds.jumpFileEditor,
215+
command: cmdIds.jumpFileEditor
216216
},
217217
{
218218
selector: '.jp-FileEditor',
219219
keys: ['Alt O'],
220-
command: cmdIds.jumpBackFileEditor,
221-
},
220+
command: cmdIds.jumpBackFileEditor
221+
}
222222
];
223223

224224
bindings.map((binding) => app.commands.addKeyBinding(binding));
225225
},
226-
autoStart: true,
226+
autoStart: true
227227
};
228228

229229
/**

packages/jupyterlab-go-to-definition/src/jumpers/fileeditor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ export class FileEditorJumper extends CodeJumper {
107107
return {
108108
token: {
109109
offset: this.getOffset(position),
110-
value: '',
110+
value: ''
111111
},
112-
index: 0,
112+
index: 0
113113
};
114114
}
115115
}

packages/jupyterlab-go-to-definition/src/jumpers/jumper.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const cell_magic_lang_to_tokenizer: any = {
3939
js: 'javascript',
4040
svg: 'application/xml',
4141
html: 'text/html',
42-
latex: 'text/x-stex',
42+
latex: 'text/x-stex'
4343
// not working as for now:
4444
// 'ruby': 'text/x-ruby',
4545
// require additional logic/scripting:
@@ -55,7 +55,7 @@ const movement_keys = [
5555
'Home',
5656
'End',
5757
'PageUp',
58-
'PageDown',
58+
'PageDown'
5959
];
6060

6161
const modifiers = ['Alt', 'AltGraph', 'Control', 'Shift'];
@@ -73,7 +73,7 @@ const system_keys = [
7373
'F10',
7474
'F11',
7575
'F12',
76-
'ContextMenu',
76+
'ContextMenu'
7777
];
7878

7979
export abstract class CodeJumper {
@@ -173,7 +173,7 @@ export abstract class CodeJumper {
173173
}
174174
return {
175175
token: definitionToken,
176-
cellIndex: definitionIndex,
176+
cellIndex: definitionIndex
177177
};
178178
}
179179

@@ -238,8 +238,8 @@ export abstract class CodeJumper {
238238
'do you really wish to edit it?',
239239
buttons: [
240240
Dialog.cancelButton({ label: 'Cancel' }),
241-
Dialog.warnButton({ label: 'Edit anyway' }),
242-
],
241+
Dialog.warnButton({ label: 'Edit anyway' })
242+
]
243243
});
244244

245245
dialog_promise
@@ -285,7 +285,7 @@ export abstract class CodeJumper {
285285
editor_index: input_number,
286286
line: line_number,
287287
column: column,
288-
uri: path,
288+
uri: path
289289
},
290290
is_symlink
291291
);

packages/jupyterlab-go-to-definition/src/jumpers/notebook.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ export class NotebookJumper extends CodeJumper {
173173
return {
174174
token: {
175175
offset: this.getOffset(position, cell_index),
176-
value: '',
176+
value: ''
177177
},
178-
index: cell_index,
178+
index: cell_index
179179
};
180180
}
181181
}

packages/jupyterlab-go-to-definition/src/languages/python.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ describe('PythonAnalyzer', () => {
145145
'x, (y, z) = a, [b, c]',
146146
'x, (y, z) = a, (b, c)',
147147
'(x, y), z = (a, b), c',
148-
'(x, y), z = [a, b], c',
148+
'(x, y), z = [a, b], c'
149149
];
150150

151151
for (let testCase of cases) {
@@ -223,7 +223,7 @@ describe('PythonAnalyzer', () => {
223223

224224
expect(queryWithSelectedToken(analyzer.guessReferencePath, 'y')).to.eql([
225225
'y.py',
226-
'y/__init__.py',
226+
'y/__init__.py'
227227
]);
228228
});
229229

@@ -278,7 +278,7 @@ describe('PythonAnalyzer', () => {
278278

279279
expect(queryWithSelectedToken(analyzer.guessReferencePath, 'a')).to.eql([
280280
'a.py',
281-
'a/__init__.py',
281+
'a/__init__.py'
282282
]);
283283

284284
expect(

0 commit comments

Comments
 (0)