diff --git a/.eslintrc.json b/.eslintrc.json index d168643..f69f18c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,7 +8,7 @@ "files": [ "Gruntfile.js" ], - "extends": "plugin:@wordpress/eslint-plugin/recommended" + "extends": "plugin:@wordpress/eslint-plugin/recommended-with-formatting" } ] } diff --git a/Gruntfile.js b/Gruntfile.js index 901f561..2c18de4 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,11 +1,11 @@ /* eslint-env node */ -module.exports = function ( grunt ) { +module.exports = function( grunt ) { // Load all Grunt plugins. require( 'load-grunt-tasks' )( grunt ); // TODO: Move to own Grunt plugin. - grunt.registerTask( 'readmeMdToTxt', 'Log some stuff.', function () { + grunt.registerTask( 'readmeMdToTxt', 'Log some stuff.', function() { const formatReadme = ( content ) => { const replaceRules = { '#': '=== $1 ===', @@ -14,7 +14,7 @@ module.exports = function ( grunt ) { }; // Replace Markdown headings with WP.org style headings - Object.keys( replaceRules ).forEach( function ( pattern ) { + Object.keys( replaceRules ).forEach( function( pattern ) { const patternRegExp = [ '^', pattern, '\\s(.+)$' ].join( '' ); content = content.replace(