summaryrefslogtreecommitdiff
path: root/tools/lint.js
AgeCommit message (Collapse)Author
2024-04-23fix(workspace): provide workspace members as 'imports' in import map (#23492)Bartek Iwańczuk
This commit changes the workspace support to provide all workspace members to be available as imports based on their names and versions. Closes https://github.com/denoland/deno/issues/23343
2024-04-22feat: add jsx precompile skip element option (#23457)Marvin Hagemeister
<!-- Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> This PR wires up a new `jsxPrecompileSkipElements` option in `compilerOptions` that can be used to exempt a list of elements from being precompiled with the `precompile` JSX transform.
2024-04-20chore: add lint script to ensure no new `itest!` tests (#23475)David Sherret
2024-03-13fix(node): resolve types via package.json for directory import (#22878)David Sherret
Does a package resolve when resolving types for a directory (copying the behaviour that typescript does).
2024-03-11chore: enable clippy unused_async rule (#22834)David Sherret
2024-03-01ci: actually fix workflow permissions (#22644)David Sherret
Also adds a lint to ensure this file is kept up to date.
2024-02-16chore: move `test_util/wpt` to `tests/wpt/suite` (#22412)Asher Gomez
As discussed with @mmastrac. I'll move `tools/wpt` to `tests/wpt` in a follow-up PR. --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-02-10chore: move cli/tests/ -> tests/ (#22369)Matt Mastracci
This looks like a massive PR, but it's only a move from cli/tests -> tests, and updates of relative paths for files. This is the first step towards aggregate all of the integration test files under tests/, which will lead to a set of integration tests that can run without the CLI binary being built. While we could leave these tests under `cli`, it would require us to keep a more complex directory structure for the various test runners. In addition, we have a lot of complexity to ignore various test files in the `cli` project itself (cargo publish exclusion rules, autotests = false, etc). And finally, the `tests/` folder will eventually house the `test_ffi`, `test_napi` and other testing code, reducing the size of the root repo directory. For easier review, the extremely large and noisy "move" is in the first commit (with no changes -- just a move), while the remainder of the changes to actual files is in the second commit.
2024-01-26chore: use granular unstable flags in tools/ (#22138)Bartek Iwańczuk
2024-01-07fix(ext): enable prefer-primordials for internal TypeScript (#21813)Kenta Moriuchi
Enabled prefer-primordials lint for ext/cron and ext/kv.
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-10-25feat(unstable): ability to `npm install` then `deno run main.ts` (#20967)David Sherret
This PR adds a new unstable "bring your own node_modules" (BYONM) functionality currently behind a `--unstable-byonm` flag (`"unstable": ["byonm"]` in a deno.json). This enables users to run a separate install command (ex. `npm install`, `pnpm install`) then run `deno run main.ts` and Deno will respect the layout of the node_modules directory as setup by the separate install command. It also works with npm/yarn/pnpm workspaces. For this PR, the behaviour is opted into by specifying `--unstable-byonm`/`"unstable": ["byonm"]`, but in the future we may make this the default behaviour as outlined in https://github.com/denoland/deno/issues/18967#issuecomment-1761248941 This is an extremely rough initial implementation. Errors are terrible in this and the LSP requires frequent restarts. Improvements will be done in follow up PRs.
2023-09-26chore: clean up lint script (#20682)Luca Casonato
Right now, if one of the linters fails, the all other ones continue running in the background. This fixes this by waiting until all linters are done before settling.
2023-08-19chore: remove third_party submodule (#20201)Divy Srivastava
removes third_party submodule, tools are installed on-demand. - removed `load_test` and websocket benchmark (covered by benchy) - removed node/bun http benchmarks (covered by benchy) - `dlint` & `dprint` downloaded on-demand. - `wrk` & `hyperfine` downloaded before CI benchmark run. Install locally using: `./tools/install_prebuilt.js wrk hyperfine` #### updating dlint/dprint update version in `tools/util.js` and place binary in `denoland/deno_third_party`.
2023-06-27chore(ext/node): disable prefer-primordials on a per-file basis (#19553)Kenta Moriuchi
2023-06-24fix(ext/node): support brotli APIs (#19223)Divy Srivastava
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-23feat: add support for globs in the config file and CLI arguments for files ↵Bartek Iwańczuk
(#19102) Follow up to https://github.com/denoland/deno/pull/19084. This commit adds support for globs in the configuration file as well as CLI arguments for files. With this change users can now use glob syntax for "include" and "exclude" fields, like so: ```json { "lint": { "include": [ "directory/test*.ts", "other_dir/" ], "exclude": [ "other_dir/foo*.ts", "nested/nested2/*" ] }, "test": { "include": [ "data/test*.ts", "nested/", "tests/test[1-9].ts" ], "exclude": [ "nested/foo?.ts", "nested/nested2/*" ] } } ``` Or in CLI args like so: ``` // notice quotes here; these values will be passed to Deno verbatim // and deno will perform glob expansion $ deno fmt --ignore="data/*.ts" $ deno lint "data/**/*.ts" ``` Closes https://github.com/denoland/deno/issues/17971 Closes https://github.com/denoland/deno/issues/6365
2023-04-02chore: Turn back on dlintPreferPrimordials (#17715)Kenta Moriuchi
Closes #17709
2023-03-22feat(cli): --ext parameter for run, compile, and bundle (#17172)Cre3per
Adds `--ext` to `deno run`, closes #5088 Additionally - Adds `--ext` to `deno compile` and `deno bundle`
2023-03-15chore: parallelize lint steps (#18214)David Sherret
2023-03-10build: run clippy with --all-features (#18115)Bartek Iwańczuk
2023-02-09refactor: deno_graph 0.43 upgrade (#17692)David Sherret
2023-01-26fix(core): Add lint check for core (#17223)Kenta Moriuchi
The prefer-primordials lint was skipped for `core/*.js`.
2023-01-13chore: small cleanup of scripts in ./tools and run copyright checker in ↵David Sherret
lint.js (#17393)
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-01chore(tools): update deprecated commands in format and lint tool (#16864)Geert-Jan Zwiers
Updates tools/format.js and tools/lint.js from Deno.spawn to Deno.Command API.
2022-11-30chore: remove unnecessary lifetimes (#16878)David Sherret
It seems we don't really need to allow these clippy rules.
2022-11-25refactor: move dts files, diagnostics.rs, and tsc.rs to tsc folder (#16820)David Sherret
2022-11-11feat(ops): implement fast lazy async ops (#16579)Divy Srivastava
Implements fast scheduling of deferred op futures. ```rs #[op(fast)] async fn op_read( state: Rc<RefCell<OpState>>, rid: ResourceId, buf: &mut [u8], ) -> Result<u32, Error> { // ... } ``` The future is scheduled via a fast API call and polled by the event loop after being woken up by its waker.
2022-11-10refactor(ops): Rewrite fast call optimizer and codegen (#16514)Divy Srivastava
2022-09-19refactor: move out test files from root testdata directory into sub ↵David Sherret
directories (#15949)
2022-08-25fix: avoid global declaration collisions in cjs (#15608)David Sherret
* Use a default stack size * 2 in debug for Windows because swc using so much stack size. We should look into this more later though.
2022-08-19Fix: Honor linter rules in CI and locally (#15492)Mathias Lafeldt
RUSTFLAGS take precedence over `target.<triple>.rustflags`. Therefore, setting the env var globally in CI would always override whatever linter rules are allowed or denied in .cargo/config.toml. With this change, we ensure that problems are detected both in CI and locally, using either cargo clippy or lint.js.
2022-08-19chore(bench): add flash router benchmarks (#15495)Divy Srivastava
2022-08-18feat(ext/flash): An optimized http/1.1 server (#15405)Divy Srivastava
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl> Co-authored-by: crowlkats <crowlkats@toaxl.com> Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2022-08-11chore: move lint rules to cargo config for better editor integration (#15453)Mathias Lafeldt
2022-07-21fix(tools): upgrade to new `Deno.spawn` api (#15265)Satya Rohith
2022-06-26build: require safety comments on unsafe code (#13870)Luca Casonato
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-06-18fix(fmt): should fail `--check` on parse error (#14907)David Sherret
2022-06-08chore(bench): generalized HTTP benchmarks framework (#14815)Divy Srivastava
2022-05-18refactor: use spawn API across codebase (#14414)Leo Kettmeir
2022-01-18Add LSP benchmark mimicking the one on quick-lint-js (#13365)Ryan Dahl
2022-01-07chore: update copyright to 2022 (#13306)Ryan Dahl
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2021-12-14chore: lint cli/tests/unit/ (#13083)Bartek Iwańczuk
2021-12-10feat(cli): update to TypeScript 4.5 (#12410)Kitson Kelly
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-11-03fix: Deno.emit crashes with BorrowMutError (#12627)Ryan Dahl
Warn on await_holding_refcell_ref clippy rule to avoid this in the future. Fixes #12453
2021-08-20chore: upgrade dlint and run `prefer-primordials` rule (#11777)Yusuke Tanaka
2021-08-11chore: move test files to testdata directory (#11601)David Sherret
2021-04-11ci: store last-modified timestamps in Github Actions cache (#10110)Bert Belder
2021-03-02chore: upgrade crates (#9632)Bartek Iwańczuk