@master/eslint-config-css 2.0.0-rc.84 → 2.0.0-rc.86

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.
@@ -1,16 +1,11 @@
1
1
  $ tsdown --config ../../shared/tsdown-package.config.ts
2
- ℹ tsdown v0.22.3 powered by rolldown v1.1.3
2
+ ℹ tsdown v0.22.4 powered by rolldown v1.1.5
3
3
  ℹ config file: /home/runner/work/css/css/shared/tsdown-package.config.ts
4
4
  ℹ entry: src/index.ts
5
5
  ℹ tsconfig: tsconfig.prod.json
6
6
  ℹ Build start
7
+ TypeScript 7.0 does not yet have a stable API and is experimental. Some options will be unavailable.
7
8
  ℹ dist/index.js 0.19 kB │ gzip: 0.15 kB
8
9
  ℹ dist/index.d.ts 0.15 kB │ gzip: 0.13 kB
9
10
  ℹ 2 files, total: 0.34 kB
10
- [PLUGIN_TIMINGS] Your build spent significant time in plugins. Here is a breakdown:
11
- - tsdown:deps (49%)
12
- - rolldown-plugin-dts:generate (26%)
13
- - external-virtual-modules (25%)
14
- See https://rolldown.rs/reference/InputOptions.checks#plugintimings for more details.
15
-
16
- ✔ Build complete in 5525ms
11
+ ✔ Build complete in 772ms
package/README.md CHANGED
@@ -2,52 +2,52 @@
2
2
  <div align="center">
3
3
 
4
4
  <p align="center">
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>
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 config enforcing a consistent coding style for Master CSS</p>
14
14
 
15
15
  <p align="center">
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-config-css">
24
- <picture>
25
- <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/dm/@master/eslint-config-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-config-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-config-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>
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-config-css">
24
+ <picture>
25
+ <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/dm/@master/eslint-config-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-config-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-config-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>
@@ -67,7 +67,7 @@ import { defineConfig } from 'eslint/config'
67
67
  import css from '@master/eslint-config-css'
68
68
 
69
69
  export default defineConfig([
70
- ...css
70
+ ...css
71
71
  ])
72
72
  ```
73
73
 
@@ -80,14 +80,14 @@ import { defineConfig } from 'eslint/config'
80
80
  import css from '@master/eslint-config-css'
81
81
 
82
82
  export default defineConfig([
83
- ...css,
84
- {
85
- rules: {
86
- '@master/css/no-invalid-classes': ['error', {
87
- disallowUnknownClass: true
88
- }]
89
- }
83
+ ...css,
84
+ {
85
+ rules: {
86
+ '@master/css/no-invalid-classes': ['error', {
87
+ disallowUnknownClass: true
88
+ }]
90
89
  }
90
+ }
91
91
  ])
92
92
  ```
93
93
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Linter } from "eslint";
2
-
3
2
  //#region src/index.d.ts
4
3
  declare const recommended: Linter.Config[];
5
4
  //#endregion
package/eslint.config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import common from '../../eslint.config.js'
2
2
 
3
3
  export default [
4
- ...common
4
+ ...common
5
5
  ]
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.84"
39
+ "@master/eslint-plugin-css": "^2.0.0-rc.86"
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.84",
48
+ "version": "2.0.0-rc.86",
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
@@ -2,8 +2,8 @@ import css from '@master/eslint-plugin-css'
2
2
  import type { Linter } from 'eslint'
3
3
 
4
4
  const recommended: Linter.Config[] = [
5
- css.configs.recommended,
6
- css.configs.stylesheet
5
+ css.configs.recommended,
6
+ css.configs.stylesheet
7
7
  ]
8
8
 
9
9
  export default recommended
@@ -3,13 +3,13 @@ import css from '@master/eslint-config-css'
3
3
  import htmlParser from '@angular-eslint/template-parser'
4
4
 
