Enable import-extension and TypeScript type-import rules
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 20/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- eslint, typescript
- Domain
- developer-experience, frontend
Research direction
Start with eslint.config.mjs and tsconfig.json (moduleResolution: bundler, allowImportingTsExtensions), then compare how src/types/index.ts and typeof import('../../store/filters.js') in src/tests/store/filters.spec.ts are imported. Enable one rule at a time, run npm run lint to collect its output, and check each proposed change against npm run ts:check, npm test and npm run build. Done means each rule is enabled or its exact incompatible cases are documented, with a separate signed-off commit per rule. Coordinate overlaps with #9500 and leave import sorting out.
Written by the indexing model from the issue text.
Description
Goal
Enable three deferred import rules without breaking TypeScript resolution, Vite builds, runtime imports or Vitest mocks.
Rules
import-extensions/extensions(~558 historical hits)import-extensions/ban-inline-type-imports(~68)@typescript-eslint/consistent-type-imports(~66)
These are historical and possibly overlapping counts; refresh them before editing.
Starting point and procedure
- Inspect
eslint.config.mjs,tsconfig.json(notablymoduleResolution: bundlerandallowImportingTsExtensions), and import conventions insrc/. - Review real type imports such as
src/types/index.tsand dynamic/mock patterns such astypeof import('../../store/filters.js')insrc/tests/store/filters.spec.ts. They are examples for inspection, not automatically incorrect code. - Enable one rule at a time at its effective preset options. Collect lint output and preview fixes before editing. Separate a type-only import from a runtime/value import only if its semantics and type checking are preserved.
- Preserve all runtime side effects and lazy imports. Do not rewrite paths merely to quiet a lint error; verify each path against the project's actual TypeScript/Vite resolution contract.
- Keep one DCO-signed commit per rule; document an exact, narrow incompatibility rather than force a broad suppressor. Coordinate potential import-block overlaps with #9500.
Verification
Run git diff --check, npm run lint, npm run ts:check, npm test and npm run build. Add focused regression checks for altered mocks, dynamic imports or entrypoints. Do not hand-edit generated OpenAPI types or built assets.
Done when
- The three rules are enabled where compatible, or exact unsupported cases are documented for maintainer decision.
- Type-only imports, lazy imports, runtime evaluation and test mocking retain their original contracts.
- The recorded checks pass or reproducible blockers are documented; each rule has a separate signed-off commit.
- No generated code, public APIs or unrelated import ordering is changed.
Out of scope and contributor suitability
Do not perform import sorting (#9500). This requires module-resolution and test expertise and is not proposed as good first issue in its current combined form.
Additional context
Development workflow: https://docs.libresign.coop/developer_manual/development-workflow.html
Questions: https://t.me/LibreSign
- Dominant language
- PHP
- Stars
- 844
- Forks
- 176
- Avg merge
- 14h 3m
- Merged PRs (30d)
- 344
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from LibreSign/libresign
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
OpenSSL engine: leaf certificates get O=Internet Widgits Pty Ltd, ST=Some-State from system openssl.cnfPossibly taken @vitormattos claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
LibreSign/libresign#9366 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
LibreSign/libresign#9007 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
LibreSign/libresign#8284 · 5 comments ·
Maintainers usually reply within 1 day
-
frontend javascript technical debt
Difficulty 5/5 Over a week Newbie friendliness 8/100
Maintainers usually reply within 1 day
All issues in LibreSign/libresign
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Automattic/blocks-engine#6318 ·
Maintainers usually reply within 1 day
-
[remove-resource] Delete Open Course Hub, Open Multicourse Hub, and Learn2 with GitSync skeletonsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
35-feedback
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day