0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-22 05:12:55 -05:00
Commit graph

11 commits

Author SHA1 Message Date
Bartek Iwańczuk
a95ea7e142
lint 2024-11-14 16:39:39 +01:00
Bartek Iwańczuk
2a2da281df
wire up diagnostic 2024-11-14 14:41:00 +01:00
Bartek Iwańczuk
4d5f9028fd
add lint result 2024-11-14 12:56:45 +01:00
Bartek Iwańczuk
66a152a0ac
rework 2024-11-07 00:38:04 +01:00
Bartek Iwańczuk
9520620289
wip 2024-11-06 18:13:56 +01:00
Bartek Iwańczuk
207ec468c1
wip 2024-11-05 14:05:18 +01:00
Bartek Iwańczuk
643cae5a39
do fewer allocations 2024-11-05 02:52:33 +01:00
Bartek Iwańczuk
fbc9a65125
fix(lint): skip linting minified files 2024-10-30 00:56:58 +01:00
Leo Kettmeir
a1d0a427e8
feat: default to TS for file extension and support ext flag in more scenarios (#25472)
Closes #11220
Currently does lint, fmt, and repl
2024-09-18 21:15:13 +02:00
Nathan Whitaker
5ec3c5c3a4
feat(lint): Add lint for usage of node globals (with autofix) (#25048)
From upgrading `deno_lint`.

Previously if you had a node project that used a bunch of node globals
(`process.env`, etc), you would have to fix the errors by hand. This PR
includes a new lint that detects usages of node globals (`process`,
`setImmediate`, `Buffer`, etc.) and provides an autofix to import the
correct value. For instance:

```ts
// main.ts
const _foo = process.env.FOO;
```

`deno lint` gives you

```ts
error[no-node-globals]: NodeJS globals are not available in Deno
 --> /home/foo.ts:1:14
  |
1 | const _foo = process.env.FOO;
  |              ^^^^^^^
  = hint: Add `import process from "node:process";`

  docs: https://lint.deno.land/rules/no-node-globals


Found 1 problem (1 fixable via --fix)
Checked 1 file
```
And `deno lint --fix` adds the import for you:

```ts
// main.ts
import process from "node:process";
const _foo = process.env.FOO;
```
2024-08-15 20:43:04 +00:00
David Sherret
763f05e74d
fix(unstable): move sloppy-import warnings to lint rule (#24710)
Adds a new `no-sloppy-imports` lint rule and cleans up the lint code.

Closes #22844
Closes https://github.com/denoland/deno_lint/issues/1293
2024-07-25 09:07:59 -04:00