File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 50
50
51
51
- name : Lint
52
52
run : npm run lint
53
-
54
- - name : PHPStan
55
- run : composer analyze
Original file line number Diff line number Diff line change 1
1
module . exports = {
2
- "composer.*" : ( ) => "vendor/bin/ composer-normalize " ,
2
+ "composer.*" : ( ) => "npm run lint: composer" ,
3
3
"package.json" : [
4
4
"npm run lint:pkg-json"
5
5
] ,
@@ -9,5 +9,5 @@ module.exports = {
9
9
"**/*.php" : [
10
10
"npm run lint:php" ,
11
11
] ,
12
- '*.php' : ( ) => 'composer analyze '
12
+ '*.php' : ( ) => 'npm run lint:phpstan '
13
13
} ;
Original file line number Diff line number Diff line change 2
2
# Wrap phpcbf to turn 1 success exit code into 0 code.
3
3
# See https://github.com/squizlabs/PHP_CodeSniffer/issues/1818#issuecomment-354420927
4
4
5
- root=$( dirname " $0 " ) /..
6
-
7
- " $root /vendor/bin/phpcbf" $@
5
+ composer exec phpcbf $@
8
6
exit=$?
9
7
10
8
# Exit code 1 is used to indicate that all fixable errors were fixed correctly.
Original file line number Diff line number Diff line change 39
39
},
40
40
"scripts" : {
41
41
"analyze" : " if [ -z $TEST_SKIP_PHPSTAN ]; then phpstan --version; phpstan analyze --ansi; fi" ,
42
+ "normalize" : " composer-normalize" ,
42
43
"phpcs" : " phpcs" ,
44
+ "phpcbf" : " bin/phpcbf.sh" ,
43
45
"zip" : " git archive --format=zip HEAD > syntax-highlighting-code-block.zip && unzip -l syntax-highlighting-code-block.zip"
44
46
}
45
47
}
Original file line number Diff line number Diff line change 53
53
"check-licenses" : " wp-scripts check-licenses" ,
54
54
55
55
"lint" : " npm-run-all --parallel lint:*" ,
56
+ "lint:composer" : " composer normalize --dry-run" ,
57
+ "lint:composer:fix" : " composer normalize" ,
56
58
"lint:css" : " wp-scripts lint-style" ,
57
59
"lint:css:fix" : " npm run lint:css -- --fix" ,
58
60
"lint:js" : " wp-scripts lint-js" ,
59
61
"lint:js:fix" : " wp-scripts lint-js --fix" ,
60
62
"lint:js:report" : " npm run lint:js -- --output-file lint-js-report.json --format json ." ,
61
- "lint:php" : " vendor/bin/phpcs" ,
62
- "lint:php:fix" : " ./bin/phpcbf.sh" ,
63
+ "lint:php" : " composer phpcs" ,
64
+ "lint:php:fix" : " composer phpcbf" ,
65
+ "lint:phpstan" : " composer analyze" ,
63
66
"lint:pkg-json" : " wp-scripts lint-pkg-json . --ignorePath .gitignore" ,
64
67
"start" : " wp-scripts start src/index.js src/customize-controls.js --output-path=build" ,
65
68
"update-wordpress-packages" : " npm install --save-dev --save-exact $(npm outdated --parseable | cut -d':' -f 4 | grep @wordpress)" ,
You can’t perform that action at this time.
0 commit comments