Skip to content

Commit

Permalink
Merge branch 'dev' into ADAPT-2726-focal-point
Browse files Browse the repository at this point in the history
* dev:
  ADAPT-3147 | @mattanglin | pipeline status checks (#221)

# Conflicts:
#	src/components/media/aspectRatioImage.js
#	src/components/media/fullWidthImage.js
#	src/components/media/storyImage.js
#	src/utilities/transformImage.js
  • Loading branch information
yvonnetangsu committed Nov 9, 2021
1 parent 5cd4907 commit 2b99fa2
Show file tree
Hide file tree
Showing 117 changed files with 33,444 additions and 39,711 deletions.
9 changes: 9 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-transform-react-jsx"
]
}
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build/
dist/
node_modules/
.snapshots/
*.min.js
*.test.js
43 changes: 26 additions & 17 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
{
parser: "@typescript-eslint/parser",
extends: [
"parser": "@babel/eslint-parser",
"extends": [
"plugin:react/recommended",
"plugin:prettier/recommended"
],
settings: {
react: {
version: "detect"
"settings": {
"react": {
"version": "detect"
}
},
env: {
browser: true,
node: true,
es6: true
"env": {
"browser": true,
"node": true,
"es6": true
},
plugins: ["react", "prettier"],
parserOptions: {
ecmaFeatures: {
jsx: true
"plugins": ["react", "prettier"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
ecmaVersion: 2018,
sourceType: "module"
"ecmaVersion": 2018,
"sourceType": "module"
},
rules: {
"rules": {
"react/prop-types": "off",
"prettier/prettier": "error"
"prettier/prettier": [
"error",
{
"endOfLine": "lf",
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5"
}
]
}
}
14 changes: 14 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Lint
on: push

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set the correct Node version using nvm
shell: bash -l {0}
run: nvm install
- uses: bahmutov/npm-install@v1
- name: Run Lint
run: npm run lint
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# [ADAPT OOD GIVING](https://github.com/SU-SWS/ood_giving_site)
##### Version: 1.0.0

<a href="https://codeclimate.com/repos/5f6cf2ceafd47c7359000865/maintainability"><img src="https://api.codeclimate.com/v1/badges/681fbc135f73271ae120/maintainability" /></a>
<a href="https://codeclimate.com/github/SU-SWS/ood_giving_site/maintainability"><img src="https://api.codeclimate.com/v1/badges/dc1a243d09f8aa5c903a/maintainability" /></a>

[![Netlify Status](https://api.netlify.com/api/v1/badges/b539dff9-d21b-4a2e-8edc-b9cb898c26b2/deploy-status)](https://app.netlify.com/sites/adapt-giving/deploys)

Expand Down
12 changes: 9 additions & 3 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ const activeEnv =

console.log(`Using environment config: '${activeEnv}'`);

const siteUrl =
process.env.GATSBY_SITE_URL ||
(process.env.CONTEXT === "production"
? process.env.URL
: process.env.DEPLOY_PRIME_URL);

require("dotenv").config({
path: `.env.${activeEnv}`,
});
Expand All @@ -27,7 +33,7 @@ module.exports = {
title: `Giving to Stanford`,
description: `Giving to Stanford.`,
author: `Stanford University Office of Development`,
siteUrl: `https://giving-dev.netlify.app`,
siteUrl,
// This key is for metadata only and can be statically queried
storyblok: {
resolveRelations: storyblokRelations,
Expand Down Expand Up @@ -93,7 +99,7 @@ module.exports = {
return { ...page.node };
});
},
resolveSiteUrl: () => "https://giving-dev.netlify.app",
resolveSiteUrl: () => siteUrl,
excludes: [
"/editor",
"/editor/**",
Expand Down Expand Up @@ -146,7 +152,7 @@ module.exports = {
// enablePartialUpdates: true,
queries: require("./src/utilities/algoliaQueries"),
// we skip the indexing completely on non-prod builds.
skipIndexing: true,
skipIndexing: !!(process.env.ALGOLIA_SKIP_INDEXING || process.env.CONTEXT !== 'production')
},
},
{
Expand Down
22 changes: 15 additions & 7 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,28 @@
Referrer-Policy = "origin-when-cross-origin"
Strict-Transport-Security = "max-age=2592000"
Permissions-Policy = "vibrate=(), geolocation=(), midi=(), notifications=(), push=(), microphone=(), camera=(), magnetometer=(), gyroscope=(), speaker=()"
Basic-Auth = "adapt:letmein2021"
X-Frame-Options = "DENY"
[[context.dev.headers]]
for = "/*"
[context.dev.headers.values]
Basic-Auth = "adapt:letmein2021"
[[headers]]
for = "/editor"
[headers.values]
X-Frame-Options = "ALLOWALL"

# SUBMIT SITEMAP PLUGIN
# https://www.npmjs.com/package/netlify-plugin-submit-sitemap
# ###############################################################################
# [[plugins]]
# package = "netlify-plugin-submit-sitemap"
# [plugins.inputs]
# # Path to the sitemap URL (optional, default = /sitemap.xml)
# sitemapPath = "/sitemap/sitemap-index.xml"
# Production context:
# All deploys from the main repository branch
# will inherit these settings.
[context.main]
# Deploys from main branch run this plugin in the build.
# Plugins context requires double brackets.
[[context.main.plugins]]
package = "netlify-plugin-submit-sitemap"
[context.main.plugins.inputs]
# Path to the sitemap URL (optional, default = /sitemap.xml)
sitemapPath = "/sitemap/sitemap-index.xml"
# REDIRECTS are located in static/_redirects
# ###############################################################################
Loading

0 comments on commit 2b99fa2

Please sign in to comment.