Skip to content

Commit 8b4fce5

Browse files
committed
CI
1 parent f62d4de commit 8b4fce5

File tree

7 files changed

+28
-13
lines changed

7 files changed

+28
-13
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919

2020
This ESLint plugin provides linting rules specific to [Scoped CSS in Vue.js].
2121

22+
- Enforce best practices for Scoped CSS.
23+
- Supports CSS and SCSS syntax.
24+
2225
You can check on the [Online DEMO](https://ota-meshi.github.io/eslint-plugin-vue-scoped-css/playground/).
2326

2427
<!--DOCS_IGNORE_START-->
@@ -59,8 +62,8 @@ module.exports = {
5962

6063
This plugin provides 3 predefined configs:
6164

62-
- `plugin:vue-scoped-css/base` - Settings and rules to enable correct ESLint parsing
63-
- `plugin:vue-scoped-css/recommended` - Above, plus rules to improve code experience
65+
- `plugin:vue-scoped-css/base` - Settings and rules to enable this plugin
66+
- `plugin:vue-scoped-css/recommended` - Above, plus rules for better ways to help you avoid problems
6467
- `plugin:vue-scoped-css/all` - All rules of this plugin are included
6568

6669
## Rules
@@ -71,7 +74,7 @@ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/comm
7174

7275
<!--RULES_TABLE_START-->
7376

74-
### Base Rules (Enabling Correct ESLint Parsing)
77+
### Base Rules (Enabling Plugin)
7578

7679
Enable this plugin using with:
7780

@@ -81,7 +84,7 @@ Enable this plugin using with:
8184
}
8285
```
8386

84-
### Recommended (Improve Development Experience)
87+
### Recommended
8588

8689
Enforce all the rules in this category with:
8790

docs/.vuepress/categories.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
const { rules } = require("../../dist/utils/rules")
22

33
const categoryTitles = {
4-
base: "Base Rules (Enabling Correct ESLint Parsing)",
5-
recommended: "Recommended (Improve Development Experience)",
4+
base: "Base Rules (Enabling Plugin)",
5+
recommended: "Recommended",
66
}
77

88
const categoryConfigDescriptions = {

docs/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919

2020
This ESLint plugin provides linting rules specific to [Scoped CSS in Vue.js].
2121

22+
- Enforce best practices for Scoped CSS.
23+
- Supports CSS and SCSS syntax.
24+
2225
You can check on the [Online DEMO](./playground/).
2326

2427
## Installation
@@ -51,8 +54,8 @@ module.exports = {
5154

5255
This plugin provides 3 predefined configs:
5356

54-
- `plugin:vue-scoped-css/base` - Settings and rules to enable correct ESLint parsing
55-
- `plugin:vue-scoped-css/recommended` - Above, plus rules to improve code experience
57+
- `plugin:vue-scoped-css/base` - Settings and rules to enable this plugin
58+
- `plugin:vue-scoped-css/recommended` - Above, plus rules for better ways to help you avoid problems
5659
- `plugin:vue-scoped-css/all` - All rules of this plugin are included
5760

5861
## Rules

docs/rules/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebarDepth: 0
66

77
<!-- This file is automatically generated in tools/update-docs-rules-index.js, do not change! -->
88

9-
## Base Rules (Enabling Correct ESLint Parsing)
9+
## Base Rules (Enabling Plugin)
1010

1111
Enable this plugin using with:
1212

@@ -16,7 +16,7 @@ Enable this plugin using with:
1616
}
1717
```
1818

19-
## Recommended (Improve Development Experience)
19+
## Recommended
2020

2121
Enforce all the rules in this category with:
2222

lib/types.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@ export interface VDirectiveKeyV5 extends AST.HasLocation, AST.HasParent {
3030
type: "VDirectiveKey"
3131
name: string
3232
argument: string | null
33-
modifiers: [string]
33+
modifiers: string[]
34+
parent: AST.VAttribute
3435
shorthand: boolean
36+
raw: {
37+
name: string
38+
argument: string | null
39+
modifiers: string[]
40+
}
3541
}
3642
export interface VDirectiveKeyV6 extends AST.HasLocation, AST.HasParent {
3743
type: "VDirectiveKey"

tests/lib/styles/parser/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ describe("CSS Nodes Test.", () => {
6666
if (!style.cssNode) {
6767
throw new Error("invalid")
6868
}
69+
if (style.cssNode.errors.length) {
70+
return
71+
}
6972
checkCSSNodeLocations(source, style.cssNode, style.lang)
7073
})
7174
it("should be parsed to valid AST.", () => {

tools/lib/categories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { rules } from "../../lib/utils/rules"
22
import { Rule } from "../../lib/types"
33

44
const categoryTitles = {
5-
base: "Base Rules (Enabling Correct ESLint Parsing)",
6-
recommended: "Recommended (Improve Development Experience)",
5+
base: "Base Rules (Enabling Plugin)",
6+
recommended: "Recommended",
77
} as { [key: string]: string }
88

99
const categoryConfigDescriptions = {

0 commit comments

Comments
 (0)