diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8a20e6c..bdf8ca8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,10 +23,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v7 with: node-version-file: .nvmrc cache: npm diff --git a/.zed/settings.json b/.zed/settings.json new file mode 100644 index 0000000..f5e0cba --- /dev/null +++ b/.zed/settings.json @@ -0,0 +1,114 @@ +{ + "language_servers": ["!biome"], + "prettier": { + "require_config": true + }, + "languages": { + "PHP": { + "language_servers": ["intelephense", "!phpactor", "..."] + }, + "JavaScript": { + "language_servers": ["eslint", "!biome"], + "format_on_save": "on", + "code_actions_on_format": { + "source.fixAll.biome": false, + "source.organizeImports.biome": false + }, + "formatter": [ + { "code_action": "source.fixAll.eslint" }, + "prettier" + ] + }, + "TypeScript": { + "language_servers": ["eslint", "!biome"], + "format_on_save": "on", + "code_actions_on_format": { + "source.fixAll.biome": false, + "source.organizeImports.biome": false + }, + "formatter": [ + { "code_action": "source.fixAll.eslint" }, + "prettier" + ] + }, + "TSX": { + "language_servers": ["eslint", "!biome"], + "format_on_save": "on", + "code_actions_on_format": { + "source.fixAll.biome": false, + "source.organizeImports.biome": false + }, + "formatter": [ + { "code_action": "source.fixAll.eslint" }, + "prettier" + ] + }, + "JSON": { + "language_servers": ["!biome"], + "format_on_save": "on", + "code_actions_on_format": { + "source.fixAll.biome": false, + "source.organizeImports.biome": false + }, + "formatter": "prettier" + }, + "CSS": { + "language_servers": ["stylelint-lsp", "!biome"], + "format_on_save": "on", + "code_actions_on_format": { + "source.fixAll.stylelint": true + } + }, + "SCSS": { + "language_servers": ["stylelint-lsp", "!biome"], + "format_on_save": "on", + "code_actions_on_format": { + "source.fixAll.stylelint": true + } + } + }, + "lsp": { + "biome": { + "settings": { + "require_config_file": true + } + }, + "intelephense": { + "settings": { + "environment": { + "phpVersion": "7.4.0" + }, + "stubs": [ + "wordpress", + "wordpress-globals", + "Core", + "standard", + "date", + "json", + "mbstring" + ], + "files": { + "maxSize": 5000000, + "exclude": [ + "**/.git/**", + "**/node_modules/**", + "**/vendor/**", + "**/build/**" + ] + } + } + }, + "eslint": { + "settings": { + "workingDirectory": { "mode": "auto" } + } + }, + "stylelint-lsp": { + "settings": { + "stylelint": { + "validate": ["css", "scss"] + } + } + } + } +} diff --git a/composer.json b/composer.json index 5ab7231..73657f1 100644 --- a/composer.json +++ b/composer.json @@ -74,6 +74,7 @@ ".github", "/.github/**", ".vscode", + ".zed", "/dist", "/dist/**", "build-dev", @@ -90,6 +91,8 @@ ".prettierignore", ".editorconfig", ".prettierrc.js", + ".eslint.config.js", + "mise.toml", ".nvmrc", ".wp-env.json", ".wp-env.override.json", diff --git a/eslint.config.cjs b/eslint.config.cjs new file mode 100644 index 0000000..c1b7018 --- /dev/null +++ b/eslint.config.cjs @@ -0,0 +1 @@ +module.exports = require( '@wordpress/scripts/config/eslint.config.cjs' ); diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..bcfdf8c --- /dev/null +++ b/mise.toml @@ -0,0 +1,10 @@ +[plugins] +php = "https://github.com/verzly/mise-php#latest" + +[tools] +node = "20.20.2" +php = "8.4" + +[env] +# Prebuilt static binaries (Composer is bundled per PHP version by verzly/mise-php). +_.php = { prebuilt_static = true }