Last 12 weeks · 25 commits
2 of 6 standards met
Per denoland/deno#33268, the rule fires on ambient blocks that are module augmentations and tells users to add to suppress it. TypeScript rejects / inside an augmentation (TS2669 "Exports and export assignments are not permitted in module augmentations"), so the suggested fix does not compile — the rule effectively makes those blocks unlintable without an ignore pragma. This skips a module declaration when it is an augmentation: is unconditionally a global-scope augmentation, so it is always skipped. is an augmentation only when the surrounding file is itself a module (has a top-level /); those are skipped too. In a plain ambient script, is a real ambient module declaration where members are implicitly exported and is valid, so the rule still fires there. Repro (before this PR) Tests Valid: blocks, and a augmentation in a module file (top-level ). Invalid: in a script file still fires, since there it is an ambient module declaration rather than an augmentation. Closes denoland/deno#33268
This also introduces a second variant of the diagnostic specifically for things referred to from doc comments, but from nowhere else, which makes the logic a bit more complex, but IMO is worth it, as TypeScript won't suggest changing imports to imports if it doesn't detect any use for a symbol. Admittedly this doesn't really belong in , but it just felt unfortunate to now accept to have non- imports for things only used in doc comments. Still, I'd be fine removing this from this PR. Fixes #1472, #1449, https://github.com/denoland/deno/issues/27583. I also tried to keep the code fairly similar to what was already there without introducing new allocations. For instance, instead of using in I could have made the a or , but this felt unnecessarily different.
The example was a standalone binary used to exercise as a crate and to run the benchmarks. It is no longer needed, so this removes it along with everything that depended on it: The binary and its entry in . All (, , , , , , , plus the already unused /) — they were only used by — and the dependency, which was likewise only used by . The directory, whose benchmark shelled out to the binary, including the git submodule and the now-empty , and the CI benchmark step. The CI pre-release/release steps that zipped and published binaries as GitHub release artifacts (and the permission / checkout that were only there for those). The invocations in and . The example section in the README. , and all pass after the removal.
Repository: denoland/deno_lint. Description: Blazing fast linter for JavaScript and TypeScript written in Rust Stars: 1584, Forks: 189. Primary language: Rust. Languages: Rust (99%), TypeScript (1%). License: MIT. Homepage: https://lint.deno.land/ Topics: deno, javascript, linters, typescript. Latest release: 0.84.1 (3mo ago). Open PRs: 45, open issues: 122. Last activity: 1mo ago. Community health: 50%. Top contributors: bartlomieju, magurotuna, dsherret, denobot, DzmitryRamaniuk, marvinhagemeister, disizali, lucacasonato, petamoriken, cknight and others.