5
5
  export default defineConfig([
6
- ...css,
7
- {
8
- files: [
9
- '*.html'
10
- ],
11
- languageOptions: {
12
- parser: htmlParser
13
- }
6
+ ...css,
7
+ {
8
+ files: [
9
+ '*.html'
10
+ ],
11
+ languageOptions: {
12
+ parser: htmlParser
14
13
  }
14
+ }
15
15
  ])
package/tests/test.ts CHANGED
@@ -3,41 +3,41 @@ import { ESLint } from 'eslint'
3
3
  import css from '../src/index'
4
4
 
5
5
  test('ESLint Configuration is valid', async () => {
6
- const eslint = new ESLint({ cwd: __dirname })
7
- const result = await eslint.lintFiles('./index.html')
8
- expect(result[0].errorCount).toBe(0)
9
- expect(result[0].warningCount).toBe(9)
10
- expect(result[0].messages.map((eachMessage) => eachMessage.message)).toEqual(
11
- [
12
- 'No consistent class order followed.',
13
- '"m:0.625rem", "m:5x", and "m:10x@sm" are overridden by "m:1.875rem" and "m:3.125rem@sm".',
14
- 'No consistent class order followed.',
15
- 'Prefer "font:xs" over "font:.75rem".',
16
- 'Prefer "font:2xl@sm" over "font:1.5rem@sm".',
17
- 'Prefer "mx:8x mt:8x" over "m:8x" because "mb:12x" overrides part of it.',
18
- 'Prefer "m:xl" over "m:8x".',
19
- 'Prefer "font:3xl@md" over "font:2rem@md".',
20
- 'Prefer "mb:2xl" over "mb:12x".',
21
- ]
22
- )
6
+ const eslint = new ESLint({ cwd: __dirname })
7
+ const result = await eslint.lintFiles('./index.html')
8
+ expect(result[0].errorCount).toBe(0)
9
+ expect(result[0].warningCount).toBe(9)
10
+ expect(result[0].messages.map((eachMessage) => eachMessage.message)).toEqual(
11
+ [
12
+ 'Sort classes into the expected order: "m:0.625rem m:1.875rem m:5x m:3.125rem@sm m:10x@sm".',
13
+ 'Remove classes "m:0.625rem m:5x m:10x@sm"; they are overridden by later classes "m:1.875rem m:3.125rem@sm".',
14
+ 'Sort classes into the expected order: "block m:8x mb:12x font:.75rem font:1.5rem@sm font:2rem@md".',
15
+ 'Use canonical class "font:xs" instead of "font:.75rem".',
16
+ 'Use canonical class "font:2xl@sm" instead of "font:1.5rem@sm".',
17
+ 'Replace "m:8x" with "mx:8x mt:8x"; later class "mb:12x" overrides part of "m:8x".',
18
+ 'Use canonical class "m:xl" instead of "m:8x".',
19
+ 'Use canonical class "font:3xl@md" instead of "font:2rem@md".',
20
+ 'Use canonical class "mb:2xl" instead of "mb:12x".',
21
+ ]
22
+ )
23
23
  })
24
24
 
25
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' })
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
39
 
40
- expect(diagnosticResult.errorCount).toBe(0)
41
- expect(diagnosticResult.warningCount).toBe(1)
42
- expect(fixResult.output).toBe('.btn { contain: content; }')
40
+ expect(diagnosticResult.errorCount).toBe(0)
41
+ expect(diagnosticResult.warningCount).toBe(1)
42
+ expect(fixResult.output).toBe('.btn { contain: content; }')
43
43
  })
package/tsconfig.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "dist",
5
- "strict": false
6
- },
7
- "include": [
8
- "src/**/*.ts",
9
- "tests/**/*.test.ts",
10
- "tests/**/test.ts"
11
- ]
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist",
5
+ "strict": false
6
+ },
7
+ "include": [
8
+ "src/**/*.ts",
9
+ "tests/**/*.test.ts",
10
+ "tests/**/test.ts"
11
+ ]
12
12
  }
@@ -1,10 +1,10 @@
1
1
  {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "rootDir": "src",
5
- "outDir": "dist",
6
- },
7
- "include": [
8
- "src/**/*"
9
- ]
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "rootDir": "src",
5
+ "outDir": "dist",
6
+ },
7
+ "include": [
8
+ "src/**/*"
9
+ ]
10
10
  }
@@ -1,19 +1,19 @@
1
1
  {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "composite": true,
5
- "incremental": true,
6
- "declaration": true,
7
- "declarationMap": false,
8
- "emitDeclarationOnly": true,
9
- "noEmit": false,
10
- "rootDir": ".",
11
- "outDir": ".tsbuild/typecheck",
12
- "tsBuildInfoFile": ".tsbuild/typecheck/tsconfig.tsbuildinfo"
13
- },
14
- "references": [
15
- {
16
- "path": "../eslint-plugin/tsconfig.typecheck.json"
17
- }
18
- ]
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "composite": true,
5
+ "incremental": true,
6
+ "declaration": true,
7
+ "declarationMap": false,
8
+ "emitDeclarationOnly": true,
9
+ "noEmit": false,
10
+ "rootDir": ".",
11
+ "outDir": ".tsbuild/typecheck",
12
+ "tsBuildInfoFile": ".tsbuild/typecheck/tsconfig.tsbuildinfo"
13
+ },
14
+ "references": [
15
+ {
16
+ "path": "../eslint-plugin/tsconfig.typecheck.json"
17
+ }
18
+ ]
19
19
  }