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
An ESLint plugin for enforcing consistent imports across project. In other words, it helps to replace all relatives import with absolutes dependinng on settings.
4
6
@@ -87,6 +89,19 @@ If you are using custom paths in your `tsconfig.json` or `jsconfig.json` file, y
87
89
}
88
90
```
89
91
92
+
`path/no-absolute-imports` can also flag `compilerOptions.paths` aliases as absolute imports. This is opt-in via `useAliases`:
93
+
94
+
```json
95
+
{
96
+
"rules": {
97
+
"path/no-absolute-imports": ["error", {
98
+
"useAliases": true,
99
+
"maxDepth": 1
100
+
}]
101
+
}
102
+
}
103
+
```
104
+
90
105
## Configuration
91
106
92
107
Enable the rules in your ESLint configuration file:
0 commit comments