Registry / testing / yui-lint

yui-lint

JSON →
library0.2.0jsnpmunverified

yui-lint provides the default JSHint configuration used by YUI and its packages. Version 0.2.0 is the latest stable release. The package defines a set of JSHint options (e.g., browser, node, curly, eqeqeq) that enforce YUI's coding standards. It can be used as a Node module, referenced from package.json scripts with jshint --config, or symlinked as a local .jshintrc file. The project appears to be in maintenance mode, as the YUI library is no longer actively developed, and the last release was several years ago.

npm install yui-lint
INSTALL
IMPORT
SIG · YUI-LINT
Y
yui-lint
testingjavascriptv0.2.0
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
var lint = require('yui-lint');
import lint from 'yui-lint';
This package is CommonJS-only and does not provide an ESM entry. Use require() to load the configuration object.
package.json script usage
jshint --config ./node_modules/yui-lint/jshint.json ./lib/*.js
jshint --config jshint.json ./lib/*.js
The config file is jshint.json inside the yui-lint package, not jshintrc. Reference it by path within node_modules.
Symlink as .jshintrc
ln -s $PWD/jshint.json ~/.jshintrc
cp jshint.json ~/.jshintrc
Symlinking avoids copying the file and keeps it updated. The jshint.json file is at the root of the yui-lint package.

Installs jshint and yui-lint, then demonstrates three usage patterns: Node require, package.json script, and symlink as .jshintrc.

npm install jshint yui-lint # Option A: Use from Node script var lint = require('yui-lint'); console.log(lint); // { jshint options ... } # Option B: Use in package.json scripts # Add to package.json: # { # "scripts": { # "pretest": "jshint --config ./node_modules/yui-lint/jshint.json ./lib/*.js" # } # } # Then run: npm run pretest # Option C: Symlink as global .jshintrc ln -s ./node_modules/yui-lint/jshint.json ~/.jshintrc jshint ./lib/*.js
Debug
Known issues
deprecatedYUI (Yahoo User Interface) library and its ecosystem are deprecated. yui-lint is no longer maintained and may not receive updates for newer JSHint versions.
fix
Consider migrating to a maintained linter configuration or use ESLint with a modern config.
affects: >=0.1.0
gotchaThe jshint.json file in yui-lint is expected to be used with JSHint's --config flag. It is not a .jshintrc file by default.
fix
Reference the path correctly: --config ./node_modules/yui-lint/jshint.json
affects: >=0.1.0
breakingIn version 0.1.4, the 'undef' flag was added and set to true by default. This may cause lint errors for undeclared variables that were previously allowed.
fix
Ensure all variables are declared. Use /*global ... */ comments to declare globals if needed.
affects: >=0.1.4
gotchaThe 'jshint.json' file is shipped inside the package but may be overwritten if using a symlink that points to a removed or changed file.
fix
Use the Node require pattern to avoid file path issues: var lint = require('yui-lint'); then lint.jshintConfig.
affects: >=0.1.0
Errors
Common errors & fixes
ReferenceError: jshint is not defined
JSHint is not installed or not in PATH when using command line.
fix
Install jshint: npm install jshint --save-dev
Can't find config file: jshintrc.json
Specifying the wrong config file name (jshintrc instead of jshint).
fix
Use the correct filename: jshint.json
Error: Cannot find module 'yui-lint'
Package not installed or not in node_modules.
fix
Run npm install yui-lint --save-dev
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies
jshintrequiredRuntime peer dependency for linting; the config is designed to be used with jshint.
Agent activity
40 hits · last 30 days
node
34
OpenAI (training)
1
Resources
yui-lint — npm install yui-lint · libregistry