From be0a120134680c5977f8a8c9e6d359944fa1f2ab Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Mon, 12 Nov 2012 14:06:53 +0100 Subject: Update JavaScript Lint configuration file Update is needed because various files were moved to different directories. https://fedorahosted.org/freeipa/ticket/112 --- install/ui/jsl.conf | 44 +++++-------------------------- install/ui/src/freeipa/freeipa.profile.js | 5 +++- install/ui/src/freeipa/ipa.js | 1 - install/ui/src/libs/browser.js | 2 ++ 4 files changed, 13 insertions(+), 39 deletions(-) (limited to 'install/ui') diff --git a/install/ui/jsl.conf b/install/ui/jsl.conf index 935566d4f..2eb32ffb6 100644 --- a/install/ui/jsl.conf +++ b/install/ui/jsl.conf @@ -118,6 +118,7 @@ +define $ +define JSON +define jQuery ++define define ### Files # Specify which files to lint @@ -125,40 +126,9 @@ # To add a set of files, use "+process FileName", "+process Folder\Path\*.js", # or "+process Folder\Path\*.htm". # -+process jquery.ordered-map.js -+process ipa.js -+process widget.js -+process field.js -+process net.js -+process dialog.js -+process search.js -+process details.js -+process add.js -+process association.js -+process facet.js -+process entity.js -+process navigation.js -+process rule.js -+process certificate.js -+process entitle.js -+process user.js -+process group.js -+process hbac.js -+process hbactest.js -+process host.js -+process hostgroup.js -+process netgroup.js -+process selinux.js -+process service.js -+process serverconfig.js -+process sudo.js -+process policy.js -+process aci.js -+process dns.js -+process automount.js -+process automember.js -+process idrange.js -+process trust.js -+process webui.js -+process login.js -+process reset_password.js + ++process src/libs/browser.js ++process src/libs/jquery.ordered-map.js ++process src/freeipa/*.js ++process src/*.js ++process ./*.js \ No newline at end of file diff --git a/install/ui/src/freeipa/freeipa.profile.js b/install/ui/src/freeipa/freeipa.profile.js index be81f18fc..7a20134a5 100644 --- a/install/ui/src/freeipa/freeipa.profile.js +++ b/install/ui/src/freeipa/freeipa.profile.js @@ -4,12 +4,15 @@ var profile = (function(){ + + var js_files = /\.js$/; + return { resourceTags: { // all JavaScript files are AMD modules amd: function(filename, mid) { - return /\.js$/.test(filename); + return js_files.test(filename); } } }; diff --git a/install/ui/src/freeipa/ipa.js b/install/ui/src/freeipa/ipa.js index cc62f0897..c646d8c46 100644 --- a/install/ui/src/freeipa/ipa.js +++ b/install/ui/src/freeipa/ipa.js @@ -1,4 +1,3 @@ -/*jsl:import jquery.ordered-map.js */ /* Authors: * Pavel Zuna * Adam Young diff --git a/install/ui/src/libs/browser.js b/install/ui/src/libs/browser.js index 9268d9dc8..8bfb2de16 100644 --- a/install/ui/src/libs/browser.js +++ b/install/ui/src/libs/browser.js @@ -41,7 +41,9 @@ if (!Array.prototype.indexOf) { var n = 0; if (arguments.length > 0) { n = Number(arguments[1]); + /*jsl:ignore*/ if (n !== n) { // shortcut for verifying if it's NaN + /*jsl:end*/ n = 0; } else if (n !== 0 && n !== Infinity && n !== -Infinity) { n = (n > 0 || -1) * Math.floor(Math.abs(n)); -- cgit