jenkins-bot has submitted this change and it was merged.
Change subject: Add npm entry point and add phplint to composer
......................................................................
Add npm entry point and add phplint to composer
Change-Id: I7685a73304cd61463098353ea4b7c78c5b9d93b7
---
A .jshintignore
A .jshintrc
A Gruntfile.js
M composer.json
M i18n/en.json
M i18n/qqq.json
A package.json
M resources/ext.mnss.search.js
8 files changed, 81 insertions(+), 3 deletions(-)
Approvals:
Hashar: Looks good to me, approved
jenkins-bot: Verified
diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1 @@
+node_modules
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 0000000..04c3a97
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,23 @@
+{
+ // Enforcing
+ "bitwise": true,
+ "eqeqeq": true,
+ "freeze": true,
+ "latedef": "nofunc",
+ "noarg": true,
+ "nonew": true,
+ "undef": true,
+ "unused": true,
+ "strict": false,
+
+ // Relaxing
+ "es5": false,
+
+ // Environment
+ "browser": true,
+ "jquery": true,
+
+ "globals": {
+ "mediaWiki": false
+ }
+}
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..36b6671
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,30 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+ grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+ grunt.loadNpmTasks( 'grunt-jsonlint' );
+ grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+ grunt.initConfig( {
+ jshint: {
+ options: {
+ jshintrc: true
+ },
+ all: [
+ '**/*.js',
+ '!node_modules/**'
+ ]
+ },
+ banana: {
+ all: 'i18n/'
+ },
+ jsonlint: {
+ all: [
+ '**/*.json',
+ '!node_modules/**'
+ ]
+ }
+ } );
+
+ grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
+ grunt.registerTask( 'default', 'test' );
+};
diff --git a/composer.json b/composer.json
index bb4ce84..bbb943a 100644
--- a/composer.json
+++ b/composer.json
@@ -14,5 +14,13 @@
"require": {
"php": ">=5.3.0",
"composer/installers": "~1.0"
+ },
+ "require-dev": {
+ "jakub-onderka/php-parallel-lint": "0.9.2"
+ },
+ "scripts": {
+ "test": [
+ "parallel-lint . --exclude vendor"
+ ]
}
}
diff --git a/i18n/en.json b/i18n/en.json
index 1d6b0ab..86ab89e 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1,3 +1,6 @@
{
+ "@metadata": {
+ "authors": []
+ },
"mnss-desc": "Includes suggestions from all content namespaces in the
search box, showing from which namespace each suggestion is from"
}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 1b0dbb8..ae9a2d4 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -1,4 +1,6 @@
{
- "@metadata": [],
- "mnss-desc": "{{desc}}"
+ "@metadata": {
+ "authors": []
+ },
+ "mnss-desc":
"{{desc|what=extension|name=MixedNamespaceSearchSuggestions|url=https://www.mediawiki.org/wiki/Extension:MixedNamespaceSearchSuggestions}}"
}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..ec97d7b
--- /dev/null
+++ b/package.json
@@ -0,0 +1,12 @@
+{
+ "scripts": {
+ "test": "grunt test"
+ },
+ "devDependencies": {
+ "grunt": "0.4.5",
+ "grunt-cli": "0.1.13",
+ "grunt-banana-checker": "0.4.0",
+ "grunt-contrib-jshint": "1.0.0",
+ "grunt-jsonlint": "1.0.7"
+ }
+}
diff --git a/resources/ext.mnss.search.js b/resources/ext.mnss.search.js
index 4f18d31..0a3e666 100644
--- a/resources/ext.mnss.search.js
+++ b/resources/ext.mnss.search.js
@@ -4,7 +4,6 @@
*/
( function ( mw, $ ) {
- 'use strict';
// Compute form data for search suggestions functionality.
function computeResultRenderCache( context ) {
--
To view, visit https://gerrit.wikimedia.org/r/276777
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7685a73304cd61463098353ea4b7c78c5b9d93b7
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MixedNamespaceSearchSuggestions
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits