Skip to content

Instantly share code, notes, and snippets.

View lainermeister's full-sized avatar
💩

Elaine Wong lainermeister

💩
View GitHub Profile
@lainermeister
lainermeister / eslint-rules.md
Last active May 19, 2020 18:23
Eslint Rules

Arrow functions

Does anyone know how to add an eslint rule that will add linebreak padding before and/or after arrow functions? Adding the function statement type here only updates function() style functions. I don't want linebreak padding around all blocks, though. https://eslint.org/docs/rules/padding-line-between-statements

With hypothetical rule

'padding-line-between-statements': [
      'error',
      { blankLine: 'always', prev: '=>', next: '*' },
@lainermeister
lainermeister / theme-swapping.md
Last active December 21, 2019 00:20
Color Theme Swapping in a React App

Color Theme Swapping in a React App

We built color swapping functionality to allow users to flip between light and dark themes on an e-commerce page. The theme is set by default to the user's preferred setting, but the user can toggle back and forth using the theme swapping toggle.

Kartify-Light-and-Dark

Here's a link to the project repo.

Using CSS and React Hooks, this functionality is fairly straightforward to set up.

@lainermeister
lainermeister / 001-homepage.md
Last active December 19, 2019 23:59
Engineering Journal Template