We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 42b4c83 + 07de848 commit f6ef872Copy full SHA for f6ef872
.eslintrc.cjs
@@ -43,6 +43,29 @@ module.exports = {
43
// To encourage good usage of RxJS:
44
"rxjs/no-exposed-subjects": "error",
45
"rxjs/finnish": ["error", { names: { "^this$": false } }],
46
+ "no-restricted-imports": [
47
+ "error",
48
+ {
49
+ paths: ["matrix-widget-api", "matrix-js-sdk"].flatMap((lib) =>
50
+ ["src", "src/", "src/index", "lib", "lib/", "lib/index"]
51
+ .map((path) => `${lib}/${path}`)
52
+ .map((name) => ({ name, message: `Please use ${lib} instead` })),
53
+ ),
54
+ patterns: [
55
+ ...["matrix-widget-api"].map((lib) => ({
56
+ group: ["src", "src/", "src/**", "lib", "lib/", "lib/**"].map(
57
+ (path) => `${lib}/${path}`,
58
59
+ message: `Please use ${lib} instead`,
60
+ })),
61
+ // XXX: We use /lib in lots of places, so allow for now.
62
+ ...["matrix-js-sdk"].map((lib) => ({
63
+ group: ["src", "src/", "src/**"].map((path) => `${lib}/${path}`),
64
65
66
+ ],
67
+ },
68
69
},
70
overrides: [
71
{
0 commit comments