eslint-plugin-promise icon indicating copy to clipboard operation
eslint-plugin-promise copied to clipboard

feat: Resolve `getAncestors` and `getScope` calls in eslint v9

Open scagood opened this issue 1 year ago • 2 comments

What is the purpose of this pull request? This is phase 1 of getting eslint v9 working.

The features this implements are:

  1. Use the sourceCode form of getAncestors
  2. Use the sourceCode form of getScope
  3. Allow for the RuleTester class to be usable in both eslint v7, v8 and v9.

As you may be able to tell, I copied a few files over from eslint-plugin-n (Specifically from https://github.com/eslint-community/eslint-plugin-n/pull/161) (@aladdin-add Thank you for the prior art 🙏)


This is one part of #449.

scagood avatar May 05 '24 23:05 scagood

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (bbcfcbf) to head (1147fe2). Report is 6 commits behind head on main.

:exclamation: Current head 1147fe2 differs from pull request most recent head 9a9eec3

Please upload reports for the commit 9a9eec3 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #466   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        24    -1     
  Lines          649       656    +7     
  Branches       250       250           
=========================================
+ Hits           649       656    +7     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 05 '24 23:05 codecov[bot]

ESLint v9 is not actually fixed in this PR :eyes:

I want to do this lovely little deprecation in a different PR.

(node:1888) DeprecationWarning: "no-multiple-resolved" rule uses CodePath#currentSegments and will stop working in ESLint v9. Please read the documentation for how to update your code: https://eslint.org/docs/latest/extend/code-path-analysis#usage-examples

scagood avatar May 16 '24 12:05 scagood