D
Deno

help

Linter does not warn about lack of constructor arguments.

Hherenickname12/7/2023
The vscode shows that there are no arguments, but linter does not show it as an error:
root@instance-1:~/main# deno lint src/test.ts
Checked 1 file
root@instance-1:~/main# deno lint src/test.ts
Checked 1 file
and nothing else... deno.jsonc:
{
"imports": {
"@core/": "../core/src/",
"std/": "https://deno.land/std@0.205.0/"
},

"lint": {
"include": ["src/"],
"exclude": ["src/testdata/", "data/fixtures/**/*.ts"],
"rules": {
"tags": ["recommended"],
"include": ["ban-untagged-todo", "no-console"],
"exclude": ["no-unused-vars"]
}
}
}
{
"imports": {
"@core/": "../core/src/",
"std/": "https://deno.land/std@0.205.0/"
},

"lint": {
"include": ["src/"],
"exclude": ["src/testdata/", "data/fixtures/**/*.ts"],
"rules": {
"tags": ["recommended"],
"include": ["ban-untagged-todo", "no-console"],
"exclude": ["no-unused-vars"]
}
}
}
Help me to make a correct deno.jsonc config. Thanks!
No description
Mmarvinh.12/7/2023
That's because this is a type error not a linting error. To know how many arguments a function or a class constructor receives you need to know about its type. Knowing the type requires far more knowledge than what a linter has access to. Type checks are typically done via deno check
Hherenickname12/7/2023
I see that deno check can only process a specific file. How to check the whole folder? Is it possible to combine lint & check output? Is there an abstraction in deno for this?
Mmarvinh.12/7/2023
iirc you can pass a glob like deno check **/*.ts
Hherenickname12/7/2023
after that I found my code full of undefined errors, but runtime (deno run -A src/main.ts) does not show anything about this. How to preserve runtime to strict check code before run?
Mmarvinh.12/7/2023
you can pass --check to deno run
Hherenickname12/7/2023
thank you so much!
Ssergees12/8/2023
It looks like deno check **/*.ts doesn’t respect the "exclude" from deno config file (unlike lint and fmt). Is it something expected? In my situation I have 10 sub-folders with deno/TS code and more 5 folders. I’m wondering what’s a good way to type-check those 10 folders.

Looking for more? Join the community!

Recommended Posts
Can you make a fresh route detect, if it is being requested by `deno run`Can you make a fresh route detect, if it is being requested by `deno run` like `deno run https://locDeno dependency top level await work aroundI have the following error while building with dnt ``` [dnt] Top level await cannot be used when disBundling a CLI written in JS with DenoHi team, Thanks for writing this [excellent blog-post (and video)](https://deno.com/blog/roll-your-Leaking operation op_http_close in testsI tried to update my repositories from Deno 1.38.1 to 1.38.4. After the update my test keeps failingDoes BroadcastChannel preserve the message order if the receiver is in a different geo-location?Does BroadcastChannel preserve the message order if the receiver is in a different geo-location?NPM CCXT Not WorkingI'm trying to run the NPM Package CCXT and I'm getting an `"ERR_MODULE_NOT_FOUND"` error any help How do you use a private docker hub image on AWS Lightsail?I'm following the guide here https://docs.deno.com/runtime/manual/advanced/deploying_deno/aws_lightsIs there a way to reset/flush my deno vk queues on deploy?Nothing seems to be queuing. I would like to reset it if possible?Return lazy struct fields from OpMy goal is to build a plugin system which allows invoking user defined code. One of the features I aRelative path in WebSocketWhy does relative path in `WebSocket` not work?Relative path in `npm:` specifierI have this in my import map: ``` "@heroicons/react/": "npm:@heroicons/react@2.0.18/" ``` And I try Transitive dependencies with node_modulesHi all, today I stumbled upon this not-sure-if-a-bug: ```ts import { LRParser } from "npm:@lezer/lrUpgraded to Fresh 1.60 but TailwindCSS not renderingI updated my codebase to Fresh 1.60 using TailwindCSS instead of twind. When I pushed the code to DeOptimize for Prod simple static vanilla JS script - WebServer App with Oak + DEJSUsing DEJS to render views. Those views are served by Oak, according to the defined routes. What is ReadableStream passed to an island component argument becomes an empty objectI am passing `ReadableStream` to an island component argument becomes an empty objectdeno.jsonc "unstable" format?I added this entry to my `deno.jsonc`: ```json "unstable": [ "broadcast-channel", "ffi", "fs"Signal value not updating from inside of `for await of` loop inside of an IIFE```ts // routes/connect.tsx import type { FunctionComponent } from 'preact' import type { PageProps Pricing Question - Is my pro account applied to my Orgs?Just recently purchased a pro account cause I thought a project would benefit from the extra firepow