25 Commits
Author SHA1 Message Date
Andrei LandGitHub b5452ab89f chore(eslint): migrate .eslintrc + .eslintignore to .eslintrc.cjs (#26216)
* chore(eslint): migrate .eslintrc + .eslintignore to .eslintrc.cjs

Consolidates the per-package ESLint setup into a single typed
`.eslintrc.cjs` file across the monorepo (177 files touched).

Why
- `.eslintignore` is removed in ESLint v9/v10. Folding ignore patterns
  into `ignorePatterns` inside the rc file is the supported migration
  path and unblocks future ESLint upgrades (which will likely be needed
  alongside the in-flight TypeScript 6 migration).
- `.cjs` extension is explicit about module format, so the configs keep
  working if any package later adopts `"type": "module"` (no CJS/ESM
  surprises).
- Wrapping each config in `// @ts-check` + a `Linter.Config`-typed
  `const config` block gives editor autocomplete and catches typos.
  Surfaced two real duplicates in
  `eslint-config-custom/back/typescript.js`
  (`node/no-unsupported-features/es-syntax`,
  `node/no-missing-import`), now deduplicated.
- `extends` references switched from the `custom/*` shorthand to the
  explicit `eslint-config-custom/*` package name. ESLint resolves both,
  but the explicit form makes the source unambiguous.
- Added `coverage/` to `ignorePatterns` so coverage output produced
  inside a workspace is not linted.

Misc
- `examples/kitchensink` had ESLint configured but no `lint` script;
  added one so the config actually runs.
- `nx.json` hash inputs updated:
  - removed `.eslintignore` (no longer exists)
  - replaced `{projectRoot}/.eslintrc.js` with
    `{projectRoot}/**/.eslintrc.cjs` so nested package configs are also
    part of the cache key (the previous glob missed them).
- `packages/utils/upgrade/tsconfig.eslint.json` include path updated
  from `.eslintrc.js` to `.eslintrc.cjs`.

Verification
- `eslint --print-config` resolves cleanly on sampled back/front
  packages (admin, users-permissions, upload).
- Full `pnpm -r lint` is clean.

* chore(eslint): set tsconfigRootDir for vscode-eslint typed linting

CLI lint resolved tsconfig paths via cwd, but vscode-eslint runs from
the workspace root and could not locate per-package tsconfigs. Set
parserOptions.tsconfigRootDir to __dirname in each package's
.eslintrc.cjs so the editor resolves typed-lint configs correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(eslint): self-ignore configs, scope coverage to jest packages

- Replace `env: { es6: true }` workaround with `.eslintrc.cjs` in
  ignorePatterns so eslint never lints the config file itself
  (root cause of the "const is not a keyword" parse error in es5)
- Add `.eslintrc.cjs` to ignorePatterns across all configs that
  were missing it
- Restrict `coverage/` ignorePatterns to workspace roots that
  actually run jest; drop from non-test packages and admin/server
  subdir configs (tests run from the workspace root)
2026-05-12 07:32:12 +00:00
Alexandre Bodin 92055a7fb1 chore: use rollup
chore: fetch template only if name matches name convention

chore: linting

chore: fix tests

chore: fix npm scripts

test: try to fix test
2025-01-23 16:28:23 +01:00
Convly 836a1eabf7 Merge branch 'v5/main' of github.com:strapi/strapi into v5/types/v2 2024-03-12 11:50:42 +01:00
Ben IrvinandGitHub ab2af1e539 fix(core): use module uid for config namespace instead of dot notation 2024-03-11 12:28:46 +01:00
Convly 5167af6c73 chore: fix build following latest TS type system changes 2024-03-01 14:41:47 +01:00
Rémi de JuvignyandGitHub 762abbf7f8 chore(sentry): convert to typescript (#19128)
* chore(sentry): convert to typescript

* qa fixes

* josh feedback
2024-01-03 13:51:22 +01:00
Alexandre Bodin cf49ddbbfc Prettier and backend fix 2022-08-11 10:20:49 +02:00
Alexandre Bodin 0ae14c06cb 1st fix pass 2022-08-11 10:20:48 +02:00
Sijawusz Pur RahnamaandGitHub acd12eaab7 Use ctx._matchedRoute instead of ctx.request.url for Sentry transaction name 2022-06-09 22:37:33 +02:00
Julian Weiland e9286911fc Fix calling sendError on wrong object
Fixes the sentry plugin middleware calling the `sendError` function on the wrong object (sentry SDK instead of the sentry service)
2022-01-01 16:45:23 +01:00
fdel-car 3864399eb8 Merge branch 'master' into chore/test-config 2021-11-30 12:36:11 +01:00
Pierre Noël 5dc63b6f90 Don't use sentry middleware if sentry initialization failed 2021-10-13 10:55:46 +02:00
Pierre Noël 14f9a9c847 Handle SIGINT and SIGTERM signals + fix sentry being initiated twice 2021-10-08 11:42:13 +02:00
fdel-car 5444b30fff Fix sentry tests 2021-09-30 15:34:11 +02:00
Alexandre Bodin 010294813d Apply feedbacks 2021-09-29 12:25:06 +02:00
Alexandre Bodin c7a94ed081 Migrate middlwares to programmatic for plugin that do not need to export them 2021-09-29 10:47:10 +02:00
Pierre Noël 947981200b use { strapi } as params in all lifecycle functions 2021-09-28 16:54:07 +02:00
Alexandre Bodin 0f3f984ea7 Init migration v4
- Hooks registry
- D&P CT migrations
- i18N CT migrations
- Umzug with js / sql migrations
- Eslint updates
2021-09-13 12:03:12 +02:00
Alexandre Bodin 4349d6b822 Init new routing layer 2021-09-07 15:11:04 +02:00
Pierre Noël bc56be3560 Merge branch 'pluginAPI/loadPlugin' of github.com:strapi/strapi into pluginAPI/loadPlugin 2021-08-20 16:32:14 +02:00
Pierre Noël 09945a46df fixes 2021-08-20 15:23:02 +02:00
Alexandre Bodin 575cbbdc7c Migrate plugin getters 2021-08-19 23:30:49 +02:00
Pierre Noël 4790e28284 refactor with module approach 2021-08-06 18:09:49 +02:00
Pierre Noël ed050471d7 fix unit tests 2021-08-02 18:47:45 +02:00
Pierre Noël 3b179169d4 wip 2021-07-29 16:39:26 +02:00