Adds two flat-config blocks to core-eslint/base.js: (1) repo-wide
no-restricted-imports for @sentry/* with the R40 message, (2) an
allowlist override for the only paths permitted to import the Sentry
SDK directly — core-shared/instrumentation/sentry/**, the bind-sentry
DI files, the no-sentry test guards, and apps' instrumentation* /
next.config / vite.config / sentry.*.config files. Patterns use
**/-prefix so they match whether ESLint runs from the repo root or
from inside a sub-package.
Also adds the standard `argsIgnorePattern: "^_"` config (used
throughout the repo) and a Node-globals override for *.mjs/*.cjs/*.js
and *.config.{ts,tsx} so withSentryConfig in next.config.mjs lints
clean. Required adding `globals` as a core-eslint dep.
Adds .github/workflows/sentry-pii-guard.yml — a lightweight CI step
that fails any PR introducing `sendDefaultPii: true` (R31). Excludes
node_modules / dist / .next / .turbo from the grep so vendored SDK
JSDoc examples don't false-positive.
Pre-existing lint nits cleared as part of getting `pnpm lint` green:
- core-testing define-contract-suite.test.ts: void the unused
receivedTracer (mirrors the next test's pattern)
- marketing-pages bind-dev-seed.ts: drop unused MockSiteSettingsRepository
import
- marketing-pages get-site-settings.use-case.ts: drop the now-redundant
eslint-disable for `_input`
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
25 lines
597 B
JSON
25 lines
597 B
JSON
{
|
|
"name": "@repo/core-eslint",
|
|
"private": true,
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"exports": {
|
|
"./base": "./base.js",
|
|
"./next": "./next.js",
|
|
"./react-internal": "./react-internal.js"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9.20.0",
|
|
"@typescript-eslint/eslint-plugin": "^8.25.0",
|
|
"@typescript-eslint/parser": "^8.25.0",
|
|
"eslint": "^9.20.0",
|
|
"eslint-config-prettier": "^10.1.0",
|
|
"eslint-plugin-boundaries": "^4.2.2",
|
|
"eslint-plugin-turbo": "^2.4.0",
|
|
"typescript-eslint": "^8.25.0"
|
|
},
|
|
"dependencies": {
|
|
"globals": "^17.6.0"
|
|
}
|
|
}
|