Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
caseymilne authored Feb 13, 2024
0 parents commit 8ac61ee
Show file tree
Hide file tree
Showing 114 changed files with 24,645 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/**]
18 changes: 18 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
BUNDLE_ANALYZE=false
ENVIRONMENT_NAME=local

# The URL for the domain your app is hosted on (used for generating the urls needed for SEO)
# If you deploy to Vercel or Netlify it is configured through the respective config files (`vercel.json` and `netlify.toml`)
NEXT_PUBLIC_BASE_URL=http://localhost:3000/

# 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_ACCESS_TOKEN=

# Your current space Content Preview API access token: https://www.contentful.com/developers/docs/references/content-preview-api/
CONTENTFUL_PREVIEW_ACCESS_TOKEN=

# A unique string used to identify preview requests: https://nextjs.org/docs/advanced-features/preview-mode#securely-accessing-it-from-your-headless-cms
CONTENTFUL_PREVIEW_SECRET=
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
Validating CODEOWNERS rules …
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) 🧐
-->
39 changes: 39 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version: 2

registries:
npm-registry-registry-npmjs-org:
type: npm-registry
url: https://registry.npmjs.org
token: '${{secrets.NPM_REGISTRY_REGISTRY_NPMJS_ORG_TOKEN}}'

updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'
time: '05:00'
timezone: UTC
commit-message:
prefix: build
include: scope
labels:
- 'dependencies'
- 'dependabot'
open-pull-requests-limit: 2
reviewers:
- 'contentful/team-tolkien'
registries:
- npm-registry-registry-npmjs-org
allow:
- dependency-name: '@contentful/live-preview'

- package-ecosystem: github-actions
directory: '/'
schedule:
interval: daily
time: '05:00'
timezone: UTC
open-pull-requests-limit: 15
commit-message:
prefix: build
include: scope
15 changes: 15 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'dependabot approve-and-request-merge'

on: pull_request_target

jobs:
worker:
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- uses: contentful/github-auto-merge@v1
with:
VAULT_URL: ${{ secrets.VAULT_URL }}
Loading

0 comments on commit 8ac61ee

Please sign in to comment.