{"id":26544,"library":"twolfson-style","title":"twolfson-style","description":"Lint and style configurations for @twolfson, providing a common versioned location for style choices. Version 1.6.1 is the latest stable release, with a low release cadence. It integrates jscs and jshint, offering a CLI to install .jscsrc and .jshintrc files, lint paths, and run prechecks. It does not include jscs/jshint as dependencies, relying on the user to provide them. Alternative: self-managed configs.","status":"deprecated","version":"1.6.1","language":"javascript","source_language":"en","source_url":"git://github.com/twolfson/twolfson-style","tags":["javascript","twolfson","style","lint","jscs","jshint"],"install":[{"cmd":"npm install twolfson-style","lang":"bash","label":"npm"},{"cmd":"yarn add twolfson-style","lang":"bash","label":"yarn"},{"cmd":"pnpm add twolfson-style","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM usage is not typical; the package is primarily used via CLI. This import would fail as it's not an ESM module.","wrong":"","symbol":"twolfson-style","correct":"import { twolfsonStyle } from 'twolfson-style'"},{"note":"CommonJS default import; ESM default import is not supported.","wrong":"import twolfsonStyle from 'twolfson-style'","symbol":"default","correct":"const twolfsonStyle = require('twolfson-style')"},{"note":"The JSON config files are exported via path, not as modules.","wrong":"import jscsrc from 'twolfson-style/.jscsrc'","symbol":"jscsrc","correct":"require('twolfson-style/.jscsrc')"},{"note":"The JSON config files are exported via path, not as modules.","wrong":"import jshintrc from 'twolfson-style/.jshintrc'","symbol":"jshintrc","correct":"require('twolfson-style/.jshintrc')"}],"quickstart":{"code":"npm install twolfson-style\n./node_modules/.bin/twolfson-style install\nls .jscsrc .jshintrc\n# Add to package.json scripts:\n# \"lint\": \"twolfson-style lint lib/ test/\"\n# \"precheck\": \"twolfson-style precheck lib/ test/\"","lang":"javascript","description":"Install twolfson-style, copy config files to project root, and set up lint/precheck scripts."},"warnings":[{"fix":"Migrate to ESLint with a preset like eslint-config-airbnb.","message":"Package is no longer actively maintained; jscs itself is deprecated in favor of ESLint.","severity":"deprecated","affected_versions":">=1.0"},{"fix":"Use ESLint instead of jscs/jshint.","message":"jscs is deprecated; jshint is legacy.","severity":"deprecated","affected_versions":">=0"},{"fix":"Install jshint and jscs globally or as devDependencies.","message":"twolfson-style does not install jshint or jscs; they must be in $PATH or installed separately.","severity":"gotcha","affected_versions":">=0"},{"fix":"Ensure both tools are configured correctly.","message":"The 'lint' command runs both jshint and jscs; if either fails, the command fails.","severity":"gotcha","affected_versions":">=0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install twolfson-style --save-dev' and use npx or local node_modules/.bin/","cause":"twolfson-style not installed or not in PATH","error":"twolfson-style: command not found"},{"fix":"Install jshint: 'npm install jshint --save-dev'","cause":"jshint not installed","error":"jshint: command not found"},{"fix":"Install jscs: 'npm install jscs --save-dev'","cause":"jscs not installed","error":"jscs: command not found"},{"fix":"Ensure twolfson-style is installed: 'npm install twolfson-style'","cause":"Module not resolved","error":"Error: Cannot find module 'twolfson-style'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}