Registry / testing / stylelint-standard

stylelint-standard

JSON →
library1.2.3jsnpmunverified

stylelint-standard is a fixed lint configuration package for stylelint, currently at version 1.2.3. It provides a standard set of CSS linting rules with minimal configuration. It is actively maintained with regular releases and includes TypeScript type definitions. Unlike other stylelint configs, it focuses on stability and performance.

npm install stylelint-standard
INSTALL
IMPORT
SIG · STYLELINT-STANDARD
S
stylelint-standard
testingjavascriptv1.2.3
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.

default
import stylelintStandard from 'stylelint-standard'
const stylelintStandard = require('stylelint-standard')
ESM-only since v1
config
import { config } from 'stylelint-standard'
const config = require('stylelint-standard').config
Named export for config object
rules
import { rules } from 'stylelint-standard'
const { rules } = require('stylelint-standard')
Requires ESM import syntax

Lint a CSS string using the standard configuration and log warnings.

import stylelint from 'stylelint'; import stylelintStandard from 'stylelint-standard'; const result = await stylelint.lint({ code: '.foo { color: red; }', config: stylelintStandard, }); console.log(result.results[0].warnings);
Debug
Known issues
breakingBreaking change in v1.0.0: Config format changed from array to object.
fix
Update config import to use default export instead of array.
affects: >=1.0.0
deprecatedDeprecated: Use of deprecated rule 'block-no-empty' removed in v1.2.0, replaced by 'declaration-block-no-duplicate-properties'.
fix
Remove deprecated rule from custom config.
affects: >=1.2.0
gotchastylelint-standard does not include auto-fix rules; you must use stylelint --fix separately.
fix
Run stylelint with --fix flag for auto-correction.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: stylelintStandard is not a function
Using default import incorrectly as a function instead of configuration object.
fix
Use stylelintStandard directly as config: stylelint.lint({ config: stylelintStandard })
Cannot find module 'stylelint-standard'
Package not installed or import path incorrect.
fix
Run 'npm install stylelint-standard' and ensure correct import.
Upgrade
Version history
1.2.3latest on npm
Audit
Dependencies
stylelintrequiredpeer dependency for linting functionality
Agent activity
2 hits · last 30 days
node
2
Resources
stylelint-standard — npm install stylelint-standard · libregistry