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
33 changes: 0 additions & 33 deletions .eslintrc

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/quality-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ jobs:
uses: actions/checkout@v3

- name: Setup NodeJS
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version-file: 'package.json'
cache: 'npm'

- name: Install npm dependencies
run: npm ci
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,17 @@ jobs:
- id: set-vars
name: "Set variable from .plugin-data file"
run: |
# Get all data from .plugin-data file
content=`cat ./.plugin-data`
# the following lines are only required for multi line json
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
# end of optional handling for multi line json
echo "::set-output name=pluginData::$content"
{
echo 'pluginData<<EOF'
cat ./.plugin-data
echo 'EOF'
} >> "$GITHUB_OUTPUT"

- id: check-version
name: "Check version does not exists"
run: |
# Get the version from .plugin-data file.
VERSION=${{fromJson(steps.set-vars.outputs.pluginData).version}}
VERSION=${{ fromJson(steps.set-vars.outputs.pluginData).version }}

echo "Get Branch tag"
if git rev-parse "$VERSION" >/dev/null 2>&1; then
Expand All @@ -40,10 +37,11 @@ jobs:

- id: build-node
name: Setup NodeJS
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version-file: 'package.json'
- run: npm install
cache: 'npm'
- run: npm ci
- run: npm run build

- id: build-php
Expand All @@ -57,7 +55,7 @@ jobs:
name: "Commit and push new TAG"
run: |
# Get the version from .plugin-data file.
VERSION=${{fromJson(steps.set-vars.outputs.pluginData).version}}
VERSION=${{ fromJson(steps.set-vars.outputs.pluginData).version }}

echo "Copy .distignore to .gitignore"
cp .distignore .gitignore
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version-file: 'package.json'
cache: 'npm'
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version-file: 'package.json'
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version-file: 'package.json'
cache: 'npm'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version-file: 'package.json'
cache: 'npm'
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version-file: 'package.json'
cache: 'npm'
Expand Down
35 changes: 35 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const defaultConfig = require( '@wordpress/scripts/config/eslint.config.cjs' );
const globals = require( 'globals' );

module.exports = [
...defaultConfig,
{
files: [ 'tests/js/**/*.js' ],
languageOptions: {
globals: {
...globals.browser,
},
},
settings: {
jsdoc: {
tagNamePreference: {
'jest-environment': 'jest-environment',
},
},
},
rules: {
'jsdoc/check-tag-names': [
'error',
{
definedTags: [ 'jest-environment' ],
},
],
},
},
{
files: [ 'tests/playwright/**/*.js' ],
rules: {
'jsdoc/check-tag-names': 'off',
},
},
];
Loading
Loading