Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'migrate' command adds duplicate parameters to sap.ui.define call #31

Open
codeworrior opened this issue Jul 15, 2019 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@codeworrior
Copy link
Member

While working on SAP/openui5@c782ce9 , I encountered the following issue with the ui5-migration tooling:

In sap.m.Page, the tooling added a dependency to jQuery and to a jQuery UI plugin and gave both a local parameter name of jQuery. This resulted in an eslint error

Strict mode function may not have duplicate parameter names

Resulting code after migration

sap.ui.define([
    ...
    "./PageRenderer",
    "sap/ui/thirdparty/jquery",
    "sap/ui/thirdparty/jqueryui/jquery-ui-position"
],
function(
	...
	PageRenderer,
	jQuery,
	jQuery
) {
		"use strict";

To reproduce, you can execute the following commands

cd openui5
git checkout 6555a38
ui5-migration migrate src/sap.m/src/sap/m/Page.js
eslint -q src/sap.m/src/sap/m/Page.js
@ecker ecker added the bug Something isn't working label Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants