Skip to content

Commit 7640f38

Browse files
committed
feat: test boundaries
1 parent 84c8379 commit 7640f38

File tree

1 file changed

+63
-22
lines changed

1 file changed

+63
-22
lines changed

eslint.config.mjs

Lines changed: 63 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ export default typescript.config([
984984
boundaries,
985985
},
986986
settings: {
987-
// order matters here in case of nested directories
987+
// order matters here because of nested directories
988988
'boundaries/elements': [
989989
// --- stories ---
990990
{
@@ -996,6 +996,33 @@ export default typescript.config([
996996
type: 'story-book',
997997
pattern: 'static/app/stories',
998998
},
999+
// --- tests ---
1000+
{
1001+
type: 'test-sentry',
1002+
pattern: [
1003+
'static/app/**/*.spec.{ts,js,tsx,jsx}',
1004+
'tests/js/sentry-test/**/*.*',
1005+
'static/app/**/*{t,T}estUtils*.{js,mjs,ts,tsx}',
1006+
],
1007+
mode: 'full',
1008+
},
1009+
{
1010+
type: 'test-getsentry',
1011+
pattern: [
1012+
'static/gsApp/**/*.spec.{ts,js,tsx,jsx}',
1013+
'tests/js/getsentry-test/**/*.*',
1014+
],
1015+
mode: 'full',
1016+
},
1017+
{
1018+
type: 'test-gsAdmin',
1019+
pattern: ['static/gsAdmin/**/*.spec.{ts,js,tsx,jsx}'],
1020+
mode: 'full',
1021+
},
1022+
{
1023+
type: 'test',
1024+
pattern: 'tests/js',
1025+
},
9991026
// --- specifics ---
10001027
{
10011028
type: 'devtoolbar',
@@ -1045,19 +1072,6 @@ export default typescript.config([
10451072
type: 'gsAdmin',
10461073
pattern: 'static/gsAdmin',
10471074
},
1048-
// --- tests ---
1049-
{
1050-
type: 'sentry-test',
1051-
pattern: 'tests/js/sentry-test',
1052-
},
1053-
{
1054-
type: 'getsentry-test',
1055-
pattern: 'tests/js/getsentry-test',
1056-
},
1057-
{
1058-
type: 'tests',
1059-
pattern: 'tests/js',
1060-
},
10611075
// --- configs ---
10621076
{
10631077
type: 'configs',
@@ -1088,10 +1102,6 @@ export default typescript.config([
10881102
from: ['sentry*'],
10891103
allow: ['core*', 'sentry*'],
10901104
},
1091-
{
1092-
from: ['sentry-test'],
1093-
allow: ['tests'],
1094-
},
10951105
{
10961106
from: ['getsentry*'],
10971107
allow: ['core*', 'getsentry*', 'sentry*'],
@@ -1106,21 +1116,52 @@ export default typescript.config([
11061116
allow: ['devtoolbar', 'sentry*'],
11071117
},
11081118
{
1109-
from: ['core-button'],
1110-
allow: ['core*'],
1119+
from: ['test-sentry'],
1120+
allow: ['test-sentry', 'test', 'core*', 'sentry*'],
11111121
},
11121122
{
1113-
from: ['tests'],
1114-
allow: ['sentry*'],
1123+
// todo does test-gesentry need test-sentry?
1124+
from: ['test-getsentry'],
1125+
allow: [
1126+
'test-getsentry',
1127+
'test-sentry',
1128+
'test',
1129+
'core*',
1130+
'getsentry*',
1131+
'sentry*',
1132+
],
1133+
},
1134+
{
1135+
from: ['test-gsAdmin'],
1136+
allow: [
1137+
'test-gsAdmin',
1138+
'test-getsentry',
1139+
'test-sentry',
1140+
'test',
1141+
'core*',
1142+
'gsAdmin*',
1143+
'sentry*',
1144+
'getsentry*',
1145+
],
1146+
},
1147+
{
1148+
from: ['test'],
1149+
allow: ['test', 'test-sentry', 'sentry*'],
11151150
},
11161151
{
11171152
from: ['configs'],
11181153
allow: ['configs', 'build-utils'],
11191154
},
1155+
// --- stories ---
11201156
{
11211157
from: ['story-files', 'story-book'],
11221158
allow: ['core*', 'sentry*', 'story-book'],
11231159
},
1160+
// --- core ---
1161+
{
1162+
from: ['core-button'],
1163+
allow: ['core*'],
1164+
},
11241165
// todo: sentry* shouldn't be allowed
11251166
{
11261167
from: ['core'],

0 commit comments

Comments
 (0)