{"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,"search_vec":"'1.6.1':19 'altern':63 'cadenc':29 'choic':17 'cli':37 'common':12 'config':67 'configur':7 'depend':55 'file':43 'includ':52 'instal':39 'integr':31 'javascript':68 'jscs':32,72 'jscs/jshint':53 'jscsrc':40 'jshint':34,73 'jshintrc':42 'latest':22 'lint':4,44,71 'locat':14 'low':27 'manag':66 'offer':35 'path':45 'precheck':48 'provid':10,61 'releas':24,28 'reli':56 'run':47 'self':65 'self-manag':64 'stabl':23 'style':3,6,16,70 'twolfson':2,9,69 'twolfson-styl':1 'user':59 'version':13,18","created_at":"2026-05-01T13:50:31.801035+00:00","updated_at":"2026-05-01T13:50:31.801035+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"twolfson-style","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/twolfson/twolfson-style","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/twolfson-style","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}