Marvin Hagemeister
a14820586f
fix: only invoke lint plugin runner when there are plugins
2024-12-04 12:08:19 +01:00
Bartek Iwańczuk
78dc5b8fe9
remove dead code
2024-12-04 04:33:13 +01:00
Bartek Iwańczuk
026a5d952a
optimize callign to js
2024-12-04 04:30:32 +01:00
Bartek Iwańczuk
3588e75c6c
comment out type decls, capture more fns
2024-12-04 03:29:05 +01:00
Bartek Iwańczuk
052a035c23
plugins can be authored in TS
2024-12-04 02:59:39 +01:00
Bartek Iwańczuk
3e1e46d4b1
almost working with regular cli worker
2024-12-04 02:37:04 +01:00
Bartek Iwańczuk
106b1f135c
load plugins from a config file
2024-12-04 01:43:19 +01:00
Bartek Iwańczuk
42d9936ef8
wip
2024-12-04 00:31:58 +01:00
Marvin Hagemeister
5a950e5cf0
drop!: temporary disable lint cache
2024-12-03 15:34:39 +01:00
Marvin Hagemeister
77526ca036
fix: show correct specifier in error output
2024-12-03 15:34:27 +01:00
Bartek Iwańczuk
37bafdc66a
remove debug log, lint
2024-12-03 13:56:47 +01:00
Bartek Iwańczuk
1217314cc7
build on stable rust
2024-12-03 13:56:30 +01:00
Marvin Hagemeister
f3745f95f4
feat: add source() method
2024-12-03 13:45:31 +01:00
Bartek Iwańczuk
a15c1165d6
remove some prints
2024-12-03 03:38:43 +01:00
Bartek Iwańczuk
fb47288f90
correctly report
2024-12-03 03:11:26 +01:00
Bartek Iwańczuk
5a6c12861f
add basic traversal
2024-12-03 02:51:29 +01:00
Bartek Iwańczuk
439d43e5fb
don't dump ast
2024-12-02 22:04:45 +01:00
Bartek Iwańczuk
dea3219dbe
measure how long i takes to run
2024-12-02 19:20:12 +01:00
Bartek Iwańczuk
f9291e419f
basic range
2024-12-02 18:29:30 +01:00
Bartek Iwańczuk
0b3697148b
cleanup
2024-12-02 18:16:58 +01:00
Bartek Iwańczuk
5639379e45
declarative
2024-12-02 17:00:49 +01:00
Bartek Iwańczuk
c9fa293b9d
load plugins from a flag
2024-12-02 15:34:53 +01:00
Bartek Iwańczuk
7f45875211
first diagnostic from a plugin!
2024-12-02 02:27:30 +01:00
Bartek Iwańczuk
bc00517f9e
req -> resp
2024-12-02 01:57:49 +01:00
Bartek Iwańczuk
1fdcbd926a
PluginRunner and PluginRunnerProxy
2024-12-02 01:38:54 +01:00
Bartek Iwańczuk
99d70c9529
actually pass AST to plugin
2024-12-01 14:26:15 +01:00
Bartek Iwańczuk
49c2d9e2bb
add visitor
2024-12-01 05:14:46 +01:00
Bartek Iwańczuk
1eb4862a36
some basic structure
2024-12-01 04:53:47 +01:00
Bartek Iwańczuk
7e8e4ae99b
basic execution
2024-12-01 03:40:59 +01:00
Bartek Iwańczuk
79b5c3e625
basic plugin loading
2024-12-01 03:21:16 +01:00
David Sherret
115a306656
fix(node): correct resolution of dynamic import of esm from cjs ( #27071 )
...
Ensures a dynamic import in a CJS file will consider the referrer as an import for node resolution.
Also adds fixes (adds) support for `"resolution-mode"` in TypeScript.
2024-11-26 14:38:24 -05:00
Keith Tan
8f72798622
feat(lint): Add checked files list to the JSON output( #26936 )
...
Fixes #26930
2024-11-20 20:59:43 +01:00
Bartek Iwańczuk
106d47a013
feat: fmt and lint respect .gitignore file ( #26897 )
...
Closes https://github.com/denoland/deno/issues/26573
2024-11-18 23:54:28 +01:00
HasanAlrimawi
abf06eb87f
feat(watch): log which file changed on HMR or watch change ( #25801 )
...
Closes #25504
2024-11-16 15:59:31 +01:00
snek
4e899d48cf
fix: otel resiliency ( #26857 )
...
Improving the breadth of collected data, and ensuring that the collected
data is more likely to be successfully reported.
- Use `log` crate in more places
- Hook up `log` crate to otel
- Switch to process-wide otel processors
- Handle places that use `process::exit`
Also adds a more robust testing framework, with a deterministic tracing
setting.
Refs: https://github.com/denoland/deno/issues/26852
2024-11-14 12:16:28 +00:00
David Sherret
f091d1ad69
feat(node): stabilize detecting if CJS via "type": "commonjs"
in a package.json ( #26439 )
...
This will respect `"type": "commonjs"` in a package.json to determine if
`.js`/`.jsx`/`.ts`/.tsx` files are CJS or ESM. If the file is found to
be ESM it will be loaded as ESM though.
2024-11-13 15:10:09 +00:00
David Sherret
5faf769ac6
refactor: extract out sloppy imports resolution from CLI crate ( #25920 )
...
This is slow progress towards creating a `deno_resolver` crate.
Waiting on:
* https://github.com/denoland/deno/pull/25918
* https://github.com/denoland/deno/pull/25916
2024-09-28 19:17:48 -04:00
Leo Kettmeir
bb45446fa7
fix: don't include extensionless files in file collection for lint & fmt by default ( #25721 )
...
When using the `ext` flag, it will still attempt formatting them with
the provided extension
2024-09-19 11:25:48 +02: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
Kamil Ogórek
2c4d99a458
feat: include version number in all --json based outputs ( #25335 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-09-05 08:51:40 +00:00
David Sherret
f1c58ec041
feat(unstable): ability to use a local copy of jsr packages ( #25068 )
2024-08-20 14:11:43 +00:00
Yazan AbdAl-Rahman
4285cb339d
fix(lint): support linting tsx/jsx from stdin ( #24955 )
...
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-08-19 20:42:13 +00: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
04473c04ed
fix(compile): support workspace members importing other members ( #24909 )
2024-08-07 07:43:05 +00:00
David Sherret
9956737941
refactor(lint): move reporters to separate module ( #24757 )
2024-07-27 09:01:42 -04: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
David Sherret
9114a2df69
fix(upgrade): do not error if config in cwd invalid ( #24689 )
...
```
> deno upgrade
error: Unsupported lockfile version 'invalid'. Try upgrading Deno or recreating the lockfile.
V:\scratch
> V:\deno\target\debug\deno upgrade
Looking up latest version
Local deno version 1.45.3 is the most recent release
```
Closes #24517
Closes #20729
2024-07-23 19:00:48 -04:00
HasanAlrimawi
f0df54fc70
fix: enable the reporting of parsing related problems when running deno lint ( #24332 )
2024-07-23 21:17:17 +00:00
David Sherret
afcae364be
refactor: update to deno_config 0.25 ( #24645 )
...
- Gets rid of WorkspaceMemberContext. It's now `Workspace` and
`WorkspaceDirectory`
- Uses the workspace cache in the lsp
* https://github.com/denoland/deno_config/pull/95
* https://github.com/denoland/deno_config/pull/96
2024-07-19 15:56:07 -04:00
David Sherret
86010bec09
fix(workspace): better cli file argument handling ( #24447 )
...
Closes https://github.com/denoland/deno/issues/24422
2024-07-08 14:12:10 +00:00