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

triple-slash-reference gives false positives for d.ts files #461

Closed
bartlomieju opened this issue Oct 28, 2020 · 2 comments · Fixed by #483
Closed

triple-slash-reference gives false positives for d.ts files #461

bartlomieju opened this issue Oct 28, 2020 · 2 comments · Fixed by #483
Labels
bug Something isn't working

Comments

@bartlomieju
Copy link
Member

// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, no-var */

/// <reference no-default-lib="true" />
/// <reference lib="esnext" />

...
error[triple-slash-reference]: `triple slash reference` is not allowed
 --> /Users/biwanczuk/dev/deno/op_crates/fetch/lib.deno_fetch.d.ts:7:1
  |
7 | /// <reference lib="esnext" />
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |

We must ensure that declaration files are properly linted. Ref #305

@bartlomieju bartlomieju added the bug Something isn't working label Oct 28, 2020
@bartlomieju
Copy link
Member Author

I'm a bit puzzled at this rule now... @kitsonk does it even make sense in context of Deno to prohibit tripe slash references?

@kitsonk
Copy link
Contributor

kitsonk commented Oct 29, 2020

There are a lot of cases where they shouldn't be used but several cases where they should be used. A linter isn't going to be able to tell that. Best to be left to the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants