Skip to content

chore: updated contributing guidelines, eslint rules and storybook templates - #5294

Merged
ovflowd merged 17 commits into
nodejs:major/website-redesignfrom
ovflowd:chore/normalise-stories-remove-old-stories
Apr 20, 2023
Merged

chore: updated contributing guidelines, eslint rules and storybook templates#5294
ovflowd merged 17 commits into
nodejs:major/website-redesignfrom
ovflowd:chore/normalise-stories-remove-old-stories

Conversation

@ovflowd

@ovflowdovflowd commented Apr 18, 2023

Copy link
Copy Markdown
Member

This PR updates the ESLint rules and enforces common consistencies that are easily missed.

This PR also updates the CONTRIBUTING guidelines by adding and enforcing a few new sections across the codebase.

New ESLint rules

  • Enforce import type
  • Ban import React default import
  • Ban import * as React namespace import
  • Enforce ordering of imports
  • Enforce destructuring of Component props
  • Enforce usage of type over interface on React Components

Updated Contributing Guidelines

  • Added a new section for Unit Tests and Storybooks
  • Added a new section on how React Components should be coded
  • This PR also updates all Storybooks to follow the template

IMPORTANT NOTE: Most of the file changes of this PR are ESLint applying these new rules. No actual code change was done here.

@ovflowd
ovflowd requested a review from a team as a code ownerApril 18, 2023 22:11
@ovflowd

Copy link
Copy Markdown
MemberAuthor

Hey, @nodejs/website, this PR changes our CONTRIBUTING guidelines; hence fast-tracking cannot be applied here.

I request all of you to give a nice review of these changes. Thank you!

@ovflowdovflowd added the website redesign Issue/PR part of the Node.js Website Redesign label Apr 18, 2023
@ovflowdovflowd changed the title chore(stories): made stories consistentchore: updated contributing guidelines, eslint rules and storybook templatesApr 18, 2023
Comment threadCONTRIBUTING.md Outdated
Comment threadCONTRIBUTING.md Outdated
Comment threadCONTRIBUTING.md Outdated
Comment thread.eslintrc Outdated
@vercel

vercelBot commented Apr 19, 2023

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

NameStatusPreviewCommentsUpdated (UTC)
nodejs-org✅ Ready (Inspect)Visit Preview💬 Add feedbackApr 20, 2023 9:07am
nodejs-org-stories✅ Ready (Inspect)Visit PreviewApr 20, 2023 9:07am

Claudio Wunderand others added 2 commits April 19, 2023 19:50
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
@ovflowd
ovflowd requested a review from shanpriyanApril 19, 2023 17:51
@vercel
vercelBot temporarily deployed to Preview April 19, 2023 17:58 Inactive
Comment threadCONTRIBUTING.md Outdated
Comment threadCONTRIBUTING.md Outdated
Co-authored-by: Manish Kumar ⛄ <manishprivet@protonmail.com>
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
@vercel
vercelBot temporarily deployed to Preview – nodejs-org-stories April 20, 2023 07:30 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org April 20, 2023 07:36 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org-stories April 20, 2023 07:46 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org April 20, 2023 07:46 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org April 20, 2023 08:00 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org-stories April 20, 2023 08:01 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org April 20, 2023 08:29 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org-stories April 20, 2023 08:34 Inactive
@ovflowd

ovflowd commented Apr 20, 2023

Copy link
Copy Markdown
MemberAuthor

@nodejs/website can we get reviews? I wanted to merge this asap as tomorrow I'll be doing a workshop and would like to have these new changes merged by then!

(Pretty much requesting fast-tracking here as I want to have this PR to get merged before we start on other work)

