mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
6d101435d401d612c3a797fe88258b7c59fe7f49
Babel doesn't attach Comment nodes to anything, so they dangle off of the Program node while only specifying a range. This meant that previously we first had to traverse all of the Program's comments to find an eslint suppression of the rules of React, then during traversal of the individual functions, we would check if there were any *global* eslint suppressions, then bailout all components. This PR updates our logic to determine if individual functions are affected by an eslint suppression range: - If an eslint suppression range falls within its body; or - If an eslint suppression wraps the function
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%