@master/eslint-config-css 2.0.0-rc.75 → 2.0.0-rc.76
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/.turbo/turbo-build.log +5 -5
- package/AI.md +2 -2
- package/README.md +3 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/index.ts +4 -1
- package/tests/eslint.config.js +2 -2
- package/tests/test.ts +21 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -4,12 +4,12 @@ $ tsdown --config ../../shared/tsdown-package.config.ts
|
|
|
4
4
|
[34mℹ[39m entry: [34msrc/index.ts[39m
|
|
5
5
|
[34mℹ[39m tsconfig: [34mtsconfig.prod.json[39m
|
|
6
6
|
[34mℹ[39m Build start
|
|
7
|
-
[34mℹ[39m [2mdist/[22m[1mindex.js[22m [2m0.
|
|
7
|
+
[34mℹ[39m [2mdist/[22m[1mindex.js[22m [2m0.19 kB[22m [2m│ gzip: 0.15 kB[22m
|
|
8
8
|
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.ts[22m[39m [2m0.15 kB[22m [2m│ gzip: 0.13 kB[22m
|
|
9
|
-
[34mℹ[39m 2 files, total: 0.
|
|
9
|
+
[34mℹ[39m 2 files, total: 0.34 kB
|
|
10
10
|
[33m[PLUGIN_TIMINGS] [0mYour build spent significant time in plugins. Here is a breakdown:
|
|
11
|
-
-
|
|
12
|
-
-
|
|
11
|
+
- tsdown:deps (65%)
|
|
12
|
+
- rolldown-plugin-dts:generate (34%)
|
|
13
13
|
See https://rolldown.rs/reference/InputOptions.checks#plugintimings for more details.
|
|
14
14
|
|
|
15
|
-
[32m✔[39m Build complete in [
|
|
15
|
+
[32m✔[39m Build complete in [32m4598ms[39m
|
package/AI.md
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Responsibility
|
|
4
4
|
|
|
5
|
-
`@master/eslint-config-css`
|
|
5
|
+
`@master/eslint-config-css` combines the recommended class linting config and stylesheet linting config from `@master/eslint-plugin-css`.
|
|
6
6
|
|
|
7
7
|
## Owns
|
|
8
8
|
|
|
9
9
|
- Config wrapper package entrypoint.
|
|
10
|
-
- Compatibility with the plugin recommended config
|
|
10
|
+
- Compatibility with the plugin recommended and stylesheet config shapes.
|
|
11
11
|
|
|
12
12
|
## Does Not Own
|
|
13
13
|
|
package/README.md
CHANGED
|
@@ -66,18 +66,16 @@ Use the flat config in `eslint.config.js`:
|
|
|
66
66
|
import css from '@master/eslint-config-css'
|
|
67
67
|
|
|
68
68
|
/** @type {import('eslint').Linter.Config[]} */
|
|
69
|
-
export default [
|
|
70
|
-
css
|
|
71
|
-
]
|
|
69
|
+
export default [...css]
|
|
72
70
|
```
|
|
73
71
|
|
|
74
|
-
This package
|
|
72
|
+
This package combines the recommended class linting config and the standalone stylesheet config from `@master/eslint-plugin-css`.
|
|
75
73
|
|
|
76
74
|
For custom rules and settings, configure the plugin rules in the same flat config:
|
|
77
75
|
|
|
78
76
|
```js
|
|
79
77
|
export default [
|
|
80
|
-
css,
|
|
78
|
+
...css,
|
|
81
79
|
{
|
|
82
80
|
rules: {
|
|
83
81
|
'@master/css/no-invalid-classes': ['error', {
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"provenance": true
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@master/eslint-plugin-css": "^2.0.0-rc.
|
|
39
|
+
"@master/eslint-plugin-css": "^2.0.0-rc.76"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"eslint": ">=9.0.0"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@angular-eslint/template-parser": "^21.4.0",
|
|
46
46
|
"eslint": "^10.5.0"
|
|
47
47
|
},
|
|
48
|
-
"version": "2.0.0-rc.
|
|
48
|
+
"version": "2.0.0-rc.76",
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsdown --config ../../shared/tsdown-package.config.ts",
|
|
51
51
|
"dev": "tsdown --config ../../shared/tsdown-package.config.ts --watch",
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import css from '@master/eslint-plugin-css'
|
|
2
2
|
import type { Linter } from 'eslint'
|
|
3
3
|
|
|
4
|
-
const recommended: Linter.Config =
|
|
4
|
+
const recommended: Linter.Config[] = [
|
|
5
|
+
css.configs.recommended,
|
|
6
|
+
css.configs.stylesheet
|
|
7
|
+
]
|
|
5
8
|
|
|
6
9
|
export default recommended
|
package/tests/eslint.config.js
CHANGED
package/tests/test.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { test, expect } from 'vitest'
|
|
2
2
|
import { ESLint } from 'eslint'
|
|
3
|
+
import css from '../src/index'
|
|
3
4
|
|
|
4
5
|
test('ESLint Configuration is valid', async () => {
|
|
5
6
|
const eslint = new ESLint({ cwd: __dirname })
|
|
@@ -20,3 +21,23 @@ test('ESLint Configuration is valid', async () => {
|
|
|
20
21
|
]
|
|
21
22
|
)
|
|
22
23
|
})
|
|
24
|
+
|
|
25
|
+
test('Default ESLint configuration lints standalone stylesheets', async () => {
|
|
26
|
+
const diagnosticESLint = new ESLint({
|
|
27
|
+
cwd: __dirname,
|
|
28
|
+
overrideConfigFile: true,
|
|
29
|
+
overrideConfig: css
|
|
30
|
+
})
|
|
31
|
+
const fixESLint = new ESLint({
|
|
32
|
+
cwd: __dirname,
|
|
33
|
+
fix: true,
|
|
34
|
+
overrideConfigFile: true,
|
|
35
|
+
overrideConfig: css
|
|
36
|
+
})
|
|
37
|
+
const [diagnosticResult] = await diagnosticESLint.lintText('.btn { @compose contain:content; }', { filePath: 'index.css' })
|
|
38
|
+
const [fixResult] = await fixESLint.lintText('.btn { @compose contain:content; }', { filePath: 'index.css' })
|
|
39
|
+
|
|
40
|
+
expect(diagnosticResult.errorCount).toBe(0)
|
|
41
|
+
expect(diagnosticResult.warningCount).toBe(1)
|
|
42
|
+
expect(fixResult.output).toBe('.btn { contain: content; }')
|
|
43
|
+
})
|