@vercel
vercelBot temporarily deployed to Preview – nodejs-org April 20, 2023 09:06 Inactive
@vercel
vercelBot temporarily deployed to Preview – nodejs-org-stories April 20, 2023 09:07 Inactive
@ovflowdovflowd added the fast-track Fast Tracking PRs label Apr 20, 2023
@ovflowd
ovflowd merged commit bfcabb9 into nodejs:major/website-redesignApr 20, 2023
@ovflowd
ovflowd deleted the chore/normalise-stories-remove-old-stories branch April 20, 2023 12:01
ovflowd added a commit that referenced this pull request May 3, 2023
…mplates (#5294)
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Co-authored-by: Manish Kumar ⛄ <manishprivet@protonmail.com>
ovflowd added a commit that referenced this pull request May 14, 2023
* feat(unit-test): introduce unit test on website redesign branch (#5178
feat(unit-test): introduce unit test
* chore(minor): just a tiny design nitpick
* chore: set up storybook (#5191) (#5214)
* chore: set up testing-library jest extend (#5231)
Co-authored-by: Manish Kumar ⛄ <manishprivet@protonmail.com>
* chore(dependencies): updated dependencies
* feat: create section title component (#5237)
Co-authored-by: Wai.Tung <maledong_public@foxmail.com>
* 📎 chore(migration): migrate banner component (#5233)
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Co-authored-by: Michael Esteban <mickel13@gmail.com>
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
* feat: migrate AnimatedPlaceholder component (#5238
Migrate AnimatedPlaceholder component from nodejs.dev
and create a new Story.
* feat: create article alert component (#5243)
* feat: migrate blockquote component (#5259)
* feat(stylelint,storybook): fixed styleling misconfig and fixed storybooks (#5281)
* feat: create article data tag component (#5280)
* feat: migrate AuthorList component and add story 🎉 (#5277)
Co-authored-by: Michael Esteban <mickel13@gmail.com>
* chore(migration): migrate language selector component (#5266)
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Teja Sai Sandeep Reddy Konala <sandeep.konala@knacksystems.com>
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Co-authored-by: Michael Esteban <mickel13@gmail.com>
* feat(DarkModeToggler): Migrate and add stories to theme toggler 🎉 (#5236)
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Claudio Wunder <cwunder@hubspot.com>
* chore: updated contributing guidelines, eslint rules and storybook templates (#5294)
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Co-authored-by: Manish Kumar ⛄ <manishprivet@protonmail.com>
* chore: contributing quick fix of example
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
* chore: story guide and react spreading
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
* chore: remove base styles from old styling
* chore: fix storybook styles, imports, typescript config and dependencies (#5319
* chore: optimises tsconfig
* chiore: add missing dependencies
* chore: type storybook constants
* chore: styles moved styles to somewhere else
* chore: add global json type definition
* chore: i18n aria-label instead of sr-only
* chore: added open sans font family and space between imports
* chore: moved styles and fixed styles and updated banner stories
* fix: stylelint rules
* chore: updated tsconfig
* chore: fix tests
* fix: darkmodetoggle test
* chore: stories use index.stories.tsx
* chore: adopt turborepo (#5316
* chore: revert pnpm use plain npm
* fix: package.json
* chore: remove warnings and add node_env
* chore: cross-env
* fix: fix turbo pipelines
* chore: only cache certain files
* chore: turbo shouldn't care about coverage outputs
* chore: proper inputs and outputs for pipelines
* chore: do not store some outputs and updated inputs for lint
* chore: added prettier configs
* chore: remove console.info
* chore: updated inputs of all other entries
* fix(package.json) Lint command is missing slashes (#5321
fix(package.json) lint:fix missing slashes
* moved `DataTag` to `components/Api` (#5317)
Co-authored-by: vasanth9 <cheepurupalli.vasanthkumar.com>
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
* hot-fix: dependency updates and fix dev runtime
* chore: updated start command
* migration(Layout): newFooter (#5320)
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
* feat: migrate EditLink component (#5271)
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Wai.Tung <maledong_public@foxmail.com>
* feat(blog) Migrate BlogCard component (#5323)
Co-authored-by: Michael Esteban <mickel13@gmail.com>
* Issue#5307 - Add framer-motion to the dependency list (#5318)
* chore: add remote turbo cache and simplified gh actions cache (#5326)Co-authored-by: Aymen Naghmouchi <aymenadvance@gmail.com>
* chore: add remote turbo cache and simplified gh actions cache
* chore: updated cache rules
* chore: more cache rules
---------
Co-authored-by: Aymen Naghmouchi <aymenadvance@gmail.com>
* chore: fix storybook local development mode (#5335)
* chore: migrate pagination component (#5331)
Co-authored-by: Teja Sai Sandeep Reddy Konala <tejasaisandeepreddykonala@MacBook-Pro.local>
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Wai.Tung <maledong_public@foxmail.com>
* Chore(node feat) (#5338)
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
* chore: migrate releases types (#5324)
* hotfix: first element no margin-top
* (website redesign) Feat(shellbox): migration (#5234)
Co-authored-by: Manish Kumar ⛄ <manishprivet@protonmail.com>
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Co-authored-by: Michael Esteban <mickel13@gmail.com>
Co-authored-by: Wai.Tung <maledong_public@foxmail.com>
* fix(i18n): translation key (#5347)
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
* chore: updated dependencies
* chore: vercel enable middleware and i18n redirection (#5300)
* feat(unit-test): introduce unit test on website redesign branch (#5178
feat(unit-test): introduce unit test
* chore: set up storybook (#5191) (#5214)
* feat(stylelint,storybook): fixed styleling misconfig and fixed storybooks (#5281)
* feat(DarkModeToggler): Migrate and add stories to theme toggler 🎉 (#5236)
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Claudio Wunder <cwunder@hubspot.com>
* chore: updated contributing guidelines, eslint rules and storybook templates (#5294)
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Co-authored-by: Manish Kumar ⛄ <manishprivet@protonmail.com>
* chore: fix storybook styles, imports, typescript config and dependencies (#5319
* chore: optimises tsconfig
* chiore: add missing dependencies
* chore: type storybook constants
* chore: styles moved styles to somewhere else
* chore: add global json type definition
* chore: i18n aria-label instead of sr-only
* chore: added open sans font family and space between imports
* chore: moved styles and fixed styles and updated banner stories
* fix: stylelint rules
* chore: updated tsconfig
* chore: fix tests
* fix: darkmodetoggle test
* chore: stories use index.stories.tsx
* chore: adopt turborepo (#5316
* chore: revert pnpm use plain npm
* fix: package.json
* chore: remove warnings and add node_env
* chore: cross-env
* fix: fix turbo pipelines
* chore: only cache certain files
* chore: turbo shouldn't care about coverage outputs
* chore: proper inputs and outputs for pipelines
* chore: do not store some outputs and updated inputs for lint
* chore: added prettier configs
* chore: remove console.info
* chore: updated inputs of all other entries
* feat(stability): migrate component
* chore(snapshot): update
* Update components/Api/Stability/index.tsx
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update components/Api/Stability/index.tsx
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* Update components/Api/Stability/index.tsx
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* fea(stability): update stories + fix
* Update components/Api/Stability/index.stories.tsx
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* fix(i18n): update turkish language direction (#5182)
* chore: rollback CODEOWNER changes (#5183)
* Sync: merge `major/website-redesign` into `main` (#5356)
Co-authored-by: Manish Kumar ⛄ <manishprivet@protonmail.com>
Co-authored-by: Wai.Tung <maledong_public@foxmail.com>
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Co-authored-by: Michael Esteban <mickel13@gmail.com>
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Teja Sai Sandeep Reddy Konala <sandeep.konala@knacksystems.com>
Co-authored-by: Claudio Wunder <cwunder@hubspot.com>
Co-authored-by: vasanth9 <cheepurupalli.vasanthkumar.com>
Co-authored-by: Aymen Naghmouchi <aymenadvance@gmail.com>
Co-authored-by: Teja Sai Sandeep Reddy Konala <tejasaisandeepreddykonala@MacBook-Pro.local>
Co-authored-by: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
Co-authored-by: Guilherme Araújo <guilherme.araujo@maxxidata.com>
Co-authored-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
Co-authored-by: HinataKah0 <128208841+HinataKah0@users.noreply.github.com>
Co-authored-by: Olaleye Blessing <Olayinkablexxy@gmail.com>
Co-authored-by: ktssr <31731919+ktssr@users.noreply.github.com>
Co-authored-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Co-authored-by: vasanthkumar <42891954+vasanth9@users.noreply.github.com>
Co-authored-by: Floran Hachez <floran.hachez@gmail.com>
Co-authored-by: Jatin <96469998+JatinSharma32@users.noreply.github.com>
* feat(stability): update snapshot
* Update components/Api/Stability/index.tsx
Co-authored-by: Jithil P Ponnan <MrJithil@users.noreply.github.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
* code format
* Update components/Api/Stability/index.tsx
Co-authored-by: Jithil P Ponnan <MrJithil@users.noreply.github.com>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
---------
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
Co-authored-by: Claudio Wunder <cwunder@hubspot.com>
Co-authored-by: Guilherme Araújo <guilherme.araujo@maxxidata.com>
Co-authored-by: Manish Kumar ⛄ <manishprivet@protonmail.com>
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Co-authored-by: Wai.Tung <maledong_public@foxmail.com>
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Co-authored-by: Michael Esteban <mickel13@gmail.com>
Co-authored-by: HinataKah0 <128208841+HinataKah0@users.noreply.github.com>
Co-authored-by: Olaleye Blessing <Olayinkablexxy@gmail.com>
Co-authored-by: ktssr <31731919+ktssr@users.noreply.github.com>
Co-authored-by: Teja Sai Sandeep Reddy Konala <sandeep.konala@knacksystems.com>
Co-authored-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Co-authored-by: vasanthkumar <42891954+vasanth9@users.noreply.github.com>
Co-authored-by: Jatin <96469998+JatinSharma32@users.noreply.github.com>
Co-authored-by: Aymen Naghmouchi <aymenadvance@gmail.com>
Co-authored-by: Teja Sai Sandeep Reddy Konala <tejasaisandeepreddykonala@MacBook-Pro.local>
Co-authored-by: Yagiz Nizipli <yagiz@nizipli.com>
Co-authored-by: Nick Schonning <nschonni@gmail.com>
Co-authored-by: Floran Hachez <floran.hachez@gmail.com>
Co-authored-by: Jithil P Ponnan <MrJithil@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast-trackFast Tracking PRswebsite redesignIssue/PR part of the Node.js Website Redesign

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@ovflowd@rodion-arr@benhalverson@shanpriyan@manishprivet