Skip to content

Commit e126280

Browse files
authored
Merge web infrastucture and design guidelines (#2008)
2 parents 14e99c4 + a59c8e9 commit e126280

File tree

2,047 files changed

+25455
-16
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,047 files changed

+25455
-16
lines changed

Diff for: .DS_Store

6 KB
Binary file not shown.

Diff for: .babelrc

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"modules": false,
7+
"targets": "> 0.5% and last 4 versions and not dead and not ie>0 and not op_mini all and not and_uc>0 and not edge<79"
8+
}
9+
]
10+
],
11+
"env": {
12+
"test": {
13+
"presets": [
14+
[
15+
"@babel/preset-env"
16+
]
17+
]
18+
}
19+
}
20+
}

Diff for: .env.development

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ENV=development
2+
CACHE_KEY=dev_2023_03

Diff for: .env.production

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ENV=production
2+
CACHE_KEY=30swp20230318120543

Diff for: .env.test

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ENV=test
2+
CACHE_KEY=test_2023_03

Diff for: .eslintrc.json

+177
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es6": true,
5+
"node": true,
6+
"jest": true
7+
},
8+
"extends": [
9+
"eslint:recommended",
10+
"prettier"
11+
],
12+
"parser": "@babel/eslint-parser",
13+
"parserOptions": {
14+
"ecmaVersion": 2018,
15+
"sourceType": "module",
16+
"ecmaFeatures": {
17+
"jsx": true,
18+
"modules": true
19+
}
20+
},
21+
"rules": {
22+
"indent": "off",
23+
"comma-dangle": [
24+
"error", {
25+
"arrays": "always-multiline",
26+
"objects": "always-multiline",
27+
"imports": "always-multiline",
28+
"exports": "only-multiline",
29+
"functions": "never"
30+
}
31+
],
32+
"quotes": [
33+
"error",
34+
"single",
35+
{
36+
"avoidEscape": true,
37+
"allowTemplateLiterals": true
38+
}
39+
],
40+
"semi": [
41+
"error",
42+
"always"
43+
],
44+
"semi-spacing": [
45+
"error",
46+
{
47+
"before": false,
48+
"after": false
49+
}
50+
],
51+
"no-trailing-spaces": "error",
52+
"no-duplicate-imports": "error",
53+
"no-useless-computed-key": "error",
54+
"rest-spread-spacing": [
55+
"error",
56+
"never"
57+
],
58+
"no-console": "off",
59+
"eqeqeq": [
60+
"error",
61+
"smart"
62+
],
63+
"brace-style": [
64+
"error",
65+
"1tbs",
66+
{
67+
"allowSingleLine": true
68+
}
69+
],
70+
"curly": "off",
71+
"object-shorthand": [
72+
"warn",
73+
"always"
74+
],
75+
"key-spacing": [
76+
"error",
77+
{
78+
"beforeColon": false,
79+
"afterColon": true,
80+
"mode": "strict"
81+
}
82+
],
83+
"camelcase": [
84+
"warn",
85+
{
86+
"properties": "always"
87+
}
88+
],
89+
"dot-location": [
90+
"error",
91+
"property"
92+
],
93+
"generator-star-spacing": [
94+
"off"
95+
],
96+
"block-spacing": [
97+
"error",
98+
"always"
99+
],
100+
"comma-style": [
101+
"error",
102+
"last"
103+
],
104+
"comma-spacing": [
105+
"error",
106+
{
107+
"before": false,
108+
"after": true
109+
}
110+
],
111+
"no-extend-native": "error",
112+
"no-loop-func": "error",
113+
"no-implied-eval": "error",
114+
"no-iterator": "error",
115+
"no-label-var": "error",
116+
"no-multi-str": "error",
117+
"no-script-url": "error",
118+
"no-shadow-restricted-names": "error",
119+
"no-spaced-func": "error",
120+
"no-sparse-arrays": "warn",
121+
"no-fallthrough": "warn",
122+
"no-caller": "error",
123+
"no-eval": "error",
124+
"no-multiple-empty-lines": [
125+
"error",
126+
{
127+
"max": 2,
128+
"maxEOF": 1
129+
}
130+
],
131+
"no-multi-spaces": [
132+
"error",
133+
{
134+
"ignoreEOLComments": true
135+
}
136+
],
137+
"no-negated-in-lhs": "error",
138+
"no-new": "error",
139+
"no-new-require": "error",
140+
"block-scoped-var": "error",
141+
"no-use-before-define": "warn",
142+
"no-proto": "error",
143+
"complexity": [
144+
"warn",
145+
50
146+
],
147+
"wrap-iife": [
148+
"error",
149+
"outside"
150+
],
151+
"new-parens": "error",
152+
"space-infix-ops": "error",
153+
"eol-last": [
154+
"error",
155+
"always"
156+
],
157+
"space-unary-ops": "error",
158+
"arrow-parens": [
159+
"error",
160+
"as-needed"
161+
],
162+
"arrow-spacing": "error",
163+
"space-before-blocks": [
164+
"error",
165+
"always"
166+
],
167+
"yoda": [
168+
"error",
169+
"never"
170+
],
171+
"space-before-function-paren": "off",
172+
"spaced-comment": [
173+
"error",
174+
"always"
175+
]
176+
}
177+
}

