Skip to content

Conversation

@fcollonval
Copy link
Member

Fixes #90

@blink1073
Copy link
Contributor

Looks good, but the linter isn't happy

@fcollonval
Copy link
Member Author

I removed the linter check on the settings case as it will be hard to have a template that is compatible with all cases but don't raise errors.

@fcollonval
Copy link
Member Author

:'( I'm unable to reproduce the error locally...

activate: (app: JupyterFrontEnd{% if cookiecutter.has_settings.lower().startswith('y') %}, settingRegistry: ISettingRegistry | null{% endif %}) => {
console.log('JupyterLab extension {{ cookiecutter.labextension_name }} is activated!');{% if cookiecutter.has_settings.lower().startswith('y') %}

if(settingRegistry){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this was one of the lint issues:

Suggested change
if(settingRegistry){
if (settingRegistry) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jtpio. Indeed that was part of the error (I correct it). But the linter is also complaining on the activate signature. If the setting registry is present, the two arguments needs to be put in separated lines. But with no settings, app argument is required to be inline. It seems unnecessary to add complexity to the template so that both cases pass the lint test.

@fcollonval fcollonval force-pushed the fcollonval/issue90 branch from 39d9e88 to 73f3373 Compare June 4, 2021 15:58
@fcollonval
Copy link
Member Author

@jtpio @blink1073 I rebased this PR. Tests are green. Could you have a second look please?

Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you!

@blink1073 blink1073 merged commit 9cd6d48 into jupyterlab:3.0 Jun 4, 2021
ohrely added a commit to ohrely/extension-examples that referenced this pull request Jun 8, 2021
fcollonval added a commit to jupyterlab/extension-examples that referenced this pull request Jun 12, 2021
* 'extension' to 'plugin' in README

Match template changes from jupyterlab/extension-cookiecutter-ts#156

* Update src file

* Fix new id

Co-authored-by: Frédéric Collonval <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add template for settings files

3 participants