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

ui5 tooling v3 #205

Closed
wants to merge 2 commits into from
Closed

Conversation

mauriciolauffer
Copy link

@mauriciolauffer mauriciolauffer commented Jul 25, 2023

ui5 tooling v3 + better eslint rules.

I was going to remove almost everything from eslint, but I thought it'd be simpler to just make minor changes.

This'd be the proposed rules:

root: true
extends:
  - eslint:recommended
env:
  browser: true
  es6: true
  jquery: true
  qunit: true
globals:
  sap: true
  sinon: true
rules:
  no-var: error

@flovogt flovogt requested a review from a team August 1, 2023 14:32
Copy link
Contributor

@d3xter666 d3xter666 left a comment

Choose a reason for hiding this comment

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

Overall, I'd assume that those replacements of var should cover the scope of the whole application and also most if not all of them should be replaced by const instead of let.

For the eslint rules, I'd request collesgues to give their feedback

@@ -39,12 +39,12 @@ sap.ui.define([
* Removes all completed items from the todo list.
*/
clearCompleted: function() {
var oModel = this.getView().getModel();
var aTodos = oModel.getProperty("/todos").map(function (oTodo) { return Object.assign({}, oTodo); });
let oModel = this.getView().getModel();
Copy link
Contributor

Choose a reason for hiding this comment

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

All of those let declarations should be const instead

Copy link
Author

Choose a reason for hiding this comment

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

I've just applied eslint --fix, I haven't manually changed the declarations...

@@ -1,5 +1,5 @@
{
"_version": "1.12.0",
"_version": "1.56.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we looking for the latest schema version here?
Then it should be 1.57.0. Please, check the spec here: https://raw.githubusercontent.com/SAP/ui5-manifest/master/schema.json

@d3xter666 d3xter666 requested a review from a team August 2, 2023 06:04
@flovogt
Copy link
Member

flovogt commented Aug 2, 2023

@mauriciolauffer Thanks a lot for this PR. We're planning to transform this sample app to more modern ECMAScript syntax and will consider this PR also when doing the transformation.

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.

3 participants