@medplum/eslint-config 5.2.6 → 5.2.8
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/index.mjs +31 -0
- package/package.json +2 -2
package/index.mjs
CHANGED
|
@@ -312,6 +312,37 @@ export const medplumEslintConfig = [
|
|
|
312
312
|
'medplum/no-transaction-callback-invoking-repo': 'error',
|
|
313
313
|
},
|
|
314
314
|
},
|
|
315
|
+
{
|
|
316
|
+
// Workers act as a job's user only via runJobInAuthenticatedContext. runInAuthenticatedContext
|
|
317
|
+
// alone would retry a job whose auth state was revoked instead of failing it; the other imports
|
|
318
|
+
// skip the revocation check entirely.
|
|
319
|
+
files: ['packages/server/src/workers/**/*.ts'],
|
|
320
|
+
ignores: ['packages/server/src/workers/utils.ts', '**/*.test.ts'],
|
|
321
|
+
rules: {
|
|
322
|
+
'no-restricted-imports': [
|
|
323
|
+
'error',
|
|
324
|
+
{
|
|
325
|
+
patterns: [
|
|
326
|
+
{
|
|
327
|
+
regex: '(^|/)context$',
|
|
328
|
+
importNames: ['runInAuthenticatedContext', 'AuthenticatedRequestContext'],
|
|
329
|
+
message: 'Use runJobInAuthenticatedContext',
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
regex: '(^|/)fhir/accesspolicy$',
|
|
333
|
+
importNames: ['getRepoForLogin'],
|
|
334
|
+
message: 'Use runJobInAuthenticatedContext',
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
regex: '(^|/)request-context-store$',
|
|
338
|
+
importNames: ['requestContextStore'],
|
|
339
|
+
message: 'Use runJobInAuthenticatedContext or tryRunInRequestContext',
|
|
340
|
+
},
|
|
341
|
+
],
|
|
342
|
+
},
|
|
343
|
+
],
|
|
344
|
+
},
|
|
345
|
+
},
|
|
315
346
|
/**
|
|
316
347
|
* vite.config.ts and vitest.config.ts are often outside package tsconfig include (e.g. rootDir src);
|
|
317
348
|
* skip type-aware parsing.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medplum/eslint-config",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.8",
|
|
4
4
|
"description": "Shared ESLint configuration for Medplum projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"eslint-plugin-no-only-tests": "3.4.0",
|
|
33
33
|
"eslint-plugin-react-hooks": "7.1.1",
|
|
34
34
|
"eslint-plugin-react-refresh": "0.5.7",
|
|
35
|
-
"typescript-eslint": "8.71.
|
|
35
|
+
"typescript-eslint": "8.71.2"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"eslint": "^9",
|