feat(cli): add strict type-checked ESLint via typescript-eslint#287
Open
gonzoblasco wants to merge 1 commit into
Open
feat(cli): add strict type-checked ESLint via typescript-eslint#287gonzoblasco wants to merge 1 commit into
gonzoblasco wants to merge 1 commit into
Conversation
Addresses akd-io#263 Adds --eslint-strict flag that enables strict type-checked linting using typescript-eslint (strict-type-checked + stylistic-type-checked configs). When active: - Installs typescript-eslint as a devDependency - Generates eslint.config.mjs with strict/stylistic type-checked configs BEFORE next configs, plus parserOptions with projectService - Adds typescript-eslint to the technologies list The base ESLint setup (eslint-config-next with core-web-vitals and typescript) remains unchanged when --eslint-strict is not passed.
|
@gonzoblasco is attempting to deploy a commit to the 9ty Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Addresses #263
Adds
--eslint-strictflag that enables strict type-checked linting using typescript-eslint (strict-type-checked+stylistic-type-checkedconfigs).Why
Issue #263 asks for proper ESLint support with
@typescript-eslint, including the ability to choose between official configurations. The repo already evolved to includeeslint-config-next/core-web-vitals+eslint-config-next/typescriptandeslint-config-prettier, but was missing the option to use stricter type-checked configs.This PR adds the most impactful part of the checklist: the ability to opt into strict type-checked linting with a single flag.
How
eslint-strictactivated when--eslint-strictflag is settypescript-eslintas a devDependencyeslint.config.mjsis generated withtseslint.configs.strictTypeCheckedandtseslint.configs.stylisticTypeCheckedprepended before the Next.js configsparserOptionswithprojectService: trueandtsconfigRootDirare included for type-checked rulestypescript-eslintto the technologies sort order for README/landing pageWhat's left from #263
nextandnext/core-web-vitals(currently always uses core-web-vitals)recommended,strict,stylisticand their type-checked variants individuallyThis PR provides the strict type-checked path. Further granularity can be added as follow-up.
Testing
tsc --noEmitpassespnpm test:cli)