-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from brainstormforce/main-build
STAR-174 - Merge to master - v1.0.0
- Loading branch information
Showing
39 changed files
with
27,184 additions
and
1,944 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,3 @@ | ||
{ | ||
"presets": ["@babel/preset-react", "@babel/preset-env"] | ||
} |
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 @@ | ||
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,58 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"plugin:@wordpress/eslint-plugin/recommended" | ||
], | ||
"env": { | ||
"browser": true | ||
}, | ||
"parserOptions": { | ||
"requireConfigFile": false, | ||
"babelOptions": { | ||
"presets": [ | ||
"@wordpress/babel-preset-default" | ||
] | ||
} | ||
}, | ||
"globals": { | ||
"starterTemplates": true, | ||
"astraSitesVars": true, | ||
"ajaxurl": true, | ||
"starterTemplatesPreview":true, | ||
"jQuery": true | ||
}, | ||
"rules": { | ||
"jsdoc/require-param": "off", | ||
"jsdoc/valid-types": "error", | ||
"jsx-a11y/no-static-element-interactions": "off", // Should be enabled. | ||
"jsx-a11y/click-events-have-key-events": "off", // Should be enabled. | ||
"jsx-a11y/alt-text": "error", | ||
"eqeqeq": "error", | ||
"jsx-a11y/iframe-has-title": "error", | ||
"jsdoc/check-param-names": "error", | ||
"jsx-a11y/no-noninteractive-element-interactions": "off", // Should be enabled. | ||
"@wordpress/i18n-no-variables": "error", | ||
"no-template-curly-in-string": "error", | ||
"no-throw-literal": "error", | ||
"no-unmodified-loop-condition": "error", | ||
"no-useless-call": "error", | ||
"no-useless-concat": "error", | ||
"prefer-object-spread": "off", // Should be enabled. | ||
"prefer-promise-reject-errors": "error", | ||
"prefer-rest-params": "error", | ||
"prefer-spread": "error", | ||
"radix": [ "error", "as-needed" ], | ||
"require-await": "error", | ||
"rest-spread-spacing": [ "error", "never" ], | ||
"react/prop-types": "off", // Should be enabled. | ||
"react-hooks/exhaustive-deps": [ "off", { "additionalHooks": "useSelect" } ], | ||
"react/jsx-closing-tag-location": "error", | ||
"react/jsx-fragments": "error", | ||
"react/self-closing-comp": "error", | ||
"react/jsx-first-prop-new-line": "error", | ||
"react/jsx-no-literals": "off", // Should be enabled. | ||
"react/jsx-no-useless-fragment": "off", // Should be enabled. | ||
"import/order": [ "error", { "groups": [ "builtin", [ "external", "unknown" ], "internal", "parent", "sibling", "index" ] } ], | ||
"func-style": ["error", "expression"] | ||
} | ||
} |
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,22 @@ | ||
### Description | ||
<!-- Please describe what you have changed or added --> | ||
|
||
### Screenshots | ||
<!-- if applicable --> | ||
|
||
### Types of changes | ||
<!-- What types of changes does your code introduce? --> | ||
<!-- Bug fix (non-breaking change which fixes an issue) --> | ||
<!-- New feature (non-breaking change which adds functionality) --> | ||
<!-- Breaking change --> | ||
|
||
### How has this been tested? | ||
<!-- Please describe in detail how you tested your changes. --> | ||
|
||
### Checklist: | ||
- [ ] My code is tested | ||
- [ ] My code follows accessibility standards <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/accessibility-coding-standards/ --> | ||
- [ ] My code has proper inline documentation <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/ --> | ||
- [ ] I've included any necessary tests <!-- if applicable --> | ||
- [ ] I've included developer documentation <!-- if applicable --> | ||
- [ ] I've added proper labels to this pull request <!-- if applicable --> |
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,65 @@ | ||
name: CI | ||
|
||
# Run the deployment only when code is committed to the branch. | ||
on: pull_request | ||
|
||
# Cancels all previous workflow runs for pull requests that have not completed. | ||
concurrency: | ||
# The concurrency group contains the workflow name and the branch name for pull requests | ||
# or the commit hash for any other events. | ||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint-and-audit: | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
token: ${{ secrets.PRIVATE_ACCESS_TOKEN }} | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- name: Use Node.js 12.x | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 12.x | ||
cache: 'npm' | ||
|
||
- name: Set composer token | ||
run: composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} | ||
|
||
- name: Composer Install | ||
uses: ramsey/composer-install@v1 | ||
|
||
- name: NPM Dependencies | ||
if: always() | ||
run: npm install | ||
|
||
- name: PHPCS check | ||
if: always() | ||
uses: chekalsky/phpcs-action@v1 | ||
with: | ||
phpcs_bin_path: './vendor/bin/phpcs' | ||
|
||
- name: PHP Syntax Errors | ||
if: always() | ||
run: if find . -name "*.php" ! -path "./vendor/*" ! -path "./admin/bsf-core/*" -exec php -l {} \; | grep "Errors parsing"; then exit 1; fi | ||
|
||
- name: Lint JS | ||
if: always() | ||
run: npm run lint:js:fix | ||
|
||
- name: Commit ESLint fixes | ||
if: always() | ||
uses: EndBug/[email protected] | ||
with: | ||
add: 'src/*.js' | ||
default_author: github_actor | ||
message: 'Commit ESLint auto fixes' | ||
pathspec_error_handling: exitAtEnd | ||
push: true | ||
|
||
|
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,36 @@ | ||
name: PR update | ||
|
||
on: | ||
pull_request: | ||
types: [ labeled ] | ||
|
||
jobs: | ||
update_pr: | ||
name: PR update | ||
if: ${{ github.event.label.name == 'Release PR checklist' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check Branch | ||
id: check-branch | ||
run: | | ||
if [[ ${{ github.base_ref }} == master || ${{ github.base_ref }} == release-candidate || ${{ github.base_ref }} == next-release ]]; then | ||
echo ::set-output name=match::true | ||
fi | ||
- uses: tzkhan/pr-update-action@v2 | ||
if: steps.check-branch.outputs.match == 'true' | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
base-branch-regex: '[A-Za-z\d-_.\\/]+' | ||
head-branch-regex: '[A-Za-z\d-_.\\/]+' | ||
title-template: 'Build: Release PR' | ||
body-template: | | ||
### Description | ||
- Final release PR. Please check all the checklist below before merging. | ||
--- | ||
### Checklist: | ||
- [ ] Run to update packages : `npm audit fix` | ||
- [ ] PHPCS - vendor/bin/phpcs | ||
--- | ||
body-update-action: 'prefix' | ||
title-update-action: 'prefix' | ||
body-uppercase-base-match: 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
node_modules | ||
/node_modules | ||
|
||
build | ||
/vendor/ |
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,3 @@ | ||
/src | ||
.babelrc | ||
webpack.config.js |
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "brainstormforce/starter-templates-components", | ||
"description": "Starter Templates Component Library.", | ||
"require-dev": { | ||
"dealerdirect/phpcodesniffer-composer-installer": "0.7.1", | ||
"phpcompatibility/phpcompatibility-wp": "*", | ||
"wp-coding-standards/wpcs": "dev-master" | ||
}, | ||
"scripts": { | ||
"format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source", | ||
"lint": "phpcs --standard=phpcs.xml.dist --report-summary --report-source" | ||
} | ||
} | ||
|
Oops, something went wrong.