Registry / testing / lab-lint

lab-lint

JSON →
library0.0.3jsnpmunverified

Integrates JSLint into the Spumko/Lab testing framework, enabling automatic JavaScript linting as part of test suites. Version 0.0.3 is the latest stable release, with no active development or updates since 2014. It is opinionated, scanning all .js files in /lib and /test directories by default. Configuration is done via a standard .jslint JSON file. This package is deprecated in favor of more modern linters like ESLint and newer test runners like Lab's built-in linting support.

npm install lab-lint
INSTALL
IMPORT
SIG · LAB-LINT
L
lab-lint
testingjavascriptv0.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
require('lab-lint')(Lab, dirname);
import labLint from 'lab-lint';
The package exports a function that must be called immediately with Lab and dirname parameters. It does not support ES6 import syntax.

Shows how to integrate lab-lint into a Lab test suite to automatically lint all .js files in /lib and /test directories.

// test/lint.js 'use strict'; var Lab = require('lab'); var dirname = __dirname; require('lab-lint')(Lab, dirname); // Optional: Configure jslint via a .jslint file in project root // Example .jslint: // { // "nomen": true, // "vars": true // }
Debug
Known issues
deprecatedlab-lint is unmaintained and relies on JSLint, which is outdated and no longer recommended. Use ESLint with Lab's built-in or third-party linting support instead.
fix
Replace with eslint and lab-eslint or similar modern tools.
affects: <=0.0.3
gotchaThe function must be called with a Lab instance and dirname as arguments. Failure to do so will cause a runtime error.
fix
Ensure you pass the correct Lab object and __dirname.
affects: >=0.0.1
gotchaOnly .js files in /lib and /test directories are linted. This is hardcoded and not configurable.
fix
If you need different paths, consider forking the package or using a different linting integration.
affects: >=0.0.1
breakingRequires Node.js 0.10.x or older; may not work on modern Node.js versions due to JSLint compatibility issues.
fix
Use a Node.js version <= 0.10.x or migrate to a modern linter.
affects: >=0.0.1
Errors
Common errors & fixes
Error: Cannot find module 'lab'
lab-lint requires the 'lab' package as a peer dependency, which must be installed.
fix
Run 'npm install lab --save-dev' to add the lab testing framework.
TypeError: lab-lint is not a function
The package exports a function, not an object. Use require('lab-lint') as a function call.
fix
Replace 'var lint = require("lab-lint"); lint(Lab, dirname);' with 'require("lab-lint")(Lab, dirname);'.
Upgrade
Version history
0.0.3latest on npm
Audit
Dependencies
labrequiredPeer dependency; lab-lint is designed to integrate with the lab testing framework.
jslintrequiredRequired for linting functionality; used internally to perform lint checks.
Agent activity
2 hits · last 30 days
node
2
Resources
lab-lint — npm install lab-lint · libregistry