eslint/css — dự án mã nguồn mở — đang có 313 sao GitHub. CSS language plugin for ESLint
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
You can individually configure, 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 {
}
Languages
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:
By default, the CSS parser runs in strict mode, which reports all parsing errors. If you'd like to allow recoverable parsing errors (those that the browser automatically fixes on its own), you can set the tolerant option to true:
Setting tolerant to true is necessary if you are using custom syntax, such as PostCSS plugins, that aren't part of the standard CSS syntax.
Configuring Custom Syntax
The CSS lexer comes prebuilt with a set of known syntax for CSS that is used in rules like no-invalid-properties to validate CSS code. While this works for most cases, there may be cases when you want to define your own extensions to CSS, and this can be done using the customSyntax language option.
The customSyntax option accepts either an object or a function:
Object-based syntax: An object that uses the CSSTree format for defining custom syntax, which allows you to specify at-rules, properties, and some types. For example, suppose you'd like to define a custom at-rule that looks like this:
Function-based syntax: A function that receives the default CSS syntax data and returns a custom syntax configuration. This is useful when you want to extend the base syntax rather than replace it. For example:
Tailwind specifies some extensions to CSS that will otherwise be flagged as invalid by the rules in this plugin. To properly parse Tailwind-specific syntax, install the tailwind-csstree package:
npm i tailwind-csstree --save-dev
Then include it in your configuration using languageOptions.customSyntax:
First, ensure you have the ESLint plugin installed.
Then, edit eslint.validate in your settings.json file to include css:
{
"eslint.validate": ["css"]
}
JetBrains WebStorm
For any JetBrains WebStorm, configure the ESLint scope to include css, such as:
**/*.{js,ts,jsx,tsx,cjs,cts,mjs,mts,html,vue,css}
License
Apache 2.0
Sponsors
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.
Gold Sponsors
Silver Sponsors
Bronze Sponsors
Technology Sponsors
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/eslint/css là nguồn chính thức.
eslint/css có bao nhiêu sao?
eslint/css có 313 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/eslint/css. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
eslint/css có phải mã nguồn mở không?
Có — eslint/css phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/eslint/css.
eslint/css còn đang phát triển không?
Commit gần nhất trên eslint/css là 11 ngày trước (theo timestamp GitHub). Repo có 43 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
eslint/css dùng license gì?
eslint/css phát hành theo license Apache-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
eslint/css là gì?
eslint/css (eslint/css) là dự án JavaScript trên GitHub. Theo mô tả gốc: CSS language plugin for ESLint
eslint/css viết bằng ngôn ngữ gì?
eslint/css chủ yếu viết bằng JavaScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
css có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về css.