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
24 changes: 12 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# https://editorconfig.org
root = true

[*]
end_of_line = lf
charset = utf-8
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 80
trim_trailing_whitespace = true

[*.{js,json,mjs,cjs,ts,yml,xml,dist}]
indent_style = space
indent_size = 2
[*.{php,html}]
indent_style = tab
indent_size = 4

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

[*.{scss,sass,css}]
indent_style = space
indent_size = 2
[COMMIT_EDITMSG]
max_line_length = 0
34 changes: 34 additions & 0 deletions .github/workflows/typescript-code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: TypeScript Code Quality

on:
push:
branches:
- master
pull_request:
branches:
- master

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
quality:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v5
with:
persist-credentials: false

- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: 2.3.15

- name: Run Biome
run: biome ci .
6 changes: 0 additions & 6 deletions .lintstagedrc.json

This file was deleted.

4 changes: 1 addition & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"recommendations": [
"swordev.phpstan"
]
"recommendations": ["biomejs.biome", "swordev.phpstan"]
}
28 changes: 14 additions & 14 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@
"package-lock.json": true
},
"editor.formatOnSave": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.format.enable": true,
"editor.defaultFormatter": "biomejs.biome",
// Force .css files to be recognized as CSS (not PostCSS) so Biome formatter works correctly
"files.associations": {
"*.css": "css"
},
"editor.codeActionsOnSave": {
"source.addMissingImports": "explicit",
"source.fixAll": "explicit"
"source.fixAll.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"[javascript][javascriptreact][typescript][typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome"
},
"[json][jsonc]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "biomejs.biome"
},
"[css][scss][postcss]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome"
},
// "[css][scss]": {
// "editor.formatOnSave": false,
// "editor.defaultFormatter": "esbenp.prettier-vscode"
// },
"css.validate": false,
"scss.validate": false,
// Add support for nested project structure.
"eslint.nodePath": "nextjs/node_modules",
"eslint.workingDirectories": ["./nextjs", "./static"],
"vitest.enable": true,
"phpsab.executablePathCS": "./vendor/squizlabs/php_codesniffer/bin/phpcs",
"phpsab.executablePathCBF": "./vendor/squizlabs/php_codesniffer/bin/phpcbf",
"phpsab.autoRulesetSearch": true,
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ WP Tag Order is a WordPress plugin that enables drag-and-drop ordering of tags (

### Code Standards
- **PHP**: WordPress Coding Standards (WPCS), PHPStan analysis
- **JavaScript/TypeScript**: ESLint with Airbnb config
- **JavaScript/TypeScript**: Biome
- **CSS**: StyleLint

## Key APIs
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WP Tag Order

[![Plugin Check](https://github.com/sectsect/wp-tag-order/actions/workflows/plugin-check.yml/badge.svg)](https://github.com/sectsect/wp-tag-order/actions/workflows/plugin-check.yml) [![PHP Unit Tests](https://github.com/sectsect/wp-tag-order/actions/workflows/phpunit.yml/badge.svg)](https://github.com/sectsect/wp-tag-order/actions/workflows/phpunit.yml) [![PHPStan](https://github.com/sectsect/wp-tag-order/actions/workflows/phpstan.yml/badge.svg)](https://github.com/sectsect/wp-tag-order/actions/workflows/phpstan.yml) [![PHP Coding Standards](https://github.com/sectsect/wp-tag-order/actions/workflows/phpcs.yml/badge.svg)](https://github.com/sectsect/wp-tag-order/actions/workflows/phpcs.yml) [![CodeQL](https://github.com/sectsect/wp-tag-order/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/sectsect/wp-tag-order/actions/workflows/github-code-scanning/codeql)
[![Plugin Check](https://github.com/sectsect/wp-tag-order/actions/workflows/plugin-check.yml/badge.svg)](https://github.com/sectsect/wp-tag-order/actions/workflows/plugin-check.yml) [![PHP Unit Tests](https://github.com/sectsect/wp-tag-order/actions/workflows/phpunit.yml/badge.svg)](https://github.com/sectsect/wp-tag-order/actions/workflows/phpunit.yml) [![PHPStan](https://github.com/sectsect/wp-tag-order/actions/workflows/phpstan.yml/badge.svg)](https://github.com/sectsect/wp-tag-order/actions/workflows/phpstan.yml) [![PHP Coding Standards](https://github.com/sectsect/wp-tag-order/actions/workflows/phpcs.yml/badge.svg)](https://github.com/sectsect/wp-tag-order/actions/workflows/phpcs.yml) [![TypeScript Code Quality](https://github.com/sectsect/wp-tag-order/actions/workflows/typescript-code-quality.yml/badge.svg)](https://github.com/sectsect/wp-tag-order/actions/workflows/typescript-code-quality.yml) [![CodeQL](https://github.com/sectsect/wp-tag-order/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/sectsect/wp-tag-order/actions/workflows/github-code-scanning/codeql)

### Order tags independently in each posts (not site-globally) on WordPress with simple Drag-and-Drop ↕︎ sortable feature.

Expand Down
172 changes: 172 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.15/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": true,
"includes": [
"**",
"!assets",
"src/assets/**",
"!dist",
"!node_modules",
"!vendor"
]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noUnknownAtRules": "off",
"noConsole": {
"level": "warn",
"options": {
"allow": ["warn", "error"]
}
},
"noEvolvingTypes": "error"
},
"nursery": {
"noUnnecessaryConditions": "error",
"noFloatingPromises": "error",
// "noLeakedRender": "error",
"noMisusedPromises": "error",
"noImportCycles": "warn",
"noNestedPromises": "error",
"noShadow": "warn",
"useFind": "error",
"useArraySortCompare": "error",
"useAwaitThenable": "error",
"useErrorCause": "warn",
"noUselessReturn": {
"level": "error",
"fix": "safe"
},
"noUselessUndefined": {
"level": "error",
"fix": "safe"
},
"useSortedClasses": {
"fix": "safe",
"level": "error",
"options": {
"functions": ["twMerge", "tailwindClass", "cn"]
}
}
},
"style": {
"useConsistentArrayType": "error",
"useNamingConvention": {
"level": "error",
"options": {
"strictCase": false,
"conventions": [
{
"selector": {
"kind": "function"
},
"formats": ["camelCase", "CONSTANT_CASE"]
},
{
"selector": {
"kind": "variable"
},
"formats": ["camelCase", "PascalCase", "CONSTANT_CASE"]
},
{
"selector": {
"kind": "objectLiteralProperty"
},
"match": "_*(.+)",
"formats": [
"camelCase",
"PascalCase",
"CONSTANT_CASE",
"snake_case"
]
},
{
"selector": {
"kind": "typeProperty"
},
"match": "_*(.+)",
"formats": ["camelCase", "PascalCase", "snake_case"]
},
{
"selector": {
"kind": "typeLike"
},
"formats": ["PascalCase"]
}
]
}
},
"noNestedTernary": "error",
"noYodaExpression": "error"
},
"complexity": {
"useSimplifiedLogicExpression": "error",
"noExcessiveCognitiveComplexity": {
"level": "warn",
"options": {
"maxAllowedComplexity": 15
}
}
},
"security": {
"noDangerouslySetInnerHtml": "off"
}
},
"domains": {
"project": "recommended"
// "next": "recommended",
// "react": "recommended"
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"arrowParentheses": "asNeeded",
"trailingCommas": "all"
}
},
"css": {
"parser": {
"tailwindDirectives": true,
"cssModules": true
},
"formatter": {
"enabled": true,
"quoteStyle": "single"
}
},
"assist": {
"actions": {
"source": {
"organizeImports": {
"level": "on",
"options": {
"groups": [
{ "type": false, "source": ["react", "react-dom", "react/**"] },
":BLANK_LINE:",
{ "type": false, "source": ":PACKAGE:" },
":BLANK_LINE:",
{ "type": false, "source": ":PATH:" },
":BLANK_LINE:",
{ "type": true }
]
}
}
}
}
}
}
1 change: 0 additions & 1 deletion commitlint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ const configuration: UserConfig = {
extends: ['@commitlint/config-conventional'],
};

// eslint-disable-next-line import/no-default-export
export default configuration;
8 changes: 1 addition & 7 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
{
"name": "sectsect/wp-tag-order",
"description": "Sort the tags manually in individual posts on wordpress.",
"keywords": [
"github",
"wordpress",
"plugin",
"tags",
"order"
],
"keywords": ["github", "wordpress", "plugin", "tags", "order"],
"type": "wordpress-plugin",
"require": {
"php": ">=8.0"
Expand Down
Loading
Loading