fashion-show
raw JSON → 3.3.3 verified Fri May 01 auth: no javascript deprecated
fashion-show v3.3.3 is a Node.js library for building versioned, consistent styleguides that centralize lint configurations (.jshintrc, .jscsrc, .eslintrc) across projects. It wraps CLI tools (JSHint, JSCS, ESLint) providing a unified API and binary. No recent updates (last publish 2016). Differentiator: enforces a single source of truth for lint rules, but relies on deprecated/unmaintained linters (JSHint, JSCS).
Common errors
error fashion-show: no such file or directory, open './dotfiles/.eslintrc' ↓
cause The 'rc' option points to a directory without the expected dotfiles.
fix
Create the dotfiles directory with .eslintrc, .jscsrc, or .jshintrc files.
error Error: Cannot find module 'jscs' ↓
cause JSCS is not installed even though it's listed in commands.
fix
Install the required linter: npm install jscs --save-dev
error fashion-show: unknown option: --fix ↓
cause The 'fix' option is only supported for JSCS, not for JSHint or ESLint.
fix
Remove 'fix' when not using JSCS, or set only for JSCS.
Warnings
deprecated JSHint and JSCS are deprecated/unmaintained. Use ESLint instead. ↓
fix Remove JSHint/JSCS from commands and use only ESLint.
breaking The 'format' option is only for ESLint; JSHint uses 'reporter'. Misconfiguration may break. ↓
fix Use 'reporter' for JSHint, 'format' for ESLint, or omit both.
gotcha The 'rc' option expects a directory, not a file. Relative paths are relative to the calling process. ↓
fix Ensure 'rc' points to the directory containing dotfiles (e.g., './dist').
gotcha The library does not report lint errors itself; it only returns exit code. You must run external reporters. ↓
fix Set 'reporter' or 'format' option to get formatted output, or pipe the child process stdout.
Install
npm install fashion-show yarn add fashion-show pnpm add fashion-show Imports
- default wrong
import fashionShow from 'fashion-show';correctconst fashionShow = require('fashion-show'); - fashionShow wrong
import { fashionShow } from 'fashion-show';correctconst fashionShow = require('fashion-show'); - fashionShow (binary) wrong
Using `fashion-show` CLI directly without installation.correctRun `./node_modules/.bin/fashion-show-build` or define a bin script in package.json.
Quickstart
const path = require('path');
const fashionShow = require('fashion-show');
fashionShow({
commands: ['eslint'],
rc: path.join(__dirname, 'dist'),
targets: ['lib/', 'test/']
}, function (err, code) {
if (err) { process.exit(1); }
process.exit(code);
});