Skip to content

Commit

Permalink
Publish public blog template
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianLThomas committed Jan 3, 2023
0 parents commit 19a12bd
Show file tree
Hide file tree
Showing 105 changed files with 24,229 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .contentful/vault-secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 1
services:
github-action:
policies:
- dependabot
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# EditorConfig: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

# Ignore paths
[/.next/**]
17 changes: 17 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
BUNDLE_ANALYZE=false
ENVIRONMENT_NAME=local

# This URL is the domain your app is hosted on. It is used for example, for generating the url(s) needed for the SEO properties
NEXT_PUBLIC_BASE_URL=http://localhost:3000/

# Your current space GraphQL endpoint: https://www.contentful.com/developers/docs/references/graphql/ - i.e. https://graphql.contentful.com/content/v1/spaces/{SPACE-ID}
CONTENTFUL_GRAPHQL_ENDPOINT=

# Your current space ID: https://www.contentful.com/help/find-space-id/
CONTENTFUL_SPACE_ID=

# Your current space Content Delivery API access token: https://www.contentful.com/developers/docs/references/content-delivery-api/
CONTENTFUL_DELIVERY_API_TOKEN=

# Your current space Content Preview API access token: https://www.contentful.com/developers/docs/references/content-preview-api/
CONTENTFUL_PREVIEW_API_TOKEN=
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
scripts/**/*.js
src/**/__generated
118 changes: 118 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
module.exports = {
root: true,
parser: "@babel/eslint-parser",
parserOptions: {
requireConfigFile: false,
},
env: {
browser: true,
commonjs: true,
es6: true,
jest: true,
node: true,
},
plugins: ["react-hooks"],
settings: {
react: {
version: "detect",
},
},
extends: [
"plugin:prettier/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"plugin:@next/next/recommended",
],
rules: {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_|req|res|next|err|ctx|args|context|info",
},
],
"@typescript-eslint/no-object-literal-type-assertion": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"prettier/prettier": "off",
"import/no-named-as-default": "off",
"import/no-named-as-default-member": "off",
"import/default": "off",
"import/named": "off",
"import/namespace": "off",
"import/order": [
"warn",
{
groups: ["builtin", "external", ["parent", "sibling"], "index"],
"newlines-between": "always",
pathGroups: [
{
pattern: "@/**",
group: "external",
position: "after",
},
{
pattern: "@test/**",
group: "external",
position: "after",
},
],
alphabetize: {
order:
"asc" /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */,
caseInsensitive: true /* ignore case. Options: [true, false] */,
},
},
],
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/anchor-is-valid": "off",
"react/prop-types": "off",
"react/display-name": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react/self-closing-comp": "warn",
},
overrides: [
{
files: ["**/*.ts?(x)"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
// typescript-eslint specific options
warnOnUnsupportedTypeScriptVersion: true,
},
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: {
alwaysTryTypes: true,
},
},
},
},
],
globals: {
React: "writable",
},
};
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @contentful/team-plato
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: "\U0001F41B Bug Report"
about: Spotted a bug? Add a report to help us improve this template
title: "\U0001F41B Bug - "
labels: bug, needs triage
---

# Bug report

## Summary

<!--
Please provide us with a brief summary of the bug, a few words will do. Providing screenshots is encouraged
-->

## Environment

<!--
Which browser/operating system did you encounter this bug in?
-->

## Steps to reproduce

<!--
Please provide us the steps for how to reproduce this bug
-->

## Expected results

<!--
What did you expect to experience?
-->

## Actual results

<!--
What did you experience instead of the above?
-->
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feedback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: "\U0001F4AC Give feedback on a component"
about: Give us feedback to help us improve this template
title: "\U0001F4AC Feedback - "
labels: needs triage
---

<!--
🎉❤️ Thank you for taking time to contribute to our template! ❤️🎉
Please use this template for reporting any component feedback.
-->

# Template feedback

<!--
Please provide us with your feedback on the template
-->
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: "\U0001F4A1 Proposal"
about: Want to extend the template or modify existing functionality? Send us a proposal
title: "\U0001F4A1 Proposal - "
labels: needs review, needs triage, proposal
---

<!--
🎉❤️ Thank you for taking time to contribute to the template! ❤️🎉
Please use this template to propose a change you'd like to make
-->

# Template contribution proposal

## The problem

<!--
Start with describing the problem you want to solve
-->

## The proposed solution

<!--
Detail the solution you're proposing to the problem above
-->

## Breaking changes

<!--
Are there any breaking changes with this proposal? If so, please detail them here
-->
43 changes: 43 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
**_What will change?_**

- Stuff that is going to change
- even more interesting stuff that is going to change

<!-- If this has a larger context, uncomment and put it here
_Purpose_
Why do we introduce this change? What problem do we solve? What is the
story/background for it?
-->

<!-- # Uncomment if you have any dependencies
**_Dependencies and/or References_**
* Another related PR
* A Confluence page
* External documentation
-->

<!-- # If there is some insights/learnings to share, put them here
**_Learnings_**
-->

<!-- # If there is deployment related information, uncomment and put it here
**_Deployment & Risks_**
* [x] All tests and checks are passing (or any failures are well understood and acceptable)
* [x] This PR is ready to be deployed to production (once successfully merged with the `main` branch)
* [ ] There is a migration necessary for this to work
* [ ] There is a dependent PR that needs to be deployed first
-->

## Security

_Before you click Merge, take a step back and think how someone could break the [Confidentiality, Integrity and Availability](https://docs.google.com/presentation/d/1YdFlYBLnbNoiSAMOKjopiF4u34StXTK2qYdOLkMsEKo/edit?usp=sharing) of the code you've just written. Are secrets secret? Is there any sensitive information disclosed in logs or error messages? How does your code ensure that information is accurate, complete and protected from modification? Will your code keep Contentful working and functioning?_

<!-- # Reminders
* [Write good pull requests!](https://seesparkbox.com/foundry/github_pull_requests_for_everyone) 👼
* [Be a good reviewer!](https://seesparkbox.com/foundry/stop_giving_depressing_code_reviews) 🧐
-->
45 changes: 45 additions & 0 deletions .github/workflows/eslint-tsc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Workflow name
name: ESLint & TSC

# Event for the workflow
on: [pull_request]

# List of jobs
jobs:
eslint-tsc:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm

- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v3
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"

- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Use Yarn cache
uses: actions/[email protected]
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install --frozen-lockfile --prefer-offline
# `--prefer-offline` gives cache priority

- name: ESLint
run: yarn lint

- name: TSC
run: yarn type-check
47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# Intellij
*.iml
.gradle
.idea
.idea/libraries
.idea/workspace.xml
.idea/gradle.xml
.idea/misc.xml
.idea/modules.xml
.idea/vcs.xml
Loading

0 comments on commit 19a12bd

Please sign in to comment.