Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: draft of new typescript-eslint website #3147

Closed
wants to merge 87 commits into from

Conversation

armano2
Copy link
Member

@armano2 armano2 commented Mar 4, 2021

There is a lot of stuff that still has to be done, but this draft is in sufficient enough state that feedback is welcome.

preview of current version can be seen at https://typescript-eslint-armano.netlify.app/

REPL/Playground is now available: link

TODO:

  • Pages:
    • Update homepage with better content
  • Docs:
    • add configs to rules
    • update "ESLint Plugin" guide
    • add more docs
  • Playgrund
    • add way to load config instead of drop-down with rules
    • add button to generate markdown to copy/paste in tickets
    • in options add dropdown to pick typescript version
    • align syntax highlighting between prisim, editor and ast viewer (each uses now different stylesheet)
    • AST viewer should expand childs when needed
    • add more tsconfig options
    • add ability to print ast as json
    • move linting to service worker

suppressed by #4108

@bradzacher
Copy link
Member

bradzacher commented Mar 31, 2021

Okay - I've thought about this some more and I think we should just treat the GH repo as code.
Lets work towards separating out all docs in their entirety into the new folder.

I.e. rip them out of the individual packages.

This is what other OSS projects do, so I don't know why we should be any different!
TBH - I also don't see any tangible value in co-locating the docs with the packages.

Links on the NPM package pages are broken anyways because NPM doesn't respect its own repository.directory field (even though it's clearly documented on their website 😠 ) - so updating the readme to link out to the website won't ultimately make anything worse.

Doing this will mean we no longer have to do any dodgy stuff to make these website frameworks work.
It also means that we can prioritise writing documentation around the single usecase - which will reduce the maintenance burden significantly.

@bradzacher bradzacher added the awaiting response Issues waiting for a reply from the OP or another party label May 28, 2021
@bradzacher bradzacher added the DO NOT MERGE PRs which should not be merged yet label Jul 31, 2021
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="266.667" height="266.667" viewBox="0 0 200 200">
<rect fill="#fff" width="199" height="199" />
<path d="M0 100v100h200V0H0zm164.5-6.092c5.815 2.224 11.628 9.183 13.5 11.492-1.518 1.358-11.225 8.685-12.634 9.766-.724-.499-2.433-1.932-4.666-3.666-3.128-2.428-4.3-3.5-7.5-3.5-7.6 0-11.8 6.8-7.8 12.6.8 1.1 7.5 5 14.9 8.7 19.1 9.4 23.7 15.1 23.7 29.3-.1 10.3-5.3 17.9-15.5 22.6-3.66 1.318-6.7 2.3-15 2.2-11.7 0-20.1-3.4-25.3-7.9-4.805-4.667-7.62-10.04-8.1-10.9.789-.507 3.6-2.2 7.4-4.4l6.98-4.158 3.32 3.858c8.6 10.4 27.2 9 27.2-2 0-4.7-4.1-8.3-13.8-12.3-3.7-1.5-9.1-4.2-12-5.9-19-11.3-18.5-36.9.8-45.6 5.7-2.6 16.585-3.673 24.5-.192zM115 101v8H89v74H71v-74H44c-.174-5.462 0-9.941.006-16.118L115 93z" fill="#443fd4"/>
</svg>
Copy link
Member

Choose a reason for hiding this comment

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

Nit: this and logo.svg are the same; can they be deduplicated?

position: 'left',
},
{
to: 'repl',
Copy link
Member

Choose a reason for hiding this comment

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

Nit: can we call this /play to match up with typescriptlang.org/play?

REPL to me implies Eval and Print in the CLI sense.

to: 'repl',
activeBasePath: 'repl',
position: 'right',
label: 'Playground',
Copy link
Member

Choose a reason for hiding this comment

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

This playground is excellent and will make issues much easier to reproduce!... but just spitballing: since this PR has been sitting for a while, maybe we should get in the base docs in first, and tackle the playground as a followup?

@codecov
Copy link

codecov bot commented Nov 4, 2021

Codecov Report

Merging #3147 (6286b12) into master (c289d13) will decrease coverage by 0.19%.
The diff coverage is n/a.

❗ Current head 6286b12 differs from pull request most recent head c51339f. Consider uploading reports for the commit c51339f to get more accurate results

@@            Coverage Diff             @@
##           master    #3147      +/-   ##
==========================================
- Coverage   93.11%   92.91%   -0.20%     
==========================================
  Files         174      316     +142     
  Lines        9619    10818    +1199     
  Branches     3004     3059      +55     
==========================================
+ Hits         8957    10052    +1095     
- Misses        248      342      +94     
- Partials      414      424      +10     
Flag Coverage Δ
unittest 92.91% <ø> (-0.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ackages/eslint-plugin/src/rules/space-infix-ops.ts 90.00% <0.00%> (-10.00%) ⬇️
packages/eslint-plugin/src/util/requiresQuoting.ts 90.90% <0.00%> (-9.10%) ⬇️
packages/eslint-plugin/src/rules/dot-notation.ts 84.21% <0.00%> (-8.39%) ⬇️
...ackages/eslint-plugin/src/rules/keyword-spacing.ts 92.85% <0.00%> (-7.15%) ⬇️
...nt-plugin/src/rules/lines-between-class-members.ts 85.71% <0.00%> (-7.15%) ⬇️
packages/eslint-plugin/src/util/astUtils.ts 81.81% <0.00%> (-7.08%) ⬇️
...ackages/eslint-plugin/src/util/getWrappingFixer.ts 93.93% <0.00%> (-6.07%) ⬇️
...kages/eslint-plugin/src/rules/init-declarations.ts 76.47% <0.00%> (-4.78%) ⬇️
...rc/rules/no-unnecessary-boolean-literal-compare.ts 89.61% <0.00%> (-3.90%) ⬇️
...kages/eslint-plugin/src/rules/no-empty-function.ts 77.14% <0.00%> (-2.86%) ⬇️
... and 295 more

"workspaces": {
"packages": [
"packages/*",
"website"
Copy link
Member

Choose a reason for hiding this comment

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

Out of curiosity, why not put website/ in packages/ also?

armano2 added a commit to armano2/typescript-eslint that referenced this pull request Nov 8, 2021
@armano2 armano2 closed this Nov 8, 2021
@armano2
Copy link
Member Author

armano2 commented Nov 8, 2021

suppressed by #4105 and #4108

@armano2 armano2 deleted the docs-page branch November 8, 2021 19:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awaiting response Issues waiting for a reply from the OP or another party DO NOT MERGE PRs which should not be merged yet documentation Documentation ("docs") that needs adding/updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants