JanZerebecki has uploaded a new change for review. https://gerrit.wikimedia.org/r/207434
Change subject: Add jscs and jshint config. ...................................................................... Add jscs and jshint config. Change-Id: I39d654fcd64970806a3769fc5ee60e0cc6ad4dc8 --- A .jscsrc A .jshintignore A .jshintrc A package.json 4 files changed, 87 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQuality refs/changes/34/207434/1 diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 0000000..d5686a2 --- /dev/null +++ b/.jscsrc @@ -0,0 +1,20 @@ +{ + // https://github.com/jscs-dev/node-jscs/blob/master/presets/wikimedia.json + "preset": "wikimedia", + + // ---- + // Own rules + + "disallowSpaceAfterKeywords": [ + "catch", + "for", +// "if", + "switch", + "while" + ], + "requireSpaceAfterKeywords": [ + "else" + ], + + "excludeFiles": [ "node_modules/**", "vendor/**" ] +} diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 0000000..a860310 --- /dev/null +++ b/.jshintignore @@ -0,0 +1 @@ +node_modules/** diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..ae4ee0b --- /dev/null +++ b/.jshintrc @@ -0,0 +1,49 @@ +{ + "camelcase": true, + "curly": true, + "eqeqeq": true, + "immed": true, + "latedef": true, + "newcap": true, + "supernew": true, + "shadow": false, + "noarg": true, + "noempty": true, + "nonew": true, + "quotmark": false, // sometimes double quotes make sense, e.g. "foo's" is better readable than 'foo\'s' + "trailing": true, + "undef": true, + "unused": "vars", // we want to allow unused function parameters + "laxbreak": true, + "laxcomma": false, + "onevar": false, + "bitwise": true, + "forin": false, + "regexp": true, + "strict": true, + "scripturl": true, + + // Environment + "browser": true, + + // Globals + "globals": { + "jQuery": false, + "mediaWiki": false, + "wikibase": true, + "dataValues": false, + "dataTypes": false, + "util": false, + "valueFormatters": false, + "valueParsers": false + }, + + "overrides": { + "*/tests/qunit/**/*.tests.js": { + "globals": { + "sinon": false, + "QUnit": false + } + }, + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..28a5365 --- /dev/null +++ b/package.json @@ -0,0 +1,17 @@ +{ + "name": "WikidataQuality", + "version": "0.0.0", + "scripts": { + "test": "jshint . && jscs ." + }, + "repository": { + "type": "git", + "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/WikidataQuality" + }, + "author": "BP2014N1", + "license": "GPL-2.0+", + "devDependencies": { + "jscs": "", + "jshint": "" + } +} -- To view, visit https://gerrit.wikimedia.org/r/207434 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I39d654fcd64970806a3769fc5ee60e0cc6ad4dc8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikidataQuality Gerrit-Branch: master Gerrit-Owner: JanZerebecki <jan.wikime...@zerebecki.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits