Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Support config files named autolint-config.js

Fixes #13
  • Loading branch information...
commit 4ba9a93ddc17dc00f7ba9925c500359d62375d46 1 parent 0c6f754
@magnars authored
View
7 README.md
@@ -5,6 +5,13 @@ Autolint watches your files for jslint-errors. DRY up your js-files, freeing
them of all those linting config comments. Gather all your linting preferences
in one place per project.
+Latest changes
+---------------------------
+
+* The configuration file can now also be called `autolint-config.js`
+ to avoid issues where Windows will try to execute the `autolint.js`
+ config file when running `autolint`.
+
Changes from 0.1.5 to 1.0.0
---------------------------
View
0  autolint.js → autolint-config.js
File renamed without changes
View
2  buster.js
@@ -4,5 +4,5 @@ config["Node tests"] = {
environment: "node",
tests: ["test/*.js"],
extensions: [require("buster-lint")],
- "buster-lint": require("./autolint")
+ "buster-lint": require("./autolint-config")
};
View
8 lib/configuration.js
@@ -10,7 +10,7 @@ if (!fs.existsSync) {
module.exports = {
exists: function () {
- return fs.existsSync("./autolint.js");
+ return fs.existsSync("./autolint.js") || fs.existsSync("./autolint-config.js");
},
defaultsPlus: function (config) {
@@ -24,13 +24,15 @@ module.exports = {
},
load: function () {
- var fileConfig = require(process.cwd() + "/autolint");
+ var fileConfig = fs.existsSync("./autolint.js") ?
+ require(process.cwd() + "/autolint") :
+ require(process.cwd() + "/autolint-config");
return this.defaultsPlus(fileConfig);
},
createDefaultConfigFile: function () {
if (this.exists()) {
- throw new Error("autolint.js already exists in " + process.cwd());
+ throw new Error("autolint.js (or autolint-config.js) already exists in " + process.cwd());
}
var newFile = fs.createWriteStream('./autolint.js');
View
4 lib/lint-reporter.js
@@ -6,10 +6,6 @@ function create(repository) {
});
}
-function tooManyErrors(errors) {
- return errors[errors.length - 1] === null;
-}
-
function printHeader(file) {
print.red('', 'Lint in ' + file.name + ', ' + file.errorDescription() + ':');
}
View
2  watch-tests.watchr
@@ -7,7 +7,7 @@ end
def run_all_tests
system('clear')
- result = run "buster test"
+ result = run "buster test -F warning"
puts result
end
Please sign in to comment.
Something went wrong with that request. Please try again.