Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@stylistic/stylelint-plugin
Advanced tools
An updatable collection of stylistic rules for Stylelint (in plugin form).
Stylelint has removed 76 rules that enforce stylistic conventions. This project returns these rules to keep styles consistent with your codeguide. In addition, new rules may be added in the future.
Add @stylistic/stylelint-plugin
and stylelint
itself to your project:
npm add -D stylelint @stylistic/stylelint-plugin
Create the .stylelintrc
config file (or open the existing one), add @stylistic/stylelint-plugin
to the plugins array and the rules you need to the rules list. All rules from @stylistic/stylelint-plugin
need to be namespaced with @stylistic/
:
{
"plugins": [
"@stylistic/stylelint-plugin"
],
"rules": {
// syntax rules from stylelint:
"color-function-notation": "modern",
"selector-max-compound-selectors": 2,
// stylistic rules from @stylistic/stylelint-plugin:
"@stylistic/color-hex-case": "lower",
"@stylistic/number-leading-zero": "always",
"@stylistic/unit-case": "lower"
}
}
To avoid listing a lot of rules, you can use @stylistic/stylelint-config
, which returns the stylistic rules removed in stylelint-config-standard
and stylelint-config-recommended
.
Please refer to Stylelint docs for detailed info on using this linter.
ESLint deprecates stylistic rules, too. But you can continue to use them thanks to ESLint Stylistic.
[3.0.1] — 2024–08–18
context.fix
, which is deprecated in stylelint@16.8.2
, is no longer used. Previously, attempts to update stylelint
to 16.8.2
version resulted in multiple DeprecationWarning messages (#37).FAQs
A collection of stylistic/formatting Stylelint rules
The npm package @stylistic/stylelint-plugin receives a total of 94,794 weekly downloads. As such, @stylistic/stylelint-plugin popularity was classified as popular.
We found that @stylistic/stylelint-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.