@medplum/eslint-config 5.2.5 → 5.2.7

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.
Files changed (2) hide show
  1. package/index.mjs +31 -1
  2. package/package.json +2 -2
package/index.mjs CHANGED
@@ -293,7 +293,6 @@ export const medplumEslintConfig = [
293
293
  '**/coverage/',
294
294
  '**/dist/',
295
295
  '**/node_modules/',
296
- '**/babel.config.*',
297
296
  '**/jest.sequencer.*',
298
297
  '**/postcss.config.*',
299
298
  '**/rollup.config.*',
@@ -313,6 +312,37 @@ export const medplumEslintConfig = [
313
312
  'medplum/no-transaction-callback-invoking-repo': 'error',
314
313
  },
315
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
+ },
316
346
  /**
317
347
  * vite.config.ts and vitest.config.ts are often outside package tsconfig include (e.g. rootDir src);
318
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.5",
3
+ "version": "5.2.7",
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.1"
35
+ "typescript-eslint": "8.71.2"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "eslint": "^9",