1.1.2 • Published 2 years ago

blint v1.1.2

Weekly downloads
1,549
License
-
Repository
github
Last release
2 years ago

Blint

Simple JavaScript linter.

var blint = require("blint");
blint.checkFile("foo.js");
blint.checkDir("src");

When the linter encounters problems, it will write something to stdout, and set a flag, which you can retrieve with blint.success().

process.exit(blint.success() ? 0 : 1);

Both checkFile and checkDir take a second optional options argument. These are the defaults:

var defaultOptions = {
  // Version of the language to parse
  ecmaVersion: 6,
  // Whitelist globals exported by the browser
  browser: false,
  // Allow tabs
  tabs: false,
  // Allow trailing whitespace
  trailingSpace: false,
  // True to require semicolons, false to disallow them
  semicolons: null,
  // Allow trailing commas
  trailingCommas: true,
  // Allow unquoted properties that are reserved words
  reservedProps: true,
  // Whether to allow console.* expressions
  console: false,
  // An array of global variables to allow
  allowedGlobals: [],
  // Allow the code to declare top-level variables
  declareGlobals: true
};

Released under an MIT license.

1.1.2

2 years ago

1.1.1

4 years ago

1.1.0

5 years ago

1.0.3

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.5.1

8 years ago

0.5.0

9 years ago

0.4.0

9 years ago

0.3.0

9 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago