@master/eslint-config-css 2.0.0-rc.4 → 2.0.0-rc.41

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 CHANGED
@@ -41,7 +41,7 @@
41
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
42
  </picture>
43
43
  </a>
44
- <a aria-label="Github Actions" href="https://github.com/1aron/repo/actions/workflows/release.yml">
44
+ <a aria-label="Github Actions" href="https://github.com/master-co/css/actions/workflows/release.yml">
45
45
  <picture>
46
46
  <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/actions/workflow/status/master-co/css/release.yml?branch=rc&label=%20&message=twitter&color=212022&logo=githubactions&style=for-the-badge">
47
47
  <source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/actions/workflow/status/master-co/css/release.yml?branch=rc&label=%20&message=twitter&color=f6f7f8&logo=githubactions&style=for-the-badge&logoColor=%23000">
@@ -53,4 +53,4 @@
53
53
  </div>
54
54
 
55
55
  ## Documentation
56
- Check out the official [documentation](https://rc.css.master.co/docs/code-linting).
56
+ Check out the official [documentation](https://rc.css.master.co/guide/code-linting).
package/dist/flat.cjs ADDED
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var plugin = require('@master/eslint-plugin-css');
4
+
5
+ var flat = plugin.configs.flat;
6
+
7
+ module.exports = flat;
package/dist/flat.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ declare const _default: {
2
+ plugins: {
3
+ '@master/css': {
4
+ meta: {
5
+ name: string;
6
+ };
7
+ rules: {
8
+ 'class-collision': import("@typescript-eslint/utils/ts-eslint").RuleModule<"collisionClass", [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
9
+ 'class-order': import("@typescript-eslint/utils/ts-eslint").RuleModule<"invalidClassOrder", [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
10
+ 'class-validation': import("@typescript-eslint/utils/ts-eslint").RuleModule<"invalidClass" | "disallowUnknownClass", [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
11
+ };
12
+ };
13
+ };
14
+ rules: {
15
+ '@master/css/class-order': string;
16
+ '@master/css/class-validation': string;
17
+ '@master/css/class-collision': string;
18
+ };
19
+ languageOptions: {
20
+ parserOptions: {
21
+ ecmaFeatures: {
22
+ jsx: boolean;
23
+ };
24
+ };
25
+ };
26
+ };
27
+ export default _default;
package/dist/flat.mjs ADDED
@@ -0,0 +1,5 @@
1
+ import plugin from '@master/eslint-plugin-css';
2
+
3
+ var flat = plugin.configs.flat;
4
+
5
+ export { flat as default };
package/dist/index.cjs ADDED
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var index = {
4
+ extends: [
5
+ 'plugin:@master/css/recommended'
6
+ ]
7
+ };
8
+
9
+ module.exports = index;
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ extends: string[];
3
+ };
4
+ export default _default;
package/dist/index.mjs ADDED
@@ -0,0 +1,7 @@
1
+ var index = {
2
+ extends: [
3
+ 'plugin:@master/css/recommended'
4
+ ]
5
+ };
6
+
7
+ export { index as default };
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@master/eslint-config-css","keywords":["mastercss","eslint","eslintconfig"],"license":"MIT","description":"Master CSS ESLint Plugin Config","author":"Aoyue Design LLC.","funding":"https://css.master.co/docs/donate","homepage":"https://css.master.co","bugs":{"url":"https://github.com/master-co/css/issues"},"repository":{"type":"git","url":"https://github.com/master-co/css.git","directory":"packages/eslint-config"},"main":"index.js","exports":{".":"./index.js","./flat":"./flat.js"},"publishConfig":{"access":"public"},"dependencies":{"@master/eslint-plugin-css":"^2.0.0-rc.4"},"version":"2.0.0-rc.4"}
1
+ {"name":"@master/eslint-config-css","type":"module","scripts":{"build":"techor build \"src/**/*.ts\"","dev":"pnpm build --watch","type-check":"tsc --noEmit","test":"vitest"},"keywords":["mastercss","eslint","eslintconfig"],"license":"MIT","description":"Master CSS ESLint Config","author":"Aoyue Design LLC.","funding":"https://rc.css.master.co/sponsor","homepage":"https://css.master.co","bugs":{"url":"https://github.com/master-co/css/issues"},"repository":{"type":"git","url":"https://github.com/master-co/css.git","directory":"packages/eslint-config"},"main":"./dist/index.cjs","module":"./dist/index.mjs","jsnext:main":"./dist/index.mjs","esnext":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./flat":{"types":"./dist/flat.d.ts","import":"./dist/flat.mjs","require":"./dist/flat.cjs"}},"publishConfig":{"access":"public","provenance":true},"dependencies":{"@master/eslint-plugin-css":"^2.0.0-rc.41"},"devDependencies":{"@angular-eslint/template-parser":"^17.4.1","shared":"^2.0.0-rc.41","eslint":"^9.3.0"},"version":"2.0.0-rc.41"}
package/src/flat.ts ADDED
@@ -0,0 +1,3 @@
1
+ import plugin from '@master/eslint-plugin-css'
2
+
3
+ export default plugin.configs.flat
@@ -1,3 +1,3 @@
1
- module.exports = {
1
+ export default {
2
2
  extends: ['plugin:@master/css/recommended']
3
3
  }
@@ -0,0 +1,14 @@
1
+ import css from '@master/eslint-config-css/flat'
2
+ import htmlParser from '@angular-eslint/template-parser'
3
+
4
+ export default [
5
+ css,
6
+ {
7
+ files: [
8
+ '*.html'
9
+ ],
10
+ languageOptions: {
11
+ parser: htmlParser
12
+ }
13
+ }
14
+ ]
@@ -0,0 +1,4 @@
1
+ <div class="m:10 m:20 m:30 m:40@sm m:50@sm">...</div>
2
+ <div class="font:12 font:24@sm m:32 block font:32@md mb:48">...</div>
3
+ <button class="btn">...</button>
4
+ <div class="bg:indigo width:error">...</div>
package/tests/test.ts ADDED
@@ -0,0 +1,20 @@
1
+ import { test, expect } from 'vitest'
2
+ import { ESLint } from 'eslint'
3
+
4
+ test('ESLint Configuration is valid', async () => {
5
+ const eslint = new ESLint({ cwd: __dirname })
6
+ const result = await eslint.lintFiles('./index.html')
7
+ expect(result[0].errorCount).toBe(1)
8
+ expect(result[0].warningCount).toBe(6)
9
+ expect(result[0].messages.map((eachMessage) => eachMessage.message)).toEqual(
10
+ [
11
+ '"m:10" applies the same CSS declarations as "m:20" and "m:30".',
12
+ '"m:20" applies the same CSS declarations as "m:10" and "m:30".',
13
+ '"m:30" applies the same CSS declarations as "m:10" and "m:20".',
14
+ '"m:40@sm" applies the same CSS declarations as "m:50@sm".',
15
+ '"m:50@sm" applies the same CSS declarations as "m:40@sm".',
16
+ 'No consistent class order followed.',
17
+ 'Invalid value for `width` property.',
18
+ ]
19
+ )
20
+ })
package/tsconfig.json ADDED
@@ -0,0 +1,12 @@
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
+ ]
12
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "rootDir": "src",
5
+ "outDir": "dist",
6
+ },
7
+ "include": [
8
+ "src/**/*"
9
+ ]
10
+ }
@@ -0,0 +1,4 @@
1
+ import { defineConfig } from 'vitest/config'
2
+ import config from '../../shared/vitest.config'
3
+
4
+ export default defineConfig(config)
package/flat.js DELETED
@@ -1,3 +0,0 @@
1
- const { configs } = require('@master/eslint-plugin-css')
2
-
3
- module.exports = configs.flat