You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,7 @@
1
+
## 2.0.0
2
+
3
+
- Update the configuration file structure by renaming JSON keys to improve readability. Breaking changes: renamed doNotWithPatterns to forbiddenDependencies, justWithPatterns to exclusiveDependencies, and noDependsEnabled to dependenciesAllowed.
4
+
1
5
## 1.0.5
2
6
3
7
- Add a warning message indicating that the keys will be renamed in the next major version
Copy file name to clipboardExpand all lines: doc/2-existing-rules.md
+50-15Lines changed: 50 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,42 +2,77 @@
2
2
3
3
We have several rules already defined in the plugin. You can create some rule too, take a look in our section about [contributions](./3-contributions.md).
4
4
5
-
## DoNotWithRule
5
+
## Forbidden Dependencies Rule
6
6
7
-
The `DoNotWithRule` specifies that a set of file should not depend on certain files. For example:
7
+
!!! warning "Deprecated - Only available before v2.0.0"
8
+
9
+
The `DoNotWithRule` specifies that a set of file should not depend on certain files. For example:
10
+
11
+
```json
12
+
// your-project-root/eagle_eye_config.json
13
+
{
14
+
"filePattern": "*viewmodel.dart",
15
+
"doNotWithPatterns": ["*_screen.dart"]
16
+
},
17
+
```
18
+
19
+
The `Forbidden Dependencies Rule` specifies that a set of file should not depend on certain files. For example:
8
20
9
21
```json
10
22
// your-project-root/eagle_eye_config.json
11
-
{
12
-
"filePattern": "*viewmodel.dart",
13
-
"doNotWithPatterns": ["*_screen.dart"]
14
-
},
23
+
{
24
+
"filePattern": "*viewmodel.dart",
25
+
"forbiddenDependencies": ["*_screen.dart"]
26
+
},
15
27
```
16
28
17
29
In this case, all files that has the suffix `viewmodel.dart` should not depend on any file whose name includes '_screen.dart'.
18
30
19
-
## JustWithRule
31
+
## Exclusive Dependencies Rule
32
+
33
+
!!! warning "Deprecated - Only available before v2.0.0"
34
+
35
+
The `JustWithRule` specifies that some files should depend on certain files. For example:
20
36
21
-
The `JustWithRule` specifies that some files should depend on certain files. For example:
37
+
```json
38
+
// your-project-root/eagle_eye_config.json
39
+
{
40
+
"filePattern": "*repository.dart",
41
+
"justWithPatterns": ["*_datasources.dart"]
42
+
},
43
+
```
44
+
45
+
The `Exclusive Dependencies Rule` specifies that some files should depend only on certain files. For example:
22
46
23
47
```json
24
48
// your-project-root/eagle_eye_config.json
25
-
{
26
-
"filePattern": "*repository.dart",
27
-
"justWithPatterns": ["*_datasources.dart"]
28
-
},
49
+
{
50
+
"filePattern": "*repository.dart",
51
+
"exclusiveDependencies": ["*_datasources.dart"]
52
+
},
29
53
```
30
54
31
55
In this case, the our repositories should depend only on data sources.
32
56
33
-
## NoDependencyRule
57
+
## Dependencies Allowed Rule
58
+
59
+
!!! warning "Deprecated - Only available before v2.0.0"
60
+
61
+
The `NoDependencyRule` ensures that some files should remain free of any dependencies. For example:
62
+
63
+
```json
64
+
{
65
+
"filePattern": "*util.dart",
66
+
"noDependsEnabled": true
67
+
},
68
+
```
34
69
35
-
The `NoDependencyRule` ensures that some files should remain free of any dependencies. For example:
70
+
The `Dependencies Allowed Rule` ensures that some files should remain free of any dependencies. For example:
0 commit comments