Skip to content

Commit 98486d7

Browse files
authored
Merge pull request #79 from WordPress/use-wordpress-scripts
Use `@wordpress/scripts` for linting and testing
2 parents 5c72366 + 3aad308 commit 98486d7

File tree

3 files changed

+37
-20
lines changed

3 files changed

+37
-20
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
language: node_js
22
node_js:
3-
- '8'
4-
- '9'
53
- '10'
64
- '11'
75
- '12'

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,6 @@ Please follow the [WordPress coding standards](https://make.wordpress.org/core/h
9595
- 0.4.1 - Remove Mocha as a peerdendency
9696
- 0.4.2 - set `cmd-diff` to `diff` for svn
9797
- 1.0.0 - Add filemapping option. Bump minimum node version. Change code style. Update tooling.
98+
99+
### Unreleased
100+
- Bump minimium node version to 10.

package.json

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
11
{
22
"name": "grunt-patch-wordpress",
3-
"description": "Patch your core WordPress",
43
"version": "1.0.0",
5-
"homepage": "https://github.com/wordpress/grunt-patch-wordpress",
4+
"description": "Patch your core WordPress",
65
"author": {
76
"name": "Aaron Jorbin",
87
"email": "[email protected]",
98
"url": "http://aaron.jorb.in"
109
},
10+
"license": "MIT",
11+
"keywords": [
12+
"gruntplugin"
13+
],
14+
"homepage": "https://github.com/wordpress/grunt-patch-wordpress",
1115
"repository": {
1216
"type": "git",
1317
"url": "git://github.com/wordpress/grunt-patch-wordpress.git"
1418
},
1519
"bugs": {
1620
"url": "https://github.com/wordpress/grunt-patch-wordpress/issues"
1721
},
18-
"license": "MIT",
19-
"main": "Gruntfile.js",
2022
"engines": {
2123
"node": ">= 10"
2224
},
23-
"scripts": {
24-
"test": "jest",
25-
"test:coverage": "jest --coverage",
26-
"test:watch": "jest --watch",
27-
"lint": "eslint .",
28-
"lint:fix": "eslint . --fix"
29-
},
25+
"main": "Gruntfile.js",
3026
"jest": {
3127
"testMatch": [
3228
"**/test/**/*.js"
@@ -35,18 +31,38 @@
3531
".eslintrc.js"
3632
]
3733
},
38-
"devDependencies": {
39-
"@wordpress/eslint-plugin": "^2.0.0",
40-
"eslint": "^5.15.1",
41-
"jest": "^24.5.0"
34+
"npmPackageJsonLintConfig": {
35+
"extends": "@wordpress/npm-package-json-lint-config",
36+
"rules": {
37+
"valid-values-license": [
38+
"error",
39+
[
40+
"MIT"
41+
]
42+
]
43+
}
4244
},
4345
"dependencies": {
4446
"grunt": "^1.0.3",
4547
"inquirer": "^5.1.0",
4648
"request": "^2.83.0",
4749
"xmlrpc": "^1.3.1"
4850
},
49-
"keywords": [
50-
"gruntplugin"
51-
]
51+
"devDependencies": {
52+
"@wordpress/scripts": "^3.3.0",
53+
"concurrently": "^4.1.1"
54+
},
55+
"scripts": {
56+
"check-engines": "wp-scripts check-engines",
57+
"check-licenses": "wp-scripts check-licenses",
58+
"test:coverage": "wp-scripts test-unit-js --coverage",
59+
"test:help": "wp-scripts test-unit-js --help",
60+
"test:unit": "wp-scripts test-unit-js",
61+
"test:watch": "wp-scripts test-unit-js --watch",
62+
"test": "concurrently \"npm run check-engines\" \"npm run check-licenses\" \"npm run lint\" \"npm run test:unit\"",
63+
"lint": "concurrently \"npm run lint:js\" \"npm run lint:pkg-json\"",
64+
"lint:js": "wp-scripts lint-js",
65+
"lint:fix": "wp-scripts lint-js --fix",
66+
"lint:pkg-json": "wp-scripts lint-pkg-json"
67+
}
5268
}

0 commit comments

Comments
 (0)