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

Fixing ESlint issues and returning some missing rules #7751

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

jackyalbo
Copy link
Contributor

Explain the changes

  1. When we moved to a newer version of eslint, we moved to one that deprecated the rules for semicolons and spaces
    https://eslint.org/docs/latest/rules/
  2. We need to move eventually to the replacement of these rules and to start using the stylistic plugin:
    https://eslint.style/

Issues: Fixed #xxx / Gap #xxx

Testing Instructions:

  • Doc added/updated
  • Tests added

Signed-off-by: jackyalbo <jacky.albo@gmail.com>
.eslintrc.js Show resolved Hide resolved
@shirady
Copy link
Contributor

shirady commented Jan 23, 2024

@jackyalbo, more cases I found (during the last week with examples in case it helps):

  • key-spacing
    noobaa-core/src/test/unit_tests/test_bucketspace_fs.js
    158:20 error Extra space after key '_id' key-spacing
  • no-extra-semi
    noobaa-core/src/util/mongo_utils.js
    172:2 error Unnecessary semicolon no-extra-semi
  • space-infix-ops
    noobaa-core/src/util/native_fs_utils.js
    461:65 error Operator '=' must be spaced space-infix-ops
  • eol-last Newline required at end of file but not found eol-last
  • comma-spacing

What about inserting the deprecated ones (one-by-one) -
and in case our code would not have many errors add the rule (probably we had the rule in the past).

@jackyalbo
Copy link
Contributor Author

@jackyalbo, more cases I found (during the last week with examples in case it helps):

  • key-spacing
    noobaa-core/src/test/unit_tests/test_bucketspace_fs.js
    158:20 error Extra space after key '_id' key-spacing
  • no-extra-semi
    noobaa-core/src/util/mongo_utils.js
    172:2 error Unnecessary semicolon no-extra-semi
  • space-infix-ops
    noobaa-core/src/util/native_fs_utils.js
    461:65 error Operator '=' must be spaced space-infix-ops
  • eol-last Newline required at end of file but not found eol-last
  • comma-spacing

What about inserting the deprecated ones (one-by-one) - and in case our code would not have many errors add the rule (probably we had the rule in the past).

I will merge this one. @shirady please follow my example and create another PR handling the rest of the missing errors. Thanks.

@jackyalbo jackyalbo merged commit 6afbd87 into noobaa:master Jan 23, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants