don't lint Gruntfile
All checks were successful
PHP Code Checker / PHP Code Checker (pull_request) Successful in 46s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Successful in 1m39s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Successful in 1m6s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Successful in 1m6s

This commit is contained in:
André Menrath 2024-10-29 15:04:14 +01:00
parent b4036b1457
commit eafbb940cb
2 changed files with 58 additions and 53 deletions

View file

@ -1,57 +1,59 @@
module.exports = function(grunt) { module.exports = function (grunt) {
// Project configuration. // Project configuration.
grunt.initConfig({ grunt.initConfig(
checktextdomain: { {
options:{ checktextdomain: {
text_domain: 'activitypub-event-bridge', options:{
keywords: [ text_domain: 'activitypub-event-bridge',
'__:1,2d', keywords: [
'_e:1,2d', '__:1,2d',
'_x:1,2c,3d', '_e:1,2d',
'esc_html__:1,2d', '_x:1,2c,3d',
'esc_html_e:1,2d', 'esc_html__:1,2d',
'esc_html_x:1,2c,3d', 'esc_html_e:1,2d',
'esc_attr__:1,2d', 'esc_html_x:1,2c,3d',
'esc_attr_e:1,2d', 'esc_attr__:1,2d',
'esc_attr_x:1,2c,3d', 'esc_attr_e:1,2d',
'_ex:1,2c,3d', 'esc_attr_x:1,2c,3d',
'_n:1,2,4d', '_ex:1,2c,3d',
'_nx:1,2,4c,5d', '_n:1,2,4d',
'_n_noop:1,2,3d', '_nx:1,2,4c,5d',
'_nx_noop:1,2,3c,4d' '_n_noop:1,2,3d',
] '_nx_noop:1,2,3c,4d'
}, ]
files: { },
src: [ files: {
'**/*.php', // Include all files src: [
'!sass/**', // Exclude sass/ '**/*.php', // Include all files
'!node_modules/**', // Exclude node_modules/ '!sass/**', // Exclude sass/
'!tests/**', // Exclude tests/ '!node_modules/**', // Exclude node_modules/
'!vendor/**', // Exclude vendor/ '!tests/**', // Exclude tests/
'!build/**', // Exclude build/ '!vendor/**', // Exclude vendor/
'!static/**', // Exclude static resources '!build/**', // Exclude build/
], '!static/**', // Exclude static resources
expand: true ],
} expand: true
}, }
},
wp_readme_to_markdown: { wp_readme_to_markdown: {
target: { target: {
files: { files: {
'README.md': 'readme.txt' 'README.md': 'readme.txt'
}, },
}, },
options: { options: {
pre_convert: function( readme ) { pre_convert: function ( readme ) {
return readme.replace( /\*\*Note\*\*:/g, "> [!NOTE]\n>" ); return readme.replace( /\*\*Note\*\*:/g, "> [!NOTE]\n>" );
} }
} }
} }
}); }
);
grunt.loadNpmTasks('grunt-wp-readme-to-markdown'); grunt.loadNpmTasks( 'grunt-wp-readme-to-markdown' );
grunt.loadNpmTasks('grunt-checktextdomain'); grunt.loadNpmTasks( 'grunt-checktextdomain' );
// Default task(s). // Default task(s).
grunt.registerTask('default', ['wp_readme_to_markdown', 'checktextdomain']); grunt.registerTask( 'default', ['wp_readme_to_markdown', 'checktextdomain'] );
}; };

View file

@ -29,6 +29,9 @@
<!-- Exclude minified Javascript files. --> <!-- Exclude minified Javascript files. -->
<exclude-pattern>*.min.js</exclude-pattern> <exclude-pattern>*.min.js</exclude-pattern>
<!-- Exclude the Grundfile.js. -->
<exclude-pattern>Gruntfile.js</exclude-pattern>
<!-- Strip the filepaths down to the relevant bit. --> <!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="."/> <arg name="basepath" value="."/>