Registry / devops / stylelint-cli

stylelint-cli

JSON →
library1.3.0jsnpmunverified

Global CLI wrapper to execute a locally installed stylelint. Stable version 1.3.0, released on npm. Low release cadence (last release 2019). Differentiator: allows running local stylelint via global `stylelint` command, avoiding conflicts between globally and locally installed stylelint. Alternative to npx-style invocations.

npm install stylelint-cli
INSTALL
IMPORT
SIG · STYLELINT-CLI
S
stylelint-cli
devopsjavascriptv1.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Uninstall global stylelint, install stylelint-cli globally, install local stylelint as dev dependency, then lint style.css.

npm uninstall -g stylelint && npm install -g stylelint-cli && cd my-project && npm install --save-dev stylelint && stylelint style.css
stylelint --version
Debug
Known issues
gotchastylelint must be installed locally in the project directory; otherwise the CLI will fail.
fix
Run `npm install --save-dev stylelint` in your project root.
affects: >=1.0.0
deprecatedNo new releases since 2019; consider using npx stylelint or direct local invocation.
fix
Run `npx stylelint` or `./node_modules/.bin/stylelint`.
affects: >=1.3.0
breakingDrop Node 6 support in v1.2.0.
fix
Upgrade Node to version 8 or higher.
affects: >=1.2.0
Errors
Common errors & fixes
Cannot find module 'stylelint'
stylelint not installed locally or globally after uninstalling global stylelint.
fix
Run `npm install --save-dev stylelint` in the project directory.
ReferenceError: stylelint is not defined
Trying to require stylelint-cli as a module instead of using the CLI.
fix
Use the CLI command `stylelint` globally, not `require('stylelint-cli')`.
Upgrade
Version history
1.3.0latest on npm
Audit
Dependencies
stylelintrequiredRuntime peer dependency; must be installed locally in the project.
Agent activity
4 hits · last 30 days
node
4
Resources
stylelint-cli — npm install stylelint-cli · libregistry