   (json/generate-string
    (merge (config project) DEF_CONFIG)))
 
+(defn- sources-list [project args]
+  (let [includes (include-files project)
+        sources (remove empty? (concat (apply vec args) includes))
+        excludes (apply hash-set (exclude-files project))
+        target (remove (fn [x] (or (empty? x)
+                                   (contains? excludes x))) sources)]
+    (if (empty? target)
+      (do
+        (println "No JS files specified.")
+        (main/abort))
+      target)))
+
 (defn- invoke [project & args]
   (process/exec
    (project :root)
    (cons "jslint" args)))
 
-(defn- proc [project]
+(defn- proc [project & args]
   (try
     (npm/environmental-consistency project)
     (let [file (config-file project)
           content (generate-config-file project)
-          includes (include-files project)]
+          sources (sources-list project args)]
       (npm/with-json-file file content project
-                          (apply invoke project includes)))
+                          (apply invoke project sources)))
     (catch Throwable t
-      (println (joine (str "Can't execute jslint application: " (.getMessage t))
-                      "Check that JSLint is:"
-                      " - installed correctly: npm install jslint -g"
-                      " - configured correctly: https://github.com/vbauer/lein-jslint.git"))
+      (println
+       (joine (str "Can't execute jslint application: " (.getMessage t))
+              "Something is wrong:"
+              " - installation: npm install jslint -g"
+              " - configuration: https://github.com/vbauer/lein-jslint"))
       (main/abort))))
 
 

(defn- config [project] (opt project :config {}))
(defn- config-file [project] (opt project :config-file DEF_CONFIG_FILE))
(defn- include-files [project] (find-files (vec (opt project :includes nil))))


; Internal API: Runner

  [project & args]
  (if (= args ["help"])
    (println (help/help-for "jslint"))
    (proc project args)))


; External API: Hooks
