Skip to content

Commit

Permalink
Merge branch 'master' into contribution-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
AnirudhRevanur committed Sep 24, 2023
2 parents 919c08e + 0b2b29c commit cf03b57
Show file tree
Hide file tree
Showing 2,047 changed files with 26,708 additions and 1,267 deletions.
20 changes: 20 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"presets": [
[
"@babel/preset-env",
{
"modules": false,
"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"
}
]
],
"env": {
"test": {
"presets": [
[
"@babel/preset-env"
]
]
}
}
}
2 changes: 2 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ENV=development
CACHE_KEY=dev_2023_03
2 changes: 2 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ENV=production
CACHE_KEY=30swp20230318120543
2 changes: 2 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ENV=test
CACHE_KEY=test_2023_03
177 changes: 177 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
{
"env": {
"browser": true,
"es6": true,
"node": true,
"jest": true
},
"extends": [
"eslint:recommended",
"prettier"
],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true
}
},
"rules": {
"indent": "off",
"comma-dangle": [
"error", {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "only-multiline",
"functions": "never"
}
],
"quotes": [
"error",
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"semi": [
"error",
"always"
],
"semi-spacing": [
"error",
{
"before": false,
"after": false
}
],
"no-trailing-spaces": "error",
"no-duplicate-imports": "error",
"no-useless-computed-key": "error",
"rest-spread-spacing": [
"error",
"never"
],
"no-console": "off",
"eqeqeq": [
"error",
"smart"
],
"brace-style": [
"error",
"1tbs",
{
"allowSingleLine": true
}
],
"curly": "off",
"object-shorthand": [
"warn",
"always"
],
"key-spacing": [
"error",
{
"beforeColon": false,
"afterColon": true,
"mode": "strict"
}
],
"camelcase": [
"warn",
{
"properties": "always"
}
],
"dot-location": [
"error",
"property"
],
"generator-star-spacing": [
"off"
],
"block-spacing": [
"error",
"always"
],
"comma-style": [
"error",
"last"
],
"comma-spacing": [
"error",
{
"before": false,
"after": true
}
],
"no-extend-native": "error",
"no-loop-func": "error",
"no-implied-eval": "error",
"no-iterator": "error",
"no-label-var": "error",
"no-multi-str": "error",
"no-script-url": "error",
"no-shadow-restricted-names": "error",
"no-spaced-func": "error",
"no-sparse-arrays": "warn",
"no-fallthrough": "warn",
"no-caller": "error",
"no-eval": "error",
"no-multiple-empty-lines": [
"error",
{
"max": 2,
"maxEOF": 1
}
],
"no-multi-spaces": [
"error",
{
"ignoreEOLComments": true
}
],
"no-negated-in-lhs": "error",
"no-new": "error",
"no-new-require": "error",
"block-scoped-var": "error",
"no-use-before-define": "warn",
"no-proto": "error",
"complexity": [
"warn",
50
],
"wrap-iife": [
"error",
"outside"
],
"new-parens": "error",
"space-infix-ops": "error",
"eol-last": [
"error",
"always"
],
"space-unary-ops": "error",
"arrow-parens": [
"error",
"as-needed"
],
"arrow-spacing": "error",
"space-before-blocks": [
"error",
"always"
],
"yoda": [
"error",
"never"
],
"space-before-function-paren": "off",
"spaced-comment": [
"error",
"always"
]
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ gatsby-config.js linguist-documentation
gatsby-node.js linguist-documentation
gatsby-ssr.js linguist-documentation
.travis/* linguist-documentation
package-lock.json -diff
66 changes: 52 additions & 14 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,60 @@
js:
- snippets/js/s/*.md
- collections/js/*.yaml
- content/snippets/js/s/*.md
- content/collections/js/*.yaml
css:
- snippets/css/s/*.md
- collections/css/*.yaml
- content/snippets/css/s/*.md
- content/collections/css/*.yaml
html:
- snippets/html/s/*.md
- collections/html/*.yaml
- content/snippets/html/s/*.md
- content/collections/html/*.yaml
git:
- snippets/git/s/*.md
- collections/git/*.yaml
- content/snippets/git/s/*.md
- content/collections/git/*.yaml
python:
- snippets/python/s/*.md
- collections/python/*.yaml
- content/snippets/python/s/*.md
- content/collections/python/*.yaml
react:
- snippets/react/s/*.md
- collections/react/*.yaml
- content/snippets/react/s/*.md
- content/collections/react/*.yaml
snippet:
- snippets/**/*.md
- content/snippets/**/*.md
collection:
- collections/**/*.yaml
- content/collections/**/*.yaml
content:
- content/**
design:
- design/**
web:
- src/**
- .babelrc
- astro.config.mjs
- netlify.toml
- package-lock.json
- package.json
development:
- .github/**
- .vscode/**
- .eslintrc.json
- .gitattributes
- .gitignore
- .prettierignore
- .prettierrc
- jsconfig.json
backend:
- src/blocks/**
- src/scripts/**
ci/cd:
- .github/**
- netlify.toml
dependencies:
- package-lock.json
ui/ux:
- src/components/**
- src/icons/**
- src/layouts/**
- src/pages/**
- src/styles/**
tests:
- src/test/**


37 changes: 37 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '00 18 * * 1'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
29 changes: 29 additions & 0 deletions .github/workflows/deploy-production-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy production (push)
on:
push:
branches: [ master ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
web:
- 'src/**'
- '.babelrc'
- 'astro.config.mjs'
- 'netlify.toml'
- 'package-lock.json'
- 'package.json'
# run only if 'web' files were changed
- name: Add deployable commit to 'production' branch
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
DEPLOY_TRIGGER: ${{ github.event_name }}
if: steps.filter.outputs.web == 'true'
run: |
chmod +x ./src/scripts/deploy.sh
./src/scripts/deploy.sh production
17 changes: 17 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Deploy production
on:
schedule:
- cron: "20 18 * * *"
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Add deployable commit to 'production' branch
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
DEPLOY_TRIGGER: ${{ github.event_name }}
run: |
chmod +x ./src/scripts/deploy.sh
./src/scripts/deploy.sh production
Loading

0 comments on commit cf03b57

Please sign in to comment.