Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 4d85379

Browse files
author
Greg Rickaby
authored
Merge pull request #183 from WebDevStudios/staging
February 5 release
1 parent e595551 commit 4d85379

File tree

390 files changed

+23014
-3434
lines changed

Some content is hidden

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

390 files changed

+23014
-3434
lines changed

.env.local.example

Lines changed: 0 additions & 5 deletions
This file was deleted.

.env.sample

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Learn more about ENV variables at https://github.com/WebDevStudios/nextjs-wordpress-starter/wiki
2+
3+
# Tells next.js we're in development mode
4+
VERCEL_ENV="development"
5+
6+
# Allows node to work with local self-signed certificates.
7+
NODE_TLS_REJECT_UNAUTHORIZED="0"
8+
9+
# Your local WordPress URL.
10+
LOCAL_WORDPRESS_API_URL="https://nextjswp.test/"
11+
12+
# Your development WordPress URL.
13+
DEV_WORDPRESS_API_URL="https://devwordpress.com"
14+
15+
# Your staging WordPress URL.
16+
STAGING_WORDPRESS_API_URL="https://stagingwordpress.com/"
17+
18+
# Your production WordPress URL.
19+
PROD_WORDPRESS_API_URL="https://productionwordpress.com/"
20+
21+
# This needs to match PREVIEW_SECRET_TOKEN constant in wp-config.php. It can be any random string.
22+
WORDPRESS_PREVIEW_SECRET="ANY_RANDOM_STRING_SEE_README"
23+
24+
# Your WordPress username.
25+
WORDPRESS_APPLICATION_USERNAME="YOUR_WORDPRESS_USERNAME"
26+
27+
# Your WordPress application password. Requires WordPress 5.6 and above. See https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/
28+
WORDPRESS_APPLICATION_PASSWORD="YOUR_GENERATED_APPLICATION_PASSWORD"
29+
30+
# Your Algolia index name.
31+
NEXT_PUBLIC_LOCAL_ALGOLIA_INDEX_NAME="YOUR_ALGOLIA_INDEX_NAME"
32+
33+
# Your Algolia application ID.
34+
NEXT_PUBLIC_ALGOLIA_APPLICATION_ID="YOUR_ALGOLIA_APP_ID"
35+
36+
# Your Algolia search only key.
37+
NEXT_PUBLIC_ALGOLIA_SEARCH_ONLY_KEY="YOUR_ALGOLIA_SEARCH_ONLY_KEY"

.eslintrc.js

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
// https://eslint.org/docs/user-guide/configuring/
12
module.exports = {
2-
parser: 'babel-eslint',
33
parserOptions: {
44
ecmaFeatures: {
55
jsx: true
66
},
7-
ecmaVersion: 9,
7+
ecmaVersion: 2021,
88
sourceType: 'module'
99
},
1010
env: {
11+
browser: true,
1112
node: true,
1213
es6: true
1314
},
@@ -16,23 +17,52 @@ module.exports = {
1617
'plugin:react/recommended',
1718
'plugin:react-hooks/recommended',
1819
'plugin:jsx-a11y/recommended',
19-
'prettier'
20+
'prettier',
21+
'plugin:jsdoc/recommended'
2022
],
2123
settings: {
2224
react: {
2325
version: 'detect'
26+
},
27+
jsdoc: {
28+
tagNamePreference: {
29+
returns: 'return'
30+
}
2431
}
2532
},
26-
plugins: ['react', 'react-hooks', 'jsx-a11y', 'prettier'],
33+
plugins: ['react', 'react-hooks', 'jsx-a11y', 'prettier', 'jsdoc'],
2734
rules: {
35+
'func-style': ['error', 'declaration'],
36+
'jsdoc/check-indentation': 'warn',
37+
'jsdoc/check-line-alignment': [
38+
'warn',
39+
'always',
40+
{
41+
tags: ['author', 'param', 'see']
42+
}
43+
],
44+
'jsdoc/require-param': [
45+
'warn',
46+
{
47+
checkRestProperty: true,
48+
unnamedRootBase: ['props']
49+
}
50+
],
51+
'jsdoc/check-values': [
52+
'warn',
53+
{
54+
allowedAuthors: ['WebDevStudios']
55+
}
56+
],
2857
'jsx-a11y/anchor-is-valid': 'off',
58+
'no-console': ['error', {allow: ['warn', 'error']}],
59+
'prettier/prettier': 'error',
2960
'react/react-in-jsx-scope': 'off',
3061
'react/jsx-filename-extension': [
31-
1,
62+
'warn',
3263
{
3364
extensions: ['.js', '.jsx']
3465
}
35-
],
36-
'prettier/prettier': 'error'
66+
]
3767
}
3868
}

