summaryrefslogtreecommitdiff
path: root/tests/specs/lint
AgeCommit message (Collapse)Author
2024-11-18feat: fmt and lint respect .gitignore file (#26897)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/26573
2024-11-14feat(cli): add `--unstable-node-globals` flag (#26617)Marvin Hagemeister
This PR adds a new `--unstable-node-globals` flag to expose Node globals by default. Fixes https://github.com/denoland/deno/issues/26611 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-29fix: provide hints in terminal errors for Node.js globals (#26610)Bartek Iwańczuk
Add info/hint for terminal errors related to Node.js globals: - __filename - __dirname - Buffer - global - setImmediate - clearImmediate Closes https://github.com/denoland/deno/issues/17494
2024-09-27fix(lint): correctly handle old jsx in linter (#25902)Luca Casonato
Previously the CLI was incorrectly reporting `React` as unused in a JSX file that uses the "old" transform. The LSP was already handling this correctly.
2024-09-19fix: don't include extensionless files in file collection for lint & fmt by ↵Leo Kettmeir
default (#25721) When using the `ext` flag, it will still attempt formatting them with the provided extension
2024-09-18feat: default to TS for file extension and support ext flag in more ↵Leo Kettmeir
scenarios (#25472) Closes #11220 Currently does lint, fmt, and repl
2024-09-18feat(lint): add `no-process-global` lint rule (#25709)Divy Srivastava
Closes https://github.com/denoland/deno/issues/25679
2024-09-16chore: deprecate lint itests (#25655)HasanAlrimawi
2024-09-04feat(cli): give access to `process` global everywhere (#25291)Luca Casonato
2024-08-30fix(lint): support linting jsr pkg without version field (#25230)David Sherret
2024-08-15feat(lint): Add lint for usage of node globals (with autofix) (#25048)Nathan Whitaker
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-07-25fix(unstable): move sloppy-import warnings to lint rule (#24710)David Sherret
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-23fix: enable the reporting of parsing related problems when running deno lint ↵HasanAlrimawi
(#24332)
2024-07-04feat: npm workspace and better Deno workspace support (#24334)David Sherret
Adds much better support for the unstable Deno workspaces as well as support for npm workspaces. npm workspaces is still lacking in that we only install packages into the root node_modules folder. We'll make it smarter over time in order for it to figure out when to add node_modules folders within packages. This includes a breaking change in config file resolution where we stop searching for config files on the first found package.json unless it's in a workspace. For the previous behaviour, the root deno.json needs to be updated to be a workspace by adding `"workspace": ["./path-to-pkg-json-folder-goes-here"]`. See details in https://github.com/denoland/deno_config/pull/66 Closes #24340 Closes #24159 Closes #24161 Closes #22020 Closes #18546 Closes #16106 Closes #24160
2024-06-07fix: do not panic linting files with UTF-8 BOM (#24136)David Sherret
Closes #24122
2024-06-05fix: better handling of npm resolution occurring on workers (#24094)David Sherret
Closes https://github.com/denoland/deno/issues/24063
2024-04-29chore: migrate bench, publish, and more itests to spec tests (#23584)David Sherret
2024-03-25feat(lint): automatically opt-in packages to `jsr` lint tag (#23072)David Sherret
This automatically opts packages (deno.json's with a name, version, and exports field) into the "jsr" lint tag.
2024-03-21feat(lint): `deno lint --fix` and lsp quick fixes (#22615)David Sherret
Adds a `--fix` option to deno lint. This currently doesn't work for basically any rules, but we can add them over time to deno lint.