-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
551ba98
commit 2c046af
Showing
33 changed files
with
20,830 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# This file is for unifying the coding style for different editors and IDEs | ||
# editorconfig.org | ||
|
||
# WordPress Coding Standards | ||
# https://make.wordpress.org/core/handbook/coding-standards/ | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = tab | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
extends: [ 'plugin:@wordpress/eslint-plugin/recommended' ], | ||
parserOptions: { | ||
ecmaVersion: 2021, | ||
requireConfigFile: false, | ||
babelOptions: { | ||
presets: [ require.resolve( '@wordpress/babel-preset-default' ) ], | ||
}, | ||
}, | ||
root: true, | ||
env: { | ||
browser: true, | ||
es6: true, | ||
jquery: true, | ||
}, | ||
rules: { | ||
'@wordpress/no-global-event-listener': 0, // Disable. We don't use React-based components. | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' | ||
day: 'monday' | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
day: "monday" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Assertions | ||
|
||
on: | ||
pull_request: | ||
branches: [main, develop] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php-versions: ["8.1"] | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "lts/*" | ||
cache: "npm" | ||
|
||
- name: Setup PHP ${{ matrix.php-versions }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
tools: phpcs, composer:v2 | ||
|
||
- name: Setup Composer | ||
id: composer-cache | ||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache Composer Dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Install Theme Dependencies | ||
run: | | ||
npm i --ignore-scripts | ||
composer install | ||
- name: Lint Theme | ||
run: npm run lint | ||
|
||
- name: Build Theme | ||
run: npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# os | ||
*~ | ||
.DS_* | ||
.svn/ | ||
.cvs/ | ||
.hg/ | ||
*.bak | ||
*.swp | ||
Thumbs.db | ||
|
||
# node | ||
.env | ||
.env.local | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
node_modules/ | ||
|
||
# composer | ||
vendor/ | ||
|
||
# theme | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lts/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="WordPress Coding Standards"> | ||
<description>Apply WordPress Coding Standards</description> | ||
|
||
<!-- Set the memory limit to 256M. | ||
For most standard PHP configurations, this means the memory limit will temporarily be raised. | ||
Ref: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#specifying-phpini-settings | ||
--> | ||
<ini name="memory_limit" value="256M"/> | ||
|
||
<!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. --> | ||
<arg name="cache"/> | ||
|
||
<!-- Strip the filepaths down to the relevant bit. --> | ||
<arg name="basepath" value="./"/> | ||
|
||
<!-- Check up to 20 files simultaneously. --> | ||
<arg name="parallel" value="20"/> | ||
|
||
<!-- Show sniff codes in all reports. --> | ||
<arg value="ps"/> | ||
|
||
<!-- Use WordPress "Extra" Coding Standards. --> | ||
<rule ref="WordPress-Extra"> | ||
<!-- Allow array short syntax. --> | ||
<exclude name="Generic.Arrays.DisallowShortArraySyntax" /> | ||
<!-- Allow short prefixes. --> | ||
<exclude name="WordPress.NamingConventions.PrefixAllGlobals.ShortPrefixPassed"/> | ||
</rule> | ||
|
||
<!-- Use WordPress "Docs" Coding Standards. --> | ||
<rule ref="WordPress-Docs" /> | ||
|
||
<!-- Use WordPress PHP Compatibility. --> | ||
<rule ref="PHPCompatibilityWP"/> | ||
|
||
<!-- Disregard class file name rules --> | ||
<rule ref="WordPress.Files.FileName"> | ||
<properties> | ||
<property name="strict_class_file_names" value="false"/> | ||
</properties> | ||
</rule> | ||
|
||
<!-- PHP version --> | ||
<config name="testVersion" value="8.0-"/> | ||
|
||
<!-- Only sniff PHP files. --> | ||
<arg name="extensions" value="php"/> | ||
|
||
<!-- Only sniff the theme. --> | ||
<file>./</file> | ||
|
||
<!-- Don't sniff the following directories or file types. --> | ||
<exclude-pattern>/build/*</exclude-pattern> | ||
<exclude-pattern>/node_modules/*</exclude-pattern> | ||
<exclude-pattern>/vendor/*</exclude-pattern> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
...require( '@wordpress/prettier-config' ), | ||
overrides: [ | ||
{ | ||
files: [ '*.json', '*.yml' ], | ||
options: { | ||
singleQuote: false, | ||
tabWidth: 2, | ||
useTabs: false, | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
extends: [ '@wordpress/stylelint-config', 'stylelint-config-prettier' ], | ||
rules: { | ||
'string-quotes': 'single', | ||
}, | ||
overrides: [ | ||
{ | ||
files: [ '*.scss', '**/*.scss' ], | ||
customSyntax: 'postcss-scss', | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Contributing <!-- omit in toc --> | ||
|
||
Here are the ways to get involved with this project: | ||
|
||
- [Submitting issues](#submitting-issues) | ||
- [Contributing code](#contributing-code) | ||
- [Git Workflow](#git-workflow) | ||
- [Legal Stuff](#legal-stuff) | ||
|
||
## Submitting issues | ||
|
||
Before submitting your issue, make sure it has not been mentioned earlier. You can search through the [existing issues](https://github.com/gregrickaby/grd-bb-child/issues). | ||
|
||
--- | ||
|
||
## Contributing code | ||
|
||
Found a bug you can fix? Fantastic! Patches are always welcome. | ||
|
||
--- | ||
|
||
### Git Workflow | ||
|
||
1. Fork the repo and create a feature/patch branch off `main` | ||
2. Work locally adhering to coding standards | ||
3. Run `npm run lint` | ||
4. Make sure the app builds locally with `npm run build` | ||
5. Push your code, open a PR, and fill out the PR template | ||
6. After peer review, the PR will be merged back into `main` | ||
7. Repeat ♻️ | ||
|
||
> Your PR must pass automated assertions and pass a peer review before it can be merged. | ||
--- | ||
|
||
## Legal Stuff | ||
|
||
This repo is maintained by [Greg Rickaby](https://gregrickaby.com/). By contributing code you grant its use under the [GPL 2.0](https://github.com/gregrickaby/grd-bb-child/blob/main/LICENSE). | ||
|
||
--- |
Oops, something went wrong.