Skip to content

Commit db84756

Browse files
committed
chore: sync linter and settings
1 parent 77889ae commit db84756

File tree

13 files changed

+208
-249
lines changed

13 files changed

+208
-249
lines changed

.eslintrc.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@
6666
}
6767
],
6868
"no-shadow": "error",
69-
"@typescript-eslint/no-shadow": [
70-
"error"
71-
],
69+
"@typescript-eslint/no-shadow": "error",
70+
"@typescript-eslint/ban-ts-comment": "off",
7271
"camelcase": "off",
7372
"jsdoc/valid-types": "off",
7473
"@typescript-eslint/no-unused-vars": [
@@ -92,7 +91,8 @@
9291
"allowArrayStart": true,
9392
"allowArrayEnd": true
9493
}
95-
]
94+
],
95+
"jsdoc/require-returns-description": "off"
9696
},
9797
"overrides": [
9898
{

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
composer.lock
2+
yarn.lock
3+
14
# Logs
25
logs
36
*.log
@@ -32,5 +35,3 @@ release/*
3235
*.sw?
3336

3437
/vendor/
35-
36-
composer.lock

.prettierrc

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
{
2-
"arrowParens": "always",
3-
"bracketSpacing": true,
4-
"parenSpacing": true,
5-
"printWidth": 80,
6-
"semi": false,
7-
"singleQuote": true,
8-
"tabWidth": 2,
9-
"trailingComma": "all",
10-
"useTabs": true,
11-
"endOfLine": "auto",
12-
"multilineArraysWrapThreshold": 4,
13-
"plugins": [
14-
"eslint-plugin-prettier",
15-
"prettier-plugin-multiline-arrays"
16-
],
17-
"overrides": [
18-
{
19-
"files": [
20-
"*.json"
21-
],
22-
"options": {
23-
"singleQuote": false
24-
}
25-
},
26-
{
27-
"files": [
28-
"*.yaml",
29-
"*.yml"
30-
],
31-
"options": {
32-
"singleQuote": false,
33-
"tabWidth": 2,
34-
"useTabs": false
35-
}
36-
}
37-
]
38-
}
2+
"arrowParens": "always",
3+
"bracketSpacing": true,
4+
"parenSpacing": true,
5+
"printWidth": 80,
6+
"semi": false,
7+
"singleQuote": true,
8+
"tabWidth": 2,
9+
"trailingComma": "all",
10+
"useTabs": true,
11+
"endOfLine": "auto",
12+
"multilineArraysWrapThreshold": 4,
13+
"plugins": [
14+
"eslint-plugin-prettier",
15+
"prettier-plugin-multiline-arrays"
16+
],
17+
"overrides": [
18+
{
19+
"files": [
20+
"*.json"
21+
],
22+
"options": {
23+
"singleQuote": false
24+
}
25+
},
26+
{
27+
"files": [
28+
"*.yaml",
29+
"*.yml"
30+
],
31+
"options": {
32+
"singleQuote": false,
33+
"tabWidth": 2,
34+
"useTabs": false
35+
}
36+
}
37+
]
38+
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"require": {
3232
"kucrut/vite-for-wp": "^0.8.0",
33-
"j7-dev/wp-utils": "0.2.9"
33+
"j7-dev/wp-utils": "0.3.4"
3434
},
3535
"require-dev": {
3636
"squizlabs/php_codesniffer": "@stable",

js/dist/vite-dev-server.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"base":"/","origin":"http://localhost:5173","port":5173,"plugins":["vite:react-refresh"]}

js/src/assets/scss/custom.scss

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
// 定義動畫
3+
@keyframes fadeOut {
4+
0% {
5+
opacity: 1;
6+
}
7+
100% {
8+
opacity: 0;
9+
display: none;
10+
}
11+
}
12+
13+
@keyframes fadeIn {
14+
0% {
15+
opacity: 0;
16+
display: block;
17+
}
18+
100% {
19+
opacity: 1;
20+
}
21+
}
22+
23+
// block_to_hidden class
24+
.block-to-hidden {
25+
animation-name: fadeOut;
26+
animation-fill-mode: forwards; // 讓動畫結束時保持最終狀態
27+
animation-duration: 2s;
28+
}
29+
30+
// hidden_to_block class
31+
.hidden-to-block {
32+
animation-name: fadeIn;
33+
animation-fill-mode: forwards; // 讓動畫結束時保持最終狀態
34+
animation-duration: 2s;
35+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "create-wp-refine-plugin",
33
"private": false,
4-
"version": "4.0.1",
4+
"version": "4.0.2",
55
"type": "module",
66
"scripts": {
77
"bootstrap": "yarn install && composer install --no-interaction",

phpcs.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@
4747
<exclude name="Universal.Operators.DisallowShortTernary.Found"/>
4848
<exclude name="PEAR.Functions.FunctionCallSignature.Indent"/>
4949
<exclude name="Squiz.Commenting.FunctionComment.ThrowsNoFullStop"/>
50+
<exclude name="Universal.Classes.RequireFinalClass.NonFinalClassFound"/>
51+
<exclude name="Squiz.Commenting.FunctionComment.MissingParamName"/>
52+
<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag"/>
53+
<exclude name="WordPress.PHP.NoSilencedErrors.Discouraged"/>
54+
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment"/>
5055
</rule>
5156

5257
<exclude-pattern>.idea/*</exclude-pattern>

phpmd.xml

Lines changed: 0 additions & 116 deletions
This file was deleted.

phpstan.neon

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
parameters:
2-
level: 6
2+
level: 9
33
paths:
44
- plugin.php
55
- inc/
66
ignoreErrors:
7+
- '#Access to constant .* on an unknown class#'
78
- '#Constant .* not found#'
9+
- '#Function .* not found#'
10+
- '#Cannot cast mixed to .*#'
11+
- '#Using nullsafe method call on non-nullable type .*#'
812
excludePaths:
913
- js/*
1014
- vendor/*
1115
- node_modules/*
1216
bootstrapFiles:
1317
- vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
1418
- vendor/php-stubs/woocommerce-stubs/woocommerce-stubs.php
19+
- ../powerhouse/plugin.php

0 commit comments

Comments
 (0)