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

72 commits

Author SHA1 Message Date
Marvin Hagemeister
adc25f85a1 feat: support excluding rules from lint plugins 2025-01-03 11:03:28 +01:00
Bartek Iwańczuk
554bce98b5
Merge branch 'main' into lint_plugins 2025-01-02 10:35:12 +01:00
Kenta Moriuchi
8fb073d7b4
chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
David Sherret
ac7b33a340
chore: cargo fmt - turn on group_imports=StdExternalCrate (#26646) 2024-12-31 12:13:39 -05:00
David Sherret
4638caa740
refactor: do not use deno_fs::FileSystem everywhere (#27508)
This changes the cli to mostly use `std::fs` via `sys_traits` instead of
the implemention of `deno_fs::FileSystem`.
2024-12-31 11:29:07 -05:00
David Sherret
c391ad315e
refactor: use sys_traits (#27480) 2024-12-30 12:38:20 -05:00
Bartek Iwańczuk
05a89f5ffb
add PluginLogger, finally works in the LSP 2024-12-25 15:18:50 +01:00
Bartek Iwańczuk
f55dd0d0bb
wire up in the lsp 2024-12-24 16:22:09 +01:00
Bartek Iwańczuk
f6efc9f357
plugins are run inside CliLinter now 2024-12-24 10:52:36 +01:00
Bartek Iwańczuk
e6d0a6fde1
abstract away running plugins 2024-12-24 10:43:10 +01:00
Bartek Iwańczuk
0e8457d7c3
simplify plugin loading 2024-12-24 10:27:30 +01:00
Bartek Iwańczuk
71c82e47ef
run jsr plugins 2024-12-22 22:06:31 +01:00
Bartek Iwańczuk
3bea4cfa18
load plugins relative to the config file 2024-12-22 21:46:49 +01:00
Bartek Iwańczuk
a446c89620
remove --plugins flag support for now 2024-12-22 21:35:29 +01:00
Bartek Iwańczuk
8479e9541d
update a todo 2024-12-22 21:04:55 +01:00
Bartek Iwańczuk
d3e41a770a
Merge branch 'main' into lint_plugins 2024-12-21 02:28:39 +01:00
Marvin Hagemeister
26425a137b
feat(unstable): add JS linting plugin infrastructure (#27416)
This PR extracts the core part of
https://github.com/denoland/deno/pull/27203 to make it easier to review
and land in parts.

It contains:
-  The JS plugin code the deserializes and walks the buffer
- The Rust portion to serialize SWC to the buffer format (a bunch of
nodes are still todos, but imo these can land anytime later)
- Basic lint plugin types, without the AST node types to make this PR
easier to review
- Added more code comments to explain the format etc.


More fixes and changes will be done in follow-up PRs.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-12-21 00:58:03 +01:00
Bartek Iwańczuk
53a680bded
Merge branch 'main' into lint_plugins 2024-12-18 05:35:56 +01:00
Bartek Iwańczuk
f9add94e17
refactor(lint): renames and code flattening (#27386)
Working on loading plugin configuration for
https://github.com/denoland/deno/pull/27203
I encountered a lot of complexity, so did some drive-by cleanups to make
it easier to grok the code and have fewer duplicate names.
2024-12-17 01:35:26 +00:00
Marvin Hagemeister
f167277561 remove dead code 2024-12-15 22:57:55 +01:00
Marvin Hagemeister
3f9ee0d6df feat(lint): support visitor selector syntax 2024-12-15 22:56:50 +01:00
Marvin Hagemeister
ea11f95029 make js plugins independent of ast strucure 2024-12-15 19:18:30 +01:00
Marvin Hagemeister
c83f722039 Refactor binary ast 2024-12-12 22:16:49 +01:00
Marvin Hagemeister
dda408b019 fix: clippy 2024-12-12 10:53:12 +01:00
Bartek Iwańczuk
dd42a64c43
refactor(lint): manage schema files for linter in Deno repo (#27324)
This commit provides schema files for lint rules and lint tags
in this repo instead of pulling them from `deno_lint` repository.

A unit test was added to ensure all available rules are listed
in the schema file. A unit test for tags can be done once 
https://github.com/denoland/deno/pull/27162 lands.
2024-12-11 02:06:04 +01:00
Marvin Hagemeister
c734214c41 WIP 2024-12-06 21:31:28 +01:00
Marvin Hagemeister
a14820586f fix: only invoke lint plugin runner when there are plugins 2024-12-04 12:08:19 +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
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
5a6c12861f
add basic traversal 2024-12-03 02:51:29 +01:00
Bartek Iwańczuk
f9291e419f
basic range 2024-12-02 18:29:30 +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
79b5c3e625
basic plugin loading 2024-12-01 03:21:16 +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
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
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