Skip to content

Commit

Permalink
No longer use Grunt JSHint, switched to ESLint, just run `npm run-scr…
Browse files Browse the repository at this point in the history
…ipt eslint`.
  • Loading branch information
remcotolsma committed Sep 24, 2019
1 parent 651b8d7 commit 44bc4a7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
@@ -0,0 +1,4 @@
/build/
/node_modules/
/vendor/
/wordpress/
5 changes: 5 additions & 0 deletions .eslintrc
@@ -0,0 +1,5 @@
{
"plugins": [
"json"
]
}
4 changes: 3 additions & 1 deletion .travis.yml
Expand Up @@ -12,7 +12,7 @@ env:
jobs:
include:
- php: 7.3
env: WP_VERSION=^5.1 COVERAGE=1 PHPCS=1 PHPSTAN=1
env: WP_VERSION=^5.1 COVERAGE=1 PHPCS=1 PHPSTAN=1 ESLINT=1
- php: 7.3
env: WP_VERSION=^5.0
- php: 7.2
Expand Down Expand Up @@ -79,6 +79,8 @@ install:
- composer show

script:
# ESLint
- if [ "$ESLINT" == "1" ]; then npm run-script eslint; fi
# PHPLint
- composer run-script phplint
# PHPUnit
Expand Down
6 changes: 0 additions & 6 deletions Gruntfile.js
Expand Up @@ -175,17 +175,11 @@ module.exports = function( grunt ) {
target: [
'scss/**/*.scss'
]
},

// JSHint.
jshint: {
all: [ 'Gruntfile.js', 'composer.json', 'package.json' ]
}
}
);

// Default task(s).
grunt.registerTask( 'default', [ 'jshint' ] );
grunt.registerTask( 'assets', [ 'sasslint', 'sass', 'postcss', 'copy:scripts', 'copy:assets' ] );
grunt.registerTask( 'min', [ 'uglify' ] );

Expand Down
6 changes: 4 additions & 2 deletions package.json
Expand Up @@ -41,11 +41,12 @@
"devDependencies": {
"autoprefixer": "^9.6.1",
"cssnano": "^4.1.10",
"eslint": "^6.4.0",
"eslint-plugin-json": "^1.4.0",
"grunt": "^1.0.4",
"grunt-contrib-clean": "^2.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-imagemin": "^3.1.0",
"grunt-contrib-jshint": "^2.1.0",
"grunt-contrib-sass": "^1.0.0",
"grunt-contrib-uglify": "^4.0.1",
"grunt-postcss": "^0.9.0",
Expand All @@ -61,6 +62,7 @@
"build-image-svg-wp-admin": "svgo images/src/pronamic-pay-wp-admin-fresh-base.svg -o images/dist/pronamic-pay-wp-admin-fresh-base.svgo-min.svg",
"build-image-png-512": "rsvg-convert -w 512 -h 512 images/src/pronamic-pay.svg -o images/src/pronamic-pay-512.png",
"build-image-png-512-min": "pngquant images/src/pronamic-pay-512.png --output images/dist/pronamic-pay-512.pngquant-min.png --force",
"build-image-ico": "icon-gen --input images/src/pronamic-pay.svg --output images/dist --ico name=pronamic-pay --icns name=pronamic-pay -r"
"build-image-ico": "icon-gen --input images/src/pronamic-pay.svg --output images/dist --ico name=pronamic-pay --icns name=pronamic-pay -r",
"eslint": "eslint . --ext .json --ext .js"
}
}

0 comments on commit 44bc4a7

Please sign in to comment.