@plumeria/eslint-plugin 10.0.0 → 10.0.2
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
|
@@ -7,6 +7,7 @@ Below are the available rules and the recommended configuration.
|
|
|
7
7
|
|
|
8
8
|
The `plugin:@plumeria/recommended` config enables the following:
|
|
9
9
|
|
|
10
|
+
- `@plumeria/style-name-requires-import`: **error**
|
|
10
11
|
- `@plumeria/no-combinator`: **error**
|
|
11
12
|
- `@plumeria/no-destructure`: **error**
|
|
12
13
|
- `@plumeria/no-inner-call`: **error**
|
|
@@ -23,6 +24,11 @@ export default [plumeria.flatConfigs.recommended];
|
|
|
23
24
|
|
|
24
25
|
## Rules
|
|
25
26
|
|
|
27
|
+
### style-name-requires-import
|
|
28
|
+
|
|
29
|
+
Disallow styleName prop in files without a @plumeria/core import.
|
|
30
|
+
|
|
31
|
+
|
|
26
32
|
### no-combinator
|
|
27
33
|
|
|
28
34
|
Disallow combinators `>`, `+`, `~` and descendant combinator (space) unless inside functional pseudo-classes.
|
|
@@ -5,10 +5,10 @@ exports.styleNameRequiresImport = {
|
|
|
5
5
|
meta: {
|
|
6
6
|
type: 'problem',
|
|
7
7
|
docs: {
|
|
8
|
-
description: 'Disallow styleName prop in files without a @plumeria import',
|
|
8
|
+
description: 'Disallow styleName prop in files without a @plumeria/core import',
|
|
9
9
|
},
|
|
10
10
|
messages: {
|
|
11
|
-
styleNameError: 'styleName requires importing
|
|
11
|
+
styleNameError: 'styleName requires importing "@plumeria/core".',
|
|
12
12
|
},
|
|
13
13
|
schema: [],
|
|
14
14
|
},
|
|
@@ -18,7 +18,7 @@ exports.styleNameRequiresImport = {
|
|
|
18
18
|
return {
|
|
19
19
|
ImportDeclaration(node) {
|
|
20
20
|
const source = node.source.value;
|
|
21
|
-
if (typeof source === 'string' && source.startsWith('@plumeria')) {
|
|
21
|
+
if (typeof source === 'string' && source.startsWith('@plumeria/core')) {
|
|
22
22
|
hasPlumeriaImport = true;
|
|
23
23
|
}
|
|
24
24
|
},
|