14 Commits

Author SHA1 Message Date
Marat Dyatko f1e26b8ed7 Address review feedback on no-self-package-imports rule
- `visitImports` now also reads `exportKind` so `export type { … } from`
  statements are classified as type-only, fixing a false positive in the
  self-import rule (and correctly skipping them in `no-undeclared-imports`
  too).
- The reachability-graph regex in `no-self-package-imports` skips
  `import type` / `export type` edges so files reachable only via
  type-only re-exports aren't pulled into a runtime bundle and no longer
  get false-positive same-entry errors.
- `SOURCE_EXTENSIONS` now includes `.mts` and `.cts` so entries and
  barrels using those extensions are followed correctly.
- The ESLint plugin changeset wording matches the `error` severity of
  the recommended config.
- Adds regression fixtures and RuleTester cases for `export type …` at
  both entries and for a file only reachable via a type-only edge.

Signed-off-by: Marat Dyatko <maratd@spotify.com>
Made-with: Cursor
2026-04-23 16:28:20 +02:00
Fredrik Adelöw 7455dae884 require the use of node prefix on native imports
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-01-26 13:22:53 +01:00
Hellgren Heikki a1dae7180d feat(eslint): relax frontend imports for nfs
allow frontend plugins to import from other frontend plugins with same
plugin id to allow plugin overrides without unnecessary eslint warning.

relates to #31372

Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
2025-10-09 15:40:46 +03:00
Hellgren Heikki 2788a08dad fix: tsc errors and rest of the tests
Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
2025-06-16 22:11:21 +03:00
Patrik Oldsberg 08895e3f84 eslint-plugin: add support for inline packages
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2024-09-04 19:36:18 +03:00
Patrik Oldsberg 911c25de59 eslint-plugin: add auto fix for missing imports
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2023-03-06 13:09:27 +01:00
blam a3576a386e chore: fixing the eslint rule
Signed-off-by: blam <ben@blam.sh>
2023-02-17 12:06:59 +01:00
Patrik Oldsberg 6801eb5780 eslint-plugin: refactor to fix issues uncovered by more strict parsing
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2023-02-04 11:33:55 +01:00
Patrik Oldsberg 4753d26b94 eslint-plugin: add no-relative-monorepo-imports rule
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2023-02-03 16:42:23 +01:00
Patrik Oldsberg 58e481a4f9 eslint-plugin: ignore type imports when checking deps
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2023-02-03 16:15:48 +01:00
Patrik Oldsberg 765b7ee355 eslint-plugin: backwards compatiblity check for packages without exports
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2023-02-03 16:14:07 +01:00
Patrik Oldsberg 8b4a758ed2 eslint-plugin: add support for require calls
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2023-02-03 14:43:57 +01:00
Patrik Oldsberg f459b168f0 eslint-plugin: add support for detecting Node.js builtins
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2023-02-03 14:43:50 +01:00
Patrik Oldsberg 4d05d5bf83 eslint-plugin: refactor to ES2021 and add no-undeclared-imports rule
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2023-02-03 14:43:47 +01:00