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

Fix/ADF-1166/ESlint errors in core source code #156

Merged
merged 1 commit into from
Oct 26, 2022

Conversation

jsconan
Copy link
Contributor

@jsconan jsconan commented Oct 17, 2022

Related to: https://oat-sa.atlassian.net/browse/ADF-1166

Summary

Fix the ESLint error in the source code for tao-core.

Note: as the changes are pretty heavy, I split them all into several pull requests.

Details

This pull request only targets the core/* part of the library.
The full picture can be seen from the main branch which contains all the fixes: https://github.com/oat-sa/tao-core-sdk-fe.git#fix/ADF-1166/eslint-errors

What has been made:

  • fix errors that can be automated using eslint --fix, then adjust the changes in case by case (mostly string literals)
  • fix the wrong annotations (missing/wrong return or param definition)
  • fix the more complex cases with some refactoring (rest operator instead of .apply())
  • replace var by const or let (but not in all places, only in the touched files when it was not adding too much noise)
  • apply object shorthand instead of duplicated function names
  • apply arrow functions here and there when it helped, but not systematically to reduce the noise

How to test

  • checkout and install the source code npm i
  • run the linter: npm run lint:src, errors and warnings coming from the core folder should have gone.
  • run the unit tests: npm run test core
  • install with other repositories, using the following scheme: "@oat-sa/tao-core-sdk": "https://github.com/oat-sa/tao-core-sdk-fe.git#fix/ADF-1166/eslint-errors",, then checking the unit tests and playing with TAO

@github-actions
Copy link

Version

Target Version 1.20.2
Last version 1.20.1

There are 0 BREAKING CHANGE, 0 feature, 0 fix

@github-actions
Copy link

Coverage Report

Totals Coverage
Statements: 90.37% ( 2637 / 2918 )
Methods: 93.62% ( 646 / 690 )

Copy link
Contributor

@shaveko shaveko left a comment

Choose a reason for hiding this comment

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

Looks good, there is eslint report in moduleLoader, but I've found it is addressed in other PR

@jsconan jsconan merged commit 9cefedd into develop Oct 26, 2022
@jsconan jsconan deleted the fix/ADF-1166/eslint-errors-core-src branch October 26, 2022 06:50
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.

None yet

2 participants