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

explicit-module-boundary-types with declared type and default value #1048

Closed
Conaclos opened this issue May 20, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@Conaclos
Copy link
Contributor

Conaclos commented May 20, 2022

Hi!

This could be related to #1018. However this is a bit different because the type annotation is present. deno-lint seems to ignore it.

Lint Name

explicit-module-boundary-types

Code Snippet

{
  "lint": {
    "files": {
      "include": ["src/"]
    },
    "rules": {
      "tags": ["recommended"],
      "include": ["explicit-module-boundary-types"]
    }
  }
}
export interface Conf {
    readonly value: number
}

export function init(conf: Partial<Conf> = {}): Conf {
    return { value: 1, ...conf }
}

Expected Result

Should pass the lint rule.

Actual Result

error[explicit-module-boundary-types]: All arguments should be typed
   |
 5 | export function init(conf: Partial<Conf> = {}): Conf {
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: Add types to all the function arguments

Additional Info

Version

deno 1.21.3 (release, x86_64-unknown-linux-gnu)
v8 10.0.139.17
typescript 4.6.2

I also tested with @node-rs/denolint 1.13.1 (release, x86_64-unknown-linux-gnu)
(The previous diagnostic comes from there)

@Conaclos Conaclos added the bug Something isn't working label May 20, 2022
Conaclos added a commit to bare-ts/bare that referenced this issue May 20, 2022
Note that we also lint tests-corpus to ensure that
bare-ts generates high-quality codes.

For now, we do not use the config file because
it does not take into account the field `files`.
I opened an issue for that:

  napi-rs/node-rs#635

I added a config files for deno lint command.
This allows to manually check extra rules:

  deno lint --config .deno.json

Note that some rules are violated.
I excluded scripts and tests-corpus to avoid excessive rule vilation.
These two problems come from bugs that are reported:

  denoland/deno_lint#1018
  denoland/deno_lint#1048
  denoland/deno_lint#1049
Conaclos added a commit to bare-ts/bare that referenced this issue May 24, 2022
Note that we also lint tests-corpus to ensure that
bare-ts generates high-quality codes.

For now, we do not use the config file because
it does not take into account the field `files`.
I opened an issue for that:

  napi-rs/node-rs#635

I added a config files for deno lint command.
This allows to manually check extra rules:

  deno lint --config .deno.json

Note that some rules are violated.
I excluded scripts and tests-corpus to avoid excessive rule vilation.
These two problems come from bugs that are reported:

  denoland/deno_lint#1018
  denoland/deno_lint#1048
  denoland/deno_lint#1049
Conaclos added a commit to bare-ts/bare that referenced this issue May 24, 2022
Note that we also lint tests-corpus to ensure that
bare-ts generates high-quality codes.

For now, we do not use the config file because
it does not take into account the field `files`.
I opened an issue for that:

  napi-rs/node-rs#635

I added a config files for deno lint command.
This allows to manually check extra rules:

  deno lint --config .deno.json

Note that some rules are violated.
I excluded scripts and tests-corpus to avoid excessive rule vilation.
These two problems come from bugs that are reported:

  denoland/deno_lint#1018
  denoland/deno_lint#1048
  denoland/deno_lint#1049
Conaclos added a commit to bare-ts/bare that referenced this issue May 24, 2022
Note that we also lint tests-corpus to ensure that
bare-ts generates high-quality codes.

For now, we do not use the config file because
it does not take into account the field `files`.
I opened an issue for that:

  napi-rs/node-rs#635

I added a config files for deno lint command.
This allows to manually check extra rules:

  deno lint --config .deno.json

Note that some rules are violated.
I excluded scripts and tests-corpus to avoid excessive rule vilation.
These two problems come from bugs that are reported:

  denoland/deno_lint#1018
  denoland/deno_lint#1048
  denoland/deno_lint#1049
@Conaclos Conaclos closed this as completed Jul 1, 2022
@Conaclos
Copy link
Contributor Author

Conaclos commented Jul 1, 2022

The issue was resolved in #1048

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

No branches or pull requests

1 participant