GithubHelp home page GithubHelp logo

portfolio's Introduction

Import Format

Order of Imports

  1. Any react imports
  2. Default exported components (e.g. import Lorem from 'react-lorem-component')
  3. Non-default exported components (e.g. import { motion } from 'react-motion')
  4. Imported data (e.g. import ProjectsData from '../../content/projects.yaml')
  5. Stylesheets (e.g. import styles from '../styles/projects.module.css')

Rules

  • Use double quotes over single quotes
  • Prefer CSS modules for stylesheets
  • Prefer styles as the name for the imported CSS module

Other

  • Decouple data from component logic (i.e. don't reference data in /components/*.js)
  • Order imports from external libraries before those of internal components
  • Prefer the className attribute first in components
  • Likewise, the key attribute should be the last
  • Components/elements with multiple attributes should have one per line
  • List props with a description used by a component in single-line comments at the top of the component declaration
  • Prefer semantic elements over non-semantic ones, where applicable
    • <main> –– "Specifies the main content of a document"
    • <section> –- "A section is a thematic grouping of content, typically with a heading"
    • <article> –– "An article specifies independent, self-contained content"
    • <header> –– "Represents a container for introductory content or a set of navigational links"
    • <footer> –– "Defines a footer (copyright, contact info, back to top button, etc.) for a document or section"
    • <nav> –– "Defines a set of navigation links"
    • <details> –– "Defines additional details that the user can view or hide"
    • <summary> –– "Defines a visible heading for an <details> element"
    • <figure> –– "Specifies self-contained content, like illustrations, diagrams, photos, code listings, etc."
    • <figcaption> –– "Defines a caption for a element"

portfolio's People

Contributors

tyjch avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.