Diff for: .gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ gatsby-config.js linguist-documentation
55
gatsby-node.js linguist-documentation
66
gatsby-ssr.js linguist-documentation
77
.travis/* linguist-documentation
8+
package-lock.json -diff

Diff for: .github/labeler.yml

+52-14
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,60 @@
11
js:
2-
- snippets/js/s/*.md
3-
- collections/js/*.yaml
2+
- content/snippets/js/s/*.md
3+
- content/collections/js/*.yaml
44
css:
5-
- snippets/css/s/*.md
6-
- collections/css/*.yaml
5+
- content/snippets/css/s/*.md
6+
- content/collections/css/*.yaml
77
html:
8-
- snippets/html/s/*.md
9-
- collections/html/*.yaml
8+
- content/snippets/html/s/*.md
9+
- content/collections/html/*.yaml
1010
git:
11-
- snippets/git/s/*.md
12-
- collections/git/*.yaml
11+
- content/snippets/git/s/*.md
12+
- content/collections/git/*.yaml
1313
python:
14-
- snippets/python/s/*.md
15-
- collections/python/*.yaml
14+
- content/snippets/python/s/*.md
15+
- content/collections/python/*.yaml
1616
react:
17-
- snippets/react/s/*.md
18-
- collections/react/*.yaml
17+
- content/snippets/react/s/*.md
18+
- content/collections/react/*.yaml
1919
snippet:
20-
- snippets/**/*.md
20+
- content/snippets/**/*.md
2121
collection:
22-
- collections/**/*.yaml
22+
- content/collections/**/*.yaml
23+
content:
24+
- content/**
25+
design:
26+
- design/**
27+
web:
28+
- src/**
29+
- .babelrc
30+
- astro.config.mjs
31+
- netlify.toml
32+
- package-lock.json
33+
- package.json
34+
development:
35+
- .github/**
36+
- .vscode/**
37+
- .eslintrc.json
38+
- .gitattributes
39+
- .gitignore
40+
- .prettierignore
41+
- .prettierrc
42+
- jsconfig.json
43+
backend:
44+
- src/blocks/**
45+
- src/scripts/**
46+
ci/cd:
47+
- .github/**
48+
- netlify.toml
49+
dependencies:
50+
- package-lock.json
51+
ui/ux:
52+
- src/components/**
53+
- src/icons/**
54+
- src/layouts/**
55+
- src/pages/**
56+
- src/styles/**
57+
tests:
58+
- src/test/**
59+
60+

Diff for: .github/workflows/codeql-analysis.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [ master ]
9+
schedule:
10+
- cron: '00 18 * * 1'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'javascript' ]
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
# Initializes the CodeQL tools for scanning.
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@v1
33+
with:
34+
languages: ${{ matrix.language }}
35+
36+
- name: Perform CodeQL Analysis
37+
uses: github/codeql-action/analyze@v1

Diff for: .github/workflows/deploy-production-manual.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Deploy production (manual)
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v1
9+
- name: Run deployment script
10+
env:
11+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
12+
run: |
13+
chmod +x ./src/scripts/deploy.sh
14+
./src/scripts/deploy.sh production

Diff for: .github/workflows/deploy-production.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy production
2+
on:
3+
schedule:
4+
- cron: "20 18 * * *"
5+
push:
6+
branches: [ master ]
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: dorny/paths-filter@v2
13+
id: filter
14+
with:
15+
filters: |
16+
web:
17+
- 'src/**'
18+
- '.babelrc'
19+
- 'astro.config.mjs'
20+
- 'netlify.toml'
21+
- 'package-lock.json'
22+
- 'package.json'
23+
# run only if 'web' files were changed
24+
- name: Run deployment script
25+
env:
26+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
27+
if: steps.filter.outputs.web == 'true'
28+
run: |
29+
chmod +x ./src/scripts/deploy.sh
30+
./src/scripts/deploy.sh production

0 commit comments

Comments
 (0)