API Reference

@master/eslint-config-css

The ESLint configuration and plugin reference for Master CSS.

Usage

{
"extends": ["@master/css"]
}

The extended recommended configuration:

{
"plugins": [
"@master/css"
],
"rules": {
"@master/css/class-order": "warn",
"@master/css/class-validation": "error",
"@master/css/class-collision": "warn"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
}
}

Rules

class-order

Enforce a consistent and logical order of classes.

{
"rules": {
"@master/css/class-order": "warn"
}
}

class-validation

Detect syntax errors early when writing classes.

{
"rules": {
"@master/css/class-validation": "error"
}
}

Set disallowUnknownClass: true to disallow unknow classes and enforce strict checks:

{
"rules": {
"@master/css/class-validation": ["error", {
"disallowUnknownClass": true
}]
}
}

class-collision

Avoid applying classes with the same CSS declaration.

{
"rules": {
"@master/css/class-collision": "warn"
}
}

Settings

calleeMatching

Specify the names of the callee to check its arguments.

{
"settings": {
"calleeMatching": "^(classnames|clsx|ctl|cva|cv|classVariant|styled(?:\.\w+)?)"
}
}

classMatching

Specify the attribute/property to check classes.

{
"settings": {
"classMatching": "^class(Name)?$"
}
}

ignoredKeys

Specifies object keys to ignore checking.

{
"settings": {
"ignoredKeys": ["compoundVariants","defaultVariants"]
}
}

config

Specify a custom Master CSS configuration or path.

{
"settings": {
"config": "master.css"
}
}
API Reference
@master/create-css

CLI for creating a Master CSS config file or application.

API Reference
@master/css-extractor

Master CSS static extractor for various raw text extraction.

© Aoyue Design LLC.