Registry / testing / twolfson-style

twolfson-style

JSON →
library1.6.1jsnpmunverified

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.

npm install twolfson-style
INSTALL
IMPORT
SIG · TWOLFSON-STYLE
T
twolfson-style
testingjavascriptv1.6.1
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.

twolfson-style
import { twolfsonStyle } from 'twolfson-style'
ESM usage is not typical; the package is primarily used via CLI. This import would fail as it's not an ESM module.
default
const twolfsonStyle = require('twolfson-style')
import twolfsonStyle from 'twolfson-style'
CommonJS default import; ESM default import is not supported.
jscsrc
require('twolfson-style/.jscsrc')
import jscsrc from 'twolfson-style/.jscsrc'
The JSON config files are exported via path, not as modules.
jshintrc
require('twolfson-style/.jshintrc')
import jshintrc from 'twolfson-style/.jshintrc'
The JSON config files are exported via path, not as modules.

Install twolfson-style, copy config files to project root, and set up lint/precheck scripts.

npm install twolfson-style ./node_modules/.bin/twolfson-style install ls .jscsrc .jshintrc # Add to package.json scripts: # "lint": "twolfson-style lint lib/ test/" # "precheck": "twolfson-style precheck lib/ test/"
twolfson-style --version
Debug
Known issues
deprecatedPackage is no longer actively maintained; jscs itself is deprecated in favor of ESLint.
fix
Migrate to ESLint with a preset like eslint-config-airbnb.
affects: >=1.0
deprecatedjscs is deprecated; jshint is legacy.
fix
Use ESLint instead of jscs/jshint.
affects: >=0
gotchatwolfson-style does not install jshint or jscs; they must be in $PATH or installed separately.
fix
Install jshint and jscs globally or as devDependencies.
affects: >=0
gotchaThe 'lint' command runs both jshint and jscs; if either fails, the command fails.
fix
Ensure both tools are configured correctly.
affects: >=0
Errors
Common errors & fixes
twolfson-style: command not found
twolfson-style not installed or not in PATH
fix
Run 'npm install twolfson-style --save-dev' and use npx or local node_modules/.bin/
jshint: command not found
jshint not installed
fix
Install jshint: 'npm install jshint --save-dev'
jscs: command not found
jscs not installed
fix
Install jscs: 'npm install jscs --save-dev'
Error: Cannot find module 'twolfson-style'
Module not resolved
fix
Ensure twolfson-style is installed: 'npm install twolfson-style'
Upgrade
Version history
1.6.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
twolfson-style — npm install twolfson-style · libregistry