Skip to content

Node.js: Fix linting doc snippets#5381

Merged
helderco merged 2 commits into
dagger:mainfrom
helderco:nodejs/docs-lint-fix
Jul 3, 2023
Merged

Node.js: Fix linting doc snippets#5381
helderco merged 2 commits into
dagger:mainfrom
helderco:nodejs/docs-lint-fix

Conversation

@helderco
Copy link
Copy Markdown
Contributor

@helderco helderco commented Jun 30, 2023

Fixes #4857

I removed the duplication in eslint and prettier configs by extending them, same as I did in Python.

So you can lint docs from sdk/nodejs directory:

yarn docs:lint

And format:

yarn docs:fmt

@helderco helderco requested a review from slumbering June 30, 2023 19:59
@helderco
Copy link
Copy Markdown
Contributor Author

The failing rust actions should be fixed in:

@gerhard gerhard mentioned this pull request Jul 1, 2023
helderco added 2 commits July 2, 2023 15:39
Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
@gerhard gerhard force-pushed the nodejs/docs-lint-fix branch from d49bf45 to 1a63844 Compare July 2, 2023 14:39
Copy link
Copy Markdown
Contributor

@gerhard gerhard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvements!

Is it OK to leave this as is? cc @slumbering

> yarn docs:lint
yarn run v1.22.19
$ yarn eslint --max-warnings=0 --resolve-plugins-relative-to=./ ../../docs/current
$ /Users/gerhard/github.com/dagger/dagger/sdk/nodejs/node_modules/.bin/eslint --max-warnings=0 --resolve-plugins-relative-to=./ ../../docs/current
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <5.1.0

YOUR TYPESCRIPT VERSION: 5.1.3

Please only submit bug reports when using the officially supported version.

=============
✨  Done in 3.18s.

Same issue is happening even after rebasing on top of main.

@helderco
Copy link
Copy Markdown
Contributor Author

helderco commented Jul 3, 2023

@gerhard Yeah, we should upgrade that but I'd say it's a different PR. Not introduced by this one.

@helderco
Copy link
Copy Markdown
Contributor Author

helderco commented Jul 3, 2023

This would be a downgrade actually. Probably @typescript-eslint/typescript-estree is too strict on typescript <5.1.0 here. It's working fine, on a next update they'll probably bump that upper limit and the warning will go away.

@helderco
Copy link
Copy Markdown
Contributor Author

helderco commented Jul 3, 2023

For reference this was only closed 3 days ago:

@helderco helderco merged commit 89a2e01 into dagger:main Jul 3, 2023
@helderco helderco deleted the nodejs/docs-lint-fix branch July 3, 2023 11:49
@gerhard
Copy link
Copy Markdown
Contributor

gerhard commented Jul 3, 2023

Sounds good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: new guides section isn't being linted

2 participants