Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

19 changes: 16 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# 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/
# https://developer.wordpress.org/coding-standards/wordpress-coding-standards/

root = true

Expand All @@ -10,9 +13,19 @@ insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[{.babelrc,.eslintrc,.rtlcssrc,*.json,*.yml}]
indent_style = space
[*.json]
indent_size = 2

[*.md]
trim_trailing_whitespace = false
indent_style = space
indent_size = 2

[*.txt]
trim_trailing_whitespace = false

[*.{yml,yaml}]
insert_final_newline = false
quote_type = single
indent_style = space
indent_size = 2
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**/*.min.js
**/node_modules/**
**/vendor/**
build/*
**/build/**
36 changes: 0 additions & 36 deletions .eslintrc

This file was deleted.

78 changes: 78 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"root": true,
"extends": [
"plugin:@wordpress/eslint-plugin/recommended-with-formatting",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:eslint-comments/recommended"
],
"plugins": [],
"env": {
"browser": true
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"globals": {
"_": true,
"OneUpdateSettings": true,
"OneUpdatePlugins": true,
"OneUpdateS3ZipUploader": true,
"OneUpdatePullRequests": true
},
"rules": {
"eslint-comments/no-unlimited-disable": "error",
"@wordpress/no-unsafe-wp-apis": "warn",
"jsdoc/check-indentation": "error",
"no-shadow": "warn",
/* WordPress surfaces snake_case keys and globals; allow them */
"camelcase": "off"
},
"overrides": [
{
"files": ["**/*.{ts,tsx}"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": { "jsx": true },
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint"],
"rules": {
"no-undef": "off",
"no-unused-vars": "off",
"no-shadow": "off",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-shadow": "warn",
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
"@typescript-eslint/no-unused-vars": "error"
}
},
{
"files": ["**/*.d.ts"],
"parser": "@typescript-eslint/parser",
"rules": {
"no-undef": "off",
"import/no-unresolved": "off",
"@typescript-eslint/triple-slash-reference": "off"
}
},
{
"files": [
"**/__tests__/**/*.js",
"**/test/*.js",
"**/?(*.)test.js",
"tests/js/**/*.js"
],
"extends": ["plugin:jest/all"],
"rules": {
// Add Rules for Jest here
}
}
]
}
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,3 @@ If you can't do everything, that's okay too.
- [ ] My code passes all lints (ESLint etc.).
- [ ] My code has detailed inline documentation.
- [ ] I have updated the project documentation as needed.
- [ ] I have added a changeset for this PR using `npm run changeset`.
57 changes: 57 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "Copilot Setup Steps"

# Automatically run the setup steps when they are changed to allow for easy validation, and
# allow manual testing through the repository's "Actions" tab
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml

jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
persist-credentials: false

##
# This allows Composer dependencies to be installed using a single step.
#
# Since the tests are currently run within the Docker containers where the PHP version varies,
# the same PHP version needs to be configured for the action runner machine so that the correct
# dependency versions are installed and cached.
##
- name: Set up PHP
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
with:
php-version: "8.3"
coverage: none

- name: Install Composer dependencies
uses: ramsey/composer-install@a2636af0004d1c0499ffca16ac0b4cc94df70565 # v3.1.0

- name: Setup Node
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5.0.0
with:
cache: "npm"
node-version-file: ".nvmrc"

- name: Install NPM dependencies
run: npm ci
env:
CI: true

- name: Build assets for development
run: npm run build:dev
21 changes: 0 additions & 21 deletions .github/workflows/phpcs_on_pull_request.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Upload Package on Release
permissions:
contents: write

# 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

on:
release:
types: [published]

jobs:
tag:
name: Upload New Release
runs-on: ubuntu-24.04

steps:
- name: Checkout repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
persist-credentials: false

- name: Set up PHP
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
with:
php-version: "8.3"
coverage: none
tools: composer:v2

- name: Install Composer dependencies
uses: ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520 # v3.1.1

- name: Setup Node
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5.0.0
with:
cache: "npm"
node-version-file: ".nvmrc"

- name: Install NPM dependencies
run: npm ci
env:
CI: true

- name: Build JavaScript assets
run: npm run build:prod

- name: Create Artifact
run: |
npm run plugin-zip

- name: Upload artifact
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: oneupdate
path: oneupdate.zip

- name: Upload release asset
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
with:
files: oneupdate.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69 changes: 0 additions & 69 deletions .github/workflows/release_on_tag.yml

This file was deleted.

Loading
Loading