.github/CODEOWNERS

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# These owners will be the default owners for everything in
2-
# the repo. Unless a later match takes precedence.
3-
# See https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
4-
* @gregrickaby
1+
# Code Owners
2+
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
3+
* @gregrickaby
4+
components/* @itsamoreh @gregrickaby
5+
api/* @ravewebdev @gregrickaby

.github/CODE_OF_CONDUCT.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/CONTRIBUTING.md

Lines changed: 106 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,106 @@
1-
# How To Contribute
2-
3-
WebDevStudios welcomes contributions and bug fixes from third-parties. Here are the steps to get started:
4-
5-
* Create an [Issue](https://github.com/WebDevStudios/nextjs-wordpress-starter/issues) so we can all discuss your idea
6-
* Fork NextJS WordPress Starter
7-
* Create a feature/hotfix branch off [main](https://github.com/WebDevStudios/nextjs-wordpress-starter/tree/master)
8-
* Commit code changes to your feature/hotifx branch
9-
* Continue to merge master into your feature/hotifx branch so it stays current
10-
* Test across all major browsers
11-
* Accessibility testing (both WCAG 2.1AA and Section 508)
12-
* Must pass linting
13-
* Submit a [Pull Request](https://github.com/WebDevStudios/nextjs-wordpress-starter/pulls) and reference your Issue #
14-
* If everything tests out on our end, we may merge in your Pull Request
1+
# Contributing <!-- omit in toc -->
2+
3+
## Introduction
4+
5+
Thanks for contributing — you rock! 🤘
6+
7+
Before getting started, please [view the wiki](https://github.com/WebDevStudios/nextjs-wordpress-starter/wiki) and read the following documentation.
8+
9+
---
10+
11+
## Table of Contents <!-- omit in toc -->
12+
13+
- [Introduction](#introduction)
14+
- [Submitting Issues and Feature Requests](#submitting-issues-and-feature-requests)
15+
- [Development](#development)
16+
- [Tips to help your PR get approved](#tips-to-help-your-pr-get-approved)
17+
- [Git Workflow](#git-workflow)
18+
- [PR Preview Deployments](#pr-preview-deployments)
19+
- [Code Linting](#code-linting)
20+
- [Storybook](#storybook)
21+
- [Releases](#releases)
22+
23+
---
24+
25+
## Submitting Issues and Feature Requests
26+
27+
Before submitting an issue or making a feature request, please search for existing [issues](https://github.com/WebDevStudios/nextjs-wordpress-starter/issues) or look at our [Github Discussions](https://github.com/WebDevStudios/nextjs-wordpress-starter/discussions).
28+
29+
If you do file an issue, be sure to fill out the report completely!
30+
31+
---
32+
33+
## Development
34+
35+
### Tips to help your PR get approved
36+
37+
1. Make sure your code editor supports real-time linting and has the [recommended extensions](https://github.com/WebDevStudios/nextjs-wordpress-starter/wiki/recommended-extensions) installed
38+
2. [JSDocs](https://jsdoc.app/) are required for all JavaScript functions
39+
3. Run `yarn build && yarn start` before submitting your PR, to ensure a build will be successful
40+
4. Be courteous in your communications
41+
42+
### Git Workflow
43+
44+
1. Create a `feature` branch off `staging`
45+
2. Work locally adhering to coding standards
46+
3. When ready, open a draft Pull Request on Github
47+
4. When finished, fill out the PR template and publish your PR
48+
5. Your PR must pass assertions and deploy successfully
49+
6. After peer review, the PR will be merged back into `staging`
50+
7. Repeat ♻️
51+
52+
### PR Preview Deployments
53+
54+
[Vercel](https://vercel.com/webdevstudios/nextjs-wordpress-starter) is connected to this Github repository and will automatically build and deploy a unique URL for each Pull Request.
55+
56+
Learn more about [Vercel + Github integration](https://vercel.com/docs/git/vercel-for-github).
57+
58+
### Code Linting
59+
60+
This project has several rulesets and uses ESLint, Prettier, and Stylelint to enforce standards.
61+
62+
In addition to real-time linting, you could run the following commands in your terminal. These commands are also used by Husky during a commit!
63+
64+
Lint JavaScript:
65+
66+
```bash
67+
yarn run lint:js
68+
```
69+
70+
Lint CSS:
71+
72+
```bash
73+
yarn run lint:css
74+
```
75+
76+
Format your code:
77+
78+
```bash
79+
yarn run format
80+
```
81+
82+
## Storybook
83+
84+
To work with Storybook on your Local, run the following command:
85+
86+
```bash
87+
yarn storybook
88+
```
89+
90+
Stories are written in `.mdx` and should be placed next to the component.
91+
92+
[Learn how to write stories for this starter](https://github.com/WebDevStudios/nextjs-wordpress-starter/wiki/component-story).
93+
94+
---
95+
96+
## Releases
97+
98+
Releases to Production will occur at the end of a bi-weekly sprint or via `hotfixes` as needed.
99+
100+
1. On Github, create a PR off the `/staging` branch against the `/main` branch
101+
2. Copy the WPE Staging environment to WPE Production.
102+
3. On Github, merge `/staging` into `/main`
103+
104+
[Learn how to copy environments on WP Engine.](https://github.com/WebDevStudios/nextjs-wordpress-starter/wiki/Internal-Documentation#copy-wp-engine-environments)
105+
106+
---

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
Thanks for taking the time to file a bug report! Please fill out this form as completely as possible.
10+
11+
If you leave out sections there is a high likelihood it will be moved to our [GitHub Discussions](https://github.com/WebDevStudios/nextjs-wordpress-starter/discussions).
12+
13+
**Describe the bug**
14+
A clear and concise description of what the bug is.
15+
16+
**To Reproduce**
17+
Steps to reproduce the behavior:
18+
19+
1. Go to '...'
20+
2. Click on '....'
21+
3. Scroll down to '....'
22+
4. See error
23+
24+
**Expected behavior**
25+
A clear and concise description of what you expected to happen.
26+
27+
**Screenshots**
28+
If applicable, add screenshots to help explain your problem.
29+
30+
**Desktop (please complete the following information):**
31+
32+
- OS: [e.g. iOS]
33+
- Browser [e.g. chrome, safari]
34+
- Version [e.g. 22]
35+
36+
**Smartphone (please complete the following information):**
37+
38+
- Device: [e.g. iPhone6]
39+
- OS: [e.g. iOS8.1]
40+
- Browser [e.g. stock browser, safari]
41+
- Version [e.g. 22]
42+
43+
**Additional context**
44+
Add any other context about the problem here.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
**Please create your feature request as a [GitHub Discussion](https://github.com/WebDevStudios/nextjs-wordpress-starter/discussions).**
10+
11+
Thank you!

0 commit comments

Comments
 (0)