@neralabs/rerail-pack-next 0.1.6 → 0.1.7
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 +1 -1
- package/package.json +10 -1
- package/rules/next-no-assign-module-variable.json +28 -12
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ Matches a `<script>` with a literal `src` containing the Google Analytics or gta
|
|
|
67
67
|
|
|
68
68
|
### `next-no-assign-module-variable`
|
|
69
69
|
|
|
70
|
-
Matches any variable declaration with a declarator whose identifier is `module
|
|
70
|
+
Matches any variable declaration with a declarator whose identifier is `module`, including a `for…of` or `for…in` head such as `for (const module of mods)`, reported at its keyword as upstream does.
|
|
71
71
|
|
|
72
72
|
### `next-no-async-client-component`
|
|
73
73
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neralabs/rerail-pack-next",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Rerail rule pack: @next/eslint-plugin-next rules ported to Rerail code rules.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"rerail",
|
|
7
|
+
"rerail-pack",
|
|
8
|
+
"coding-agent",
|
|
9
|
+
"rules",
|
|
10
|
+
"nextjs",
|
|
11
|
+
"react",
|
|
12
|
+
"eslint-plugin-next"
|
|
13
|
+
],
|
|
5
14
|
"license": "Apache-2.0 AND MIT",
|
|
6
15
|
"repository": {
|
|
7
16
|
"type": "git",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "next-no-assign-module-variable",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 3,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "Don't declare a variable named module in Next.js code; it shadows the module object Node.js and the bundler rely on.",
|
|
7
7
|
"scope": {
|
|
@@ -26,20 +26,36 @@
|
|
|
26
26
|
"rule": {
|
|
27
27
|
"any": [
|
|
28
28
|
{
|
|
29
|
-
"
|
|
29
|
+
"any": [
|
|
30
|
+
{
|
|
31
|
+
"kind": "lexical_declaration"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"kind": "variable_declaration"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"has": {
|
|
38
|
+
"kind": "variable_declarator",
|
|
39
|
+
"has": {
|
|
40
|
+
"field": "name",
|
|
41
|
+
"kind": "identifier",
|
|
42
|
+
"regex": "^module$"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
30
45
|
},
|
|
31
46
|
{
|
|
32
|
-
"
|
|
47
|
+
"regex": "^(?:const|let|var)$",
|
|
48
|
+
"inside": {
|
|
49
|
+
"kind": "for_in_statement",
|
|
50
|
+
"field": "kind",
|
|
51
|
+
"has": {
|
|
52
|
+
"field": "left",
|
|
53
|
+
"kind": "identifier",
|
|
54
|
+
"regex": "^module$"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
33
57
|
}
|
|
34
|
-
]
|
|
35
|
-
"has": {
|
|
36
|
-
"kind": "variable_declarator",
|
|
37
|
-
"has": {
|
|
38
|
-
"field": "name",
|
|
39
|
-
"kind": "identifier",
|
|
40
|
-
"regex": "^module$"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
58
|
+
]
|
|
43
59
|
}
|
|
44
60
|
}
|
|
45
61
|
},
|