Skip to content

Commit

Permalink
Archive 2022 edition
Browse files Browse the repository at this point in the history
🍉
  • Loading branch information
danielfdsilva committed Oct 20, 2023
0 parents commit 08bfd26
Show file tree
Hide file tree
Showing 460 changed files with 22,515 additions and 0 deletions.
96 changes: 96 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"parser": "@typescript-eslint/parser", // Specifies the ESLint parser
"plugins": [
"react",
"react-hooks",
"@typescript-eslint",
"inclusive-language"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:prettier/recommended"
],
"settings": {
"react": {
"version": "detect"
}
},
"env": {
"browser": true,
"node": true,
"es6": true
},
"parserOptions": {
"requireConfigFile": false,
"babelOptions": {
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-typescript"
]
},
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018, // Allows for the parsing of modern ECMAScript features
"sourceType": "module" // Allows for the use of imports
},
"rules": {
"prettier/prettier": [
"error",
{
"semi": true,
"singleQuote": true,
"jsxSingleQuote": true,
"parser": "flow"
}
],
"inclusive-language/use-inclusive-words": "error",
"semi": [2, "always"],
"jsx-quotes": [2, "prefer-single"],
"no-console": 2,
"no-extra-semi": 2,
"semi-spacing": [2, { "before": false, "after": true }],
"no-dupe-else-if": 0,
"no-setter-return": 0,
"prefer-promise-reject-errors": 0,
"react/button-has-type": 2,
"react/default-props-match-prop-types": 2,
"react/jsx-closing-bracket-location": 2,
"react/jsx-closing-tag-location": 2,
"react/jsx-curly-spacing": 2,
"react/jsx-curly-newline": 2,
"react/jsx-equals-spacing": 2,
"react/jsx-max-props-per-line": [2, { "maximum": 1, "when": "multiline" }],
"react/jsx-first-prop-new-line": 2,
"react/jsx-curly-brace-presence": [
2,
{ "props": "never", "children": "never" }
],
"react/jsx-pascal-case": 2,
"react/jsx-props-no-multi-spaces": 2,
"react/jsx-tag-spacing": [2, { "beforeClosing": "never" }],
"react/jsx-wrap-multilines": 2,
"react/no-array-index-key": 2,
"react/no-typos": 2,
"react/no-unsafe": 2,
"react/no-unused-prop-types": 2,
"react/no-unused-state": 2,
"react/self-closing-comp": 2,
"react/sort-comp": 2,
"react/style-prop-object": 2,
"react/void-dom-elements-no-children": 2,
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "warn" // Checks effect dependencies
},
"overrides": [
{
"files": ["*.tsx", "*.ts"],
"rules": {
"prettier/prettier": "off"
}
}
]
}
101 changes: 101 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# This workflow performs basic checks:
#
# 1. run a preparation step to install and cache node modules
# 2. once prep succeeds, run lint and test in parallel
#
# The checks are skipped on the 'main' branch. The project relies on branch
# protection to avoid pushes straight to 'main'.

name: Checks

on:
push:
branches-ignore:
- 'main'

env:
NODE: 16

jobs:
prep:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js ${{ env.NODE }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE }}

- name: Cache node_modules
uses: actions/cache@v2
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}

- name: Install
run: yarn install

lint:
needs: prep
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js ${{ env.NODE }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE }}

- name: Cache node_modules
uses: actions/cache@v2
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}

- name: Install
run: yarn install

- name: Lint
run: yarn lint

- name: Lint styles 💅
run: yarn lint:css

test:
needs: prep
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js ${{ env.NODE }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE }}

- name: Cache node_modules
uses: actions/cache@v2
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}

- name: Install
run: yarn install

- name: Test
run: yarn test
73 changes: 73 additions & 0 deletions .github/workflows/deploy-gh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Deploy Github Pages

on:
push:
branches:
- 'main'

env:
NODE: 16

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js ${{ env.NODE }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE }}

- name: Cache node_modules
uses: actions/cache@v2
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}

- name: Cache dist
uses: actions/cache@v2
id: cache-dist
with:
path: public
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}

- name: Install
run: yarn install

- name: Build
run: yarn build --prefix-paths

deploy:
runs-on: ubuntu-latest
needs: build

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Restore dist cache
uses: actions/cache@v2
id: cache-dist
with:
path: public
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}

- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
clean: true
single-commit: true
folder: public
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
_gi_*

# Personal resources
.resources

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# dotenv environment variable files
.env*

# gatsby files
.cache/
public

# Mac files
.DS_Store

# Yarn
yarn-error.log
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"trailingComma": "none",
"singleQuote": true,
"jsxSingleQuote": true,
"printWidth": 80
}
4 changes: 4 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Disable checking on these files since the dynamic css leads to
# `CssSyntaxError` on the whole file.
src/styles/variable-utils.js
src/styles/hug/index.ts
9 changes: 9 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"processors": [
"stylelint-processor-styled-components"
],
"extends": [
"stylelint-config-recommended",
"stylelint-config-styled-components"
]
}
Loading

0 comments on commit 08bfd26

Please sign in to comment.