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(analyzer): noRedeclare breaks *.d.ts files #228

Merged
merged 1 commit into from
Sep 11, 2023
Merged

Conversation

denbezrukov
Copy link
Contributor

Summary

Fix #137

Test Plan

cargo test -p rome_js_analyze

@denbezrukov denbezrukov temporarily deployed to Website deployment September 10, 2023 18:18 — with GitHub Actions Inactive
@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Sep 10, 2023
@denbezrukov denbezrukov temporarily deployed to Website deployment September 10, 2023 18:26 — with GitHub Actions Inactive
@github-actions github-actions bot added A-Website Area: website A-Changelog Area: changelog labels Sep 10, 2023
CHANGELOG.md Outdated Show resolved Hide resolved
@denbezrukov denbezrukov temporarily deployed to Website deployment September 10, 2023 18:35 — with GitHub Actions Inactive
@denbezrukov denbezrukov temporarily deployed to Website deployment September 10, 2023 18:57 — with GitHub Actions Inactive
@Conaclos Conaclos self-requested a review September 10, 2023 20:23
@denbezrukov denbezrukov temporarily deployed to Website deployment September 11, 2023 07:43 — with GitHub Actions Inactive
@denbezrukov denbezrukov temporarily deployed to Website deployment September 11, 2023 08:09 — with GitHub Actions Inactive
@github-actions github-actions bot added the A-Core Area: core label Sep 11, 2023
@github-actions
Copy link
Contributor

Parser conformance results on ubuntu-latest

js/262

Test result main count This PR count Difference
Total 48863 48863 0
Passed 47808 47808 0
Failed 1055 1055 0
Panics 0 0 0
Coverage 97.84% 97.84% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 40 40 0
Passed 37 37 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.50% 92.50% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 6212 6212 0
Passed 1764 1739 ❌ ⏬ -25
Failed 4448 4473 ❌ ⏫ +25
Panics 0 0 0
Coverage 28.40% 27.99% -0.40%
🔥 Regression (25):
ambientDeclarationsPatterns.symbols
ambientShorthand.symbols
commonSourceDirectory.symbols
importHelpersWithImportStarAs(esmoduleinterop=false,module=amd).symbols
importHelpersWithImportStarAs(esmoduleinterop=false,module=commonjs).symbols
importHelpersWithImportStarAs(esmoduleinterop=false,module=es2015).symbols
importHelpersWithImportStarAs(esmoduleinterop=false,module=es2020).symbols
importHelpersWithImportStarAs(esmoduleinterop=false,module=system).symbols
importHelpersWithImportStarAs(esmoduleinterop=true,module=amd).symbols
importHelpersWithImportStarAs(esmoduleinterop=true,module=commonjs).symbols
importHelpersWithImportStarAs(esmoduleinterop=true,module=es2015).symbols
importHelpersWithImportStarAs(esmoduleinterop=true,module=es2020).symbols
importHelpersWithImportStarAs(esmoduleinterop=true,module=system).symbols
moduleNodeImportRequireEmit(target=es2016).symbols
moduleNodeImportRequireEmit(target=es2020).symbols
moduleNodeImportRequireEmit(target=es5).symbols
moduleNodeImportRequireEmit(target=esnext).symbols
module_augmentUninstantiatedModule.symbols
nodeModulesImportAssignments(module=node16).symbols
nodeModulesImportAssignments(module=nodenext).symbols
typeRootsFromMultipleNodeModulesDirectories.symbols
typeRootsFromNodeModulesInParentDirectory.symbols
typesVersions.ambientModules.symbols
typesVersionsDeclarationEmit.ambient.symbols
untypedModuleImport_vsAmbient.symbols

ts/babel

Test result main count This PR count Difference
Total 639 639 0
Passed 573 573 0
Failed 66 66 0
Panics 0 0 0
Coverage 89.67% 89.67% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 17224 17224 0
Passed 13121 13121 0
Failed 4103 4103 0
Panics 0 0 0
Coverage 76.18% 76.18% 0.00%

@denbezrukov denbezrukov merged commit f468911 into main Sep 11, 2023
18 checks passed
@denbezrukov denbezrukov deleted the fix/noRedeclare branch September 11, 2023 09:02
@ematipico
Copy link
Member

@denbezrukov are you sure this is the best way to fix the issue? Should we change the rule instead?

Consider that we have access to the file source in the linter now, so we can check if a file is a d.ts file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Core Area: core A-Linter Area: linter A-Website Area: website L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 lint/suspicious/noRedeclare breaks *.d.ts files
3 participants