@master/eslint-plugin-css 2.0.0-rc.84 → 2.0.0-rc.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +115 -115
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -2,52 +2,52 @@
|
|
|
2
2
|
<div align="center">
|
|
3
3
|
|
|
4
4
|
<p align="center">
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
<a href="https://css.master.co">
|
|
6
|
+
<picture>
|
|
7
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/33840671/201701649-3bb7d698-abec-4d5f-ac30-ccc4d7bafcd4.svg">
|
|
8
|
+
<source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/33840671/201703010-77bf2373-9899-40cc-98f5-30cf9b546941.svg">
|
|
9
|
+
<img alt="Master CSS" src="https://user-images.githubusercontent.com/33840671/201703010-77bf2373-9899-40cc-98f5-30cf9b546941.svg" width="100%">
|
|
10
|
+
</picture>
|
|
11
|
+
</a>
|
|
12
12
|
</p>
|
|
13
13
|
<p align="center">An ESLint plugin enforcing a consistent coding style for Master CSS</p>
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
16
|
+
<a aria-label="GitHub release (latest by date including pre-releases)" href="https://github.com/master-co/css/releases">
|
|
17
|
+
<picture>
|
|
18
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/v/release/master-co/css?include_prereleases&color=212022&label=&style=for-the-badge&logo=github&logoColor=fff">
|
|
19
|
+
<source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/v/release/master-co/css?include_prereleases&color=f6f7f8&label=&style=for-the-badge&logo=github&logoColor=%23000">
|
|
20
|
+
<img alt="NPM Version" src="https://img.shields.io/github/v/release/master-co/css?include_prereleases&color=f6f7f8&label=&style=for-the-badge&logo=github">
|
|
21
|
+
</picture>
|
|
22
|
+
</a>
|
|
23
|
+
<a aria-label="NPM Package" href="https://www.npmjs.com/package/@master/eslint-plugin-css">
|
|
24
|
+
<picture>
|
|
25
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/dm/@master/eslint-plugin-css?color=212022&label=%20&logo=npm&style=for-the-badge">
|
|
26
|
+
<source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/npm/dm/@master/eslint-plugin-css?color=f6f7f8&label=%20&logo=npm&style=for-the-badge">
|
|
27
|
+
<img alt="NPM package ( download / month )" src="https://img.shields.io/npm/dm/@master/eslint-plugin-css?color=f6f7f8&label=%20&logo=npm&style=for-the-badge">
|
|
28
|
+
</picture>
|
|
29
|
+
</a>
|
|
30
|
+
<a aria-label="Discord Community" href="https://discord.gg/sZNKpAAAw6">
|
|
31
|
+
<picture>
|
|
32
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/discord/917780624314613760?color=212022&label=%20&logo=discord&style=for-the-badge">
|
|
33
|
+
<source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/discord/917780624314613760?color=f6f7f8&label=%20&logo=discord&style=for-the-badge">
|
|
34
|
+
<img alt="Discord online" src="https://img.shields.io/discord/917780624314613760?color=f6f7f8&label=%20&logo=discord&style=for-the-badge">
|
|
35
|
+
</picture>
|
|
36
|
+
</a>
|
|
37
|
+
<a aria-label="Follow @mastercorg" href="https://twitter.com/mastercorg">
|
|
38
|
+
<picture>
|
|
39
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/static/v1?label=%20&message=twitter&color=212022&logo=twitter&style=for-the-badge">
|
|
40
|
+
<source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/static/v1?label=%20&message=twitter&color=f6f7f8&logo=twitter&style=for-the-badge">
|
|
41
|
+
<img alt="Follow @mastercorg" src="https://img.shields.io/static/v1?label=%20&message=twitter&color=f6f7f8&logo=twitter&style=for-the-badge">
|
|
42
|
+
</picture>
|
|
43
|
+
</a>
|
|
44
|
+
<a aria-label="Github Actions" href="https://github.com/master-co/css/actions/workflows/ci-release.yml">
|
|
45
|
+
<picture>
|
|
46
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/actions/workflow/status/master-co/css/ci-release.yml?branch=rc&label=%20&message=twitter&color=212022&logo=githubactions&style=for-the-badge">
|
|
47
|
+
<source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/actions/workflow/status/master-co/css/ci-release.yml?branch=rc&label=%20&message=twitter&color=f6f7f8&logo=githubactions&style=for-the-badge&logoColor=%23000">
|
|
48
|
+
<img alt="Github release actions" src="https://img.shields.io/github/actions/workflow/status/master-co/css/ci-release.yml?branch=rc&label=%20&message=twitter&color=f6f7f8&logo=githubactions&style=for-the-badge&logoColor=%23000">
|
|
49
|
+
</picture>
|
|
50
|
+
</a>
|
|
51
51
|
</p>
|
|
52
52
|
|
|
53
53
|
</div>
|
|
@@ -73,26 +73,26 @@ import htmlParser from '@angular-eslint/template-parser'
|
|
|
73
73
|
import tsParser from '@typescript-eslint/parser'
|
|
74
74
|
|
|
75
75
|
export default defineConfig([
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
files: ['**/*.{ts,tsx}'],
|
|
84
|
-
languageOptions: {
|
|
85
|
-
parser: tsParser
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
...css,
|
|
89
|
-
{
|
|
90
|
-
rules: {
|
|
91
|
-
'@master/css/no-invalid-classes': ['error', {
|
|
92
|
-
disallowUnknownClass: true
|
|
93
|
-
}]
|
|
94
|
-
}
|
|
76
|
+
{
|
|
77
|
+
files: ['**/*.html'],
|
|
78
|
+
languageOptions: {
|
|
79
|
+
parser: htmlParser
|
|
95
80
|
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
files: ['**/*.{ts,tsx}'],
|
|
84
|
+
languageOptions: {
|
|
85
|
+
parser: tsParser
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
...css,
|
|
89
|
+
{
|
|
90
|
+
rules: {
|
|
91
|
+
'@master/css/no-invalid-classes': ['error', {
|
|
92
|
+
disallowUnknownClass: true
|
|
93
|
+
}]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
96
|
])
|
|
97
97
|
```
|
|
98
98
|
|
|
@@ -106,11 +106,11 @@ Sorts Master CSS classes into a consistent and logical order.
|
|
|
106
106
|
import { defineConfig } from 'eslint/config'
|
|
107
107
|
|
|
108
108
|
export default defineConfig([
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
109
|
+
{
|
|
110
|
+
rules: {
|
|
111
|
+
'@master/css/sort-classes': 'warn'
|
|
113
112
|
}
|
|
113
|
+
}
|
|
114
114
|
])
|
|
115
115
|
```
|
|
116
116
|
|
|
@@ -122,11 +122,11 @@ Disallows invalid Master CSS classes.
|
|
|
122
122
|
import { defineConfig } from 'eslint/config'
|
|
123
123
|
|
|
124
124
|
export default defineConfig([
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
125
|
+
{
|
|
126
|
+
rules: {
|
|
127
|
+
'@master/css/no-invalid-classes': 'error'
|
|
129
128
|
}
|
|
129
|
+
}
|
|
130
130
|
])
|
|
131
131
|
```
|
|
132
132
|
|
|
@@ -136,13 +136,13 @@ Set `disallowUnknownClass: true` to reject classes that do not match the active
|
|
|
136
136
|
import { defineConfig } from 'eslint/config'
|
|
137
137
|
|
|
138
138
|
export default defineConfig([
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
139
|
+
{
|
|
140
|
+
rules: {
|
|
141
|
+
'@master/css/no-invalid-classes': ['error', {
|
|
142
|
+
disallowUnknownClass: true
|
|
143
|
+
}]
|
|
145
144
|
}
|
|
145
|
+
}
|
|
146
146
|
])
|
|
147
147
|
```
|
|
148
148
|
|
|
@@ -154,11 +154,11 @@ Prefers canonical Master CSS class forms, including semantic utilities, theme to
|
|
|
154
154
|
import { defineConfig } from 'eslint/config'
|
|
155
155
|
|
|
156
156
|
export default defineConfig([
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
157
|
+
{
|
|
158
|
+
rules: {
|
|
159
|
+
'@master/css/prefer-canonical-classes': 'warn'
|
|
161
160
|
}
|
|
161
|
+
}
|
|
162
162
|
])
|
|
163
163
|
```
|
|
164
164
|
|
|
@@ -173,7 +173,7 @@ import { defineConfig } from 'eslint/config'
|
|
|
173
173
|
import css from '@master/eslint-config-css'
|
|
174
174
|
|
|
175
175
|
export default defineConfig([
|
|
176
|
-
|
|
176
|
+
...css
|
|
177
177
|
])
|
|
178
178
|
```
|
|
179
179
|
|
|
@@ -185,21 +185,21 @@ You can disable specific canonicalization families:
|
|
|
185
185
|
import { defineConfig } from 'eslint/config'
|
|
186
186
|
|
|
187
187
|
export default defineConfig([
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
188
|
+
{
|
|
189
|
+
rules: {
|
|
190
|
+
'@master/css/prefer-canonical-classes': ['warn', {
|
|
191
|
+
preferStaticUtilities: true,
|
|
192
|
+
preferThemeTokens: true,
|
|
193
|
+
preferPropertyAliases: true,
|
|
194
|
+
preferVariableReferences: true,
|
|
195
|
+
preferMultiValueTokens: true,
|
|
196
|
+
preferCompositionUtilities: true,
|
|
197
|
+
preferConditionOrder: true,
|
|
198
|
+
preferNativeDeclarationsInCompose: true,
|
|
199
|
+
preferVariantBlocksInCompose: true
|
|
200
|
+
}]
|
|
202
201
|
}
|
|
202
|
+
}
|
|
203
203
|
])
|
|
204
204
|
```
|
|
205
205
|
|
|
@@ -211,11 +211,11 @@ Disallows classes that emit the same CSS declaration properties for the same var
|
|
|
211
211
|
import { defineConfig } from 'eslint/config'
|
|
212
212
|
|
|
213
213
|
export default defineConfig([
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
214
|
+
{
|
|
215
|
+
rules: {
|
|
216
|
+
'@master/css/no-conflicting-classes': 'warn'
|
|
218
217
|
}
|
|
218
|
+
}
|
|
219
219
|
])
|
|
220
220
|
```
|
|
221
221
|
|
|
@@ -229,14 +229,14 @@ Disallows raw values in token-backed utilities unless they are explicitly allowe
|
|
|
229
229
|
import { defineConfig } from 'eslint/config'
|
|
230
230
|
|
|
231
231
|
export default defineConfig([
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
232
|
+
{
|
|
233
|
+
rules: {
|
|
234
|
+
'@master/css/no-unapproved-raw-values': ['warn', {
|
|
235
|
+
allowProperties: ['width', 'height'],
|
|
236
|
+
allowedPatterns: ['^var\\(', '^calc\\(']
|
|
237
|
+
}]
|
|
239
238
|
}
|
|
239
|
+
}
|
|
240
240
|
])
|
|
241
241
|
```
|
|
242
242
|
|
|
@@ -250,17 +250,17 @@ Settings live under the `@master/css` settings key:
|
|
|
250
250
|
import { defineConfig } from 'eslint/config'
|
|
251
251
|
|
|
252
252
|
export default defineConfig([
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
253
|
+
{
|
|
254
|
+
settings: {
|
|
255
|
+
'@master/css': {
|
|
256
|
+
classAttributes: ['class', 'className'],
|
|
257
|
+
classFunctions: ['clsx', 'classList.add'],
|
|
258
|
+
classDeclarations: ['classes'],
|
|
259
|
+
ignoredKeys: ['compoundVariants', 'defaultVariants'],
|
|
260
|
+
manifest
|
|
261
|
+
}
|
|
263
262
|
}
|
|
263
|
+
}
|
|
264
264
|
])
|
|
265
265
|
```
|
|
266
266
|
|
package/package.json
CHANGED
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@typescript-eslint/utils": "^8.61.1",
|
|
49
49
|
"typescript-eslint": "^8.61.1",
|
|
50
|
-
"@master/css": "^2.0.0-rc.
|
|
51
|
-
"@master/css-lexer": "^2.0.0-rc.
|
|
52
|
-
"@master/css-
|
|
53
|
-
"@master/css-project": "^2.0.0-rc.
|
|
54
|
-
"@master/css-
|
|
55
|
-
"@master/css-validator": "^2.0.0-rc.
|
|
50
|
+
"@master/css": "^2.0.0-rc.85",
|
|
51
|
+
"@master/css-lexer": "^2.0.0-rc.85",
|
|
52
|
+
"@master/css-lint": "^2.0.0-rc.85",
|
|
53
|
+
"@master/css-project": "^2.0.0-rc.85",
|
|
54
|
+
"@master/css-preset": "^2.0.0-rc.85",
|
|
55
|
+
"@master/css-validator": "^2.0.0-rc.85"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@angular-eslint/template-parser": "^21.4.0",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"svelte-eslint-parser": "^1.8.0",
|
|
66
66
|
"ts-node": "^10.9.2",
|
|
67
67
|
"vue-eslint-parser": "^10.4.1",
|
|
68
|
-
"@master/css-schema": "^2.0.0-rc.
|
|
68
|
+
"@master/css-schema": "^2.0.0-rc.85"
|
|
69
69
|
},
|
|
70
|
-
"version": "2.0.0-rc.
|
|
70
|
+
"version": "2.0.0-rc.85",
|
|
71
71
|
"scripts": {
|
|
72
72
|
"build": "tsdown --config ../../shared/tsdown-package.config.ts",
|
|
73
73
|
"dev": "tsdown --config ../../shared/tsdown-package.config.ts --watch",
|