{"id":26679,"library":"yui-lint","title":"yui-lint","description":"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.","status":"maintenance","version":"0.2.0","language":"javascript","source_language":"en","source_url":"http://github.com/yui/yui-lint","tags":["javascript"],"install":[{"cmd":"npm install yui-lint","lang":"bash","label":"npm"},{"cmd":"yarn add yui-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add yui-lint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runtime peer dependency for linting; the config is designed to be used with jshint.","package":"jshint","optional":false}],"imports":[{"note":"This package is CommonJS-only and does not provide an ESM entry. Use require() to load the configuration object.","wrong":"import lint from 'yui-lint';","symbol":"default","correct":"var lint = require('yui-lint');"},{"note":"The config file is jshint.json inside the yui-lint package, not jshintrc. Reference it by path within node_modules.","wrong":"jshint --config jshint.json ./lib/*.js","symbol":"package.json script usage","correct":"jshint --config ./node_modules/yui-lint/jshint.json ./lib/*.js"},{"note":"Symlinking avoids copying the file and keeps it updated. The jshint.json file is at the root of the yui-lint package.","wrong":"cp jshint.json ~/.jshintrc","symbol":"Symlink as .jshintrc","correct":"ln -s $PWD/jshint.json ~/.jshintrc"}],"quickstart":{"code":"npm install jshint yui-lint\n# Option A: Use from Node script\nvar lint = require('yui-lint');\nconsole.log(lint); // { jshint options ... }\n\n# Option B: Use in package.json scripts\n# Add to package.json:\n# {\n#   \"scripts\": {\n#     \"pretest\": \"jshint --config ./node_modules/yui-lint/jshint.json ./lib/*.js\"\n#   }\n# }\n# Then run:\nnpm run pretest\n\n# Option C: Symlink as global .jshintrc\nln -s ./node_modules/yui-lint/jshint.json ~/.jshintrc\njshint ./lib/*.js","lang":"javascript","description":"Installs jshint and yui-lint, then demonstrates three usage patterns: Node require, package.json script, and symlink as .jshintrc."},"warnings":[{"fix":"Consider migrating to a maintained linter configuration or use ESLint with a modern config.","message":"YUI (Yahoo User Interface) library and its ecosystem are deprecated. yui-lint is no longer maintained and may not receive updates for newer JSHint versions.","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"Reference the path correctly: --config ./node_modules/yui-lint/jshint.json","message":"The jshint.json file in yui-lint is expected to be used with JSHint's --config flag. It is not a .jshintrc file by default.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Ensure all variables are declared. Use /*global ... */ comments to declare globals if needed.","message":"In 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.","severity":"breaking","affected_versions":">=0.1.4"},{"fix":"Use the Node require pattern to avoid file path issues: var lint = require('yui-lint'); then lint.jshintConfig.","message":"The 'jshint.json' file is shipped inside the package but may be overwritten if using a symlink that points to a removed or changed file.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install jshint: npm install jshint --save-dev","cause":"JSHint is not installed or not in PATH when using command line.","error":"ReferenceError: jshint is not defined"},{"fix":"Use the correct filename: jshint.json","cause":"Specifying the wrong config file name (jshintrc instead of jshint).","error":"Can't find config file: jshintrc.json"},{"fix":"Run npm install yui-lint --save-dev","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'yui-lint'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}