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

dep!(dev): bump eslint w/ corrections #1182

Merged
merged 3 commits into from Nov 10, 2021
Merged

Conversation

erisu
Copy link
Member

@erisu erisu commented Nov 6, 2021

Motivation and Context

Update Eslint Config with Fixes

Description

  • @cordova/eslint-config@^4.0.0
  • applied auto corrections
  • applied manual corrections
    • prefer-regex-literals

Testing

  • npm t

Checklist

  • I've run the tests to see all new and existing tests pass

@codecov-commenter
Copy link

codecov-commenter commented Nov 6, 2021

Codecov Report

Merging #1182 (1528ae2) into master (ea9751b) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1182   +/-   ##
=======================================
  Coverage   75.03%   75.03%           
=======================================
  Files          13       13           
  Lines        1650     1650           
=======================================
  Hits         1238     1238           
  Misses        412      412           
Impacted Files Coverage Δ
bin/templates/scripts/cordova/lib/Podfile.js 73.20% <100.00%> (ø)
...emplates/scripts/cordova/lib/listEmulatorImages.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea9751b...1528ae2. Read the comment docs.

.eslintrc.yml Outdated
@@ -24,3 +24,5 @@ overrides:

- files: [cordova-js-src/**/*.js]
extends: '@cordova/eslint-config/browser'
rules:
no-var: 0
Copy link
Member Author

Choose a reason for hiding this comment

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

This rule should be applied directly to @cordova/eslint-config/browser but in the mean time applied here. Will hope to reoslve this in a later patch release of @cordova/eslint-config.

Copy link
Contributor

@raphinesse raphinesse left a comment

Choose a reason for hiding this comment

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

I did some commit squashing and added a TODO about the rule exception. Good to merge from my side.

Copy link
Contributor

@raphinesse raphinesse left a comment

Choose a reason for hiding this comment

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

Sorry, I messed up the lockfile :(
I'll fix that!

Copy link
Contributor

@raphinesse raphinesse left a comment

Choose a reason for hiding this comment

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

OK, all good now

@raphinesse
Copy link
Contributor

I just remembered that we only enforce ES5 for browser code that lives in cordova-js. We could actually migrate the cordova-js-src that lives in this repo to ES6 (or beyond) if we can guarantee that it is supported by the iOS WebView versions we support. Is that the case?

So I think we should not disable the no-var rule in @cordova/eslint-config, since a platform should be able to decide whether it needs to support ES5-only environments or not.

Nevertheless this PR is still good to go for me (maybe remove my TODO if you agree with the above).

@erisu erisu merged commit 91d869a into apache:master Nov 10, 2021
@erisu erisu deleted the dep/bump-eslint branch November 10, 2021 08:29
@erisu erisu added this to the 7.0.0 milestone Nov 16, 2021
gazben pushed a commit to apicore-engineering/cordova-ios that referenced this pull request Aug 26, 2022
* dep!(dev): @cordova/eslint-config@^4.0.0
* style(lint): apply auto corrections
* style(lint): apply manual corrections prefer-regex-literals
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

3 participants