Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@eslint/css
Advanced tools
This package contains a plugin that allows you to natively lint CSS files using ESLint.
Important: This plugin requires ESLint v9.6.0 or higher and you must be using the new configuration system.
For Node.js and compatible runtimes:
npm install @eslint/css -D
# or
yarn add @eslint/css -D
# or
pnpm install @eslint/css -D
# or
bun install @eslint/css -D
For Deno:
deno add @eslint/css
Configuration Name | Description |
---|---|
recommended | Enables all recommended rules. |
In your eslint.config.js
file, import @eslint/css
and include the recommended config:
// eslint.config.js
import css from "@eslint/css";
export default [
// lint CSS files
{
files: ["**/*.css"],
language: "css/css",
...css.configs.recommended,
},
// your other configs here
];
Rule Name | Description | Recommended |
---|---|---|
no-duplicate-imports | Disallow duplicate @import rules | yes |
no-empty-blocks | Disallow empty blocks | yes |
no-invalid-at-rules | Disallow invalid at-rules | yes |
no-invalid-properties | Disallow invalid properties | yes |
Note: This plugin does not provide formatting rules. We recommend using a source code formatter such as Prettier for that purpose.
In order to individually configure a rule in your eslint.config.js
file, import @eslint/css
and configure each rule with a prefix:
// eslint.config.js
import css from "@eslint/css";
export default [
{
files: ["**/*.css"],
plugins: {
css,
},
language: "css/css",
rules: {
"css/no-empty-blocks": "error",
},
},
];
You can individually config, disable, and enable rules in CSS using comments, such as:
/* eslint css/no-empty-blocks: error */
/* eslint-disable css/no-empty-blocks -- this one is ok */
a {
}
/* eslint-enable css/no-empty-blocks */
b { /* eslint-disable-line css/no-empty-blocks */
}
/* eslint-disable-next-line css/no-empty-blocks */
em {
}
Language Name | Description |
---|---|
css | Parse CSS stylesheets. |
In order to individually configure a language in your eslint.config.js
file, import @eslint/css
and configure a language
:
// eslint.config.js
import css from "@eslint/css";
export default [
{
files: ["**/*.css"],
plugins: {
css,
},
language: "css/css",
rules: {
"css/no-empty-blocks": "error",
},
},
];
Apache 2.0
The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. Become a Sponsor to get your logo on our READMEs and website.
FAQs
CSS linting plugin for ESLint
The npm package @eslint/css receives a total of 69 weekly downloads. As such, @eslint/css popularity was classified as not popular.
We found that @eslint/css demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.