Skip to content

Commit 68ec056

Browse files
committed
Add config files, docs, and test placeholders; rename configs
Introduces standard configuration files for linting, formatting, and environment management (.editorconfig, .browserslistrc, .eslintignore, .prettierignore, .npmrc, .nvmrc, etc.), as well as documentation for agents and global rules. Moves and renames config files to use .cjs extensions for ESLint, Jest, Playwright, PostCSS, Stylelint, and Webpack. Adds placeholder E2E and unit test files. Improves project structure and standardisation.
1 parent 7447acc commit 68ec056

24 files changed

+509
-6
lines changed

.browserslistrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
>0.5%
2+
last 2 versions
3+
not dead
4+
extends @wordpress/browserslist-config

.editorconfig

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
root = true
3+
4+
# Unix-style
5+
newlines with a newline ending every file
6+
[*]
7+
charset = utf-8
8+
end_of_line =
9+
lf
10+
insert_final_newline = true
11+
charset = utf-8
12+
indent_style = space
13+
indent_size =
14+
2
15+
trim_trailing_whitespace = true
16+
17+
# 4 space indentation for PHP
18+
files
19+
[*.php]
20+
indent_style = tab
21+
indent_size = 4
22+
23+
# 2 space indentation for JS
24+
files
25+
[*.js]
26+
indent_size = 2
27+
28+
# 2 space indentation for CSS and SCSS
29+
files
30+
[*.{css,scss}]
31+
indent_size = 2
32+
tab_width = 2
33+
34+
# 2 space indentation for JSON files
35+
[*.json]
36+
indent_size =
37+
2
38+
indent_style = space
39+
tab_width = 2
40+
41+
# 2 space indentation for YAML
42+
files
43+
[*.{yml,yaml}]
44+
indent_size = 2
45+
indent_style = space
46+
tab_width = 2
47+
48+
# Markdown
49+
files
50+
[*.md]
51+
max_line_length = off
52+
trim_trailing_whitespace = false

eslint.config.js renamed to .eslint.config.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ module.exports = {
3636
},
3737
},
3838
],
39-
};
39+
};

.eslintignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Ignore files and directories that should not be formatted by Eslint
2+
3+
# Node
4+
modules
5+
node_modules
6+
7+
# Build directories
8+
build
9+
dist
10+
11+
# Log files
12+
13+
# Vendor
14+
directories
15+
vendor
16+
17+
# Test directories
18+
coverage
19+
playwright-report
20+
test-results

.gitattributes

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/.github export-ignore
2+
/.idea/ export-ignore
3+
/.npm/
4+
export-ignore
5+
/.sass-cache/ export-ignore
6+
/.vscode/
7+
export-ignore
8+
/docs/ export-ignore
9+
/tests/
10+
export-ignore
11+
/vendor/ export-ignore
12+
/node_modules/
13+
export-ignore
14+
/.gitattributes export-ignore
15+
/.gitignore export-ignore
16+
/.editorconfig
17+
export-ignore
18+
/cli.php export-ignore
19+
/*.md
20+
export-ignore
21+
/phpcs.xml.dist export-ignore
22+
/phpunit.xml.dist
23+
export-ignore
24+
/LICENSE.md -export-ignore
25+
/README.md
26+
-export-ignore
27+
/composer.json export-ignore
28+
/composer.lock
29+
export-ignore
30+
/package.json export-ignore
31+
/package-lock.json
32+
export-ignore
33+
/yarn.lock export-ignore
34+
/.styleci.yml
35+
export-ignore
36+
/.travis.yml export-ignore
37+
/.scrutinizer.yml
38+
export-ignore
39+
/.codeclimate.yml export-ignore
40+
/.php_cs.dist
41+
export-ignore
42+
/.php-cs-fixer.dist.php export-ignore
43+
/.htaccess export-ignore
44+
/web.config
45+
export-ignore
46+
/.phpstorm.meta.php export-ignore
47+
/.DS_Store
48+
export-ignore
49+
/.env.example export-ignore
50+
*.zip export-ignore
51+
* text=auto
52+
eol=lf
53+
*.lock text
54+
*.bat text eol=crlf

.github/agents/agent.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Single Block WP Plugin — Primary Agent
2+
3+
- **Agent:**
4+
`wp-block-build-agent.js`
5+
- **Workflow:** `.github/workflows/block-build-and-e2e.yml`
6+
- **Purpose:**
7+
Automate a common, repeatable quality task for this repository type.
8+
- **Usage:**
9+
10+
- GitHub Actions: see the workflow file for triggers and env.
11+
- Local: `node
12+
.github/agents/wp-block-build-agent.js`
13+
- **Environment variables:**
14+
-
15+
`DRY_RUN` (default: `false`), `VERBOSE` (default: `false`)
16+
- Additional secrets per
17+
workflow (e.g. `GITHUB_TOKEN` for label ops).
18+
- **Maintenance:** Keep the agent
19+
aligned with repo tooling (linters, build, tests).
File renamed without changes.
File renamed without changes.

.github/instructions/theme-json-validation.instructions.md

Whitespace-only changes.
File renamed without changes.

0 commit comments

Comments
 (0)