[ ] Make ESLint CNS plugin install and add parser @typescript-eslint/parser to .eslintrc.cjs.
[ ] Make ESLint CNS plugin install and add plugin @typescript-eslint/eslint-plugin to .eslintrc.cjs.
[ ] Make it possible to choose between the official configurations.
[ ] Make ESLint CNS plugin install and add config eslint-config-prettier to .eslintrc.cjs if Prettier is used.
[ ] Make it possible to choose between ESLint configs next and next/core-web-vitals.
next: next is an alias for next/recommended which includes Next-specific linting rules, but also bundles other useful ESLint plugins like import, react, react-hooks and jsx-a11y, and Next-specific overrides of these plugins. See the eslint-plugin-next source.
next/core-web-vitals: Extends next/recommended, turning a couple core web vitals-specific ESLint rules from warnings into errors. See the core-web-vitals config source.
To do:
@typescript-eslint
.@typescript-eslint/parser
to.eslintrc.cjs
.@typescript-eslint/eslint-plugin
to.eslintrc.cjs
.eslint-config-prettier
to.eslintrc.cjs
if Prettier is used.next
andnext/core-web-vitals
.next
:next
is an alias fornext/recommended
which includes Next-specific linting rules, but also bundles other useful ESLint plugins likeimport
,react
,react-hooks
andjsx-a11y
, and Next-specific overrides of these plugins. See theeslint-plugin-next
source.next/core-web-vitals
: Extendsnext/recommended
, turning a couple core web vitals-specific ESLint rules from warnings into errors. See thecore-web-vitals
config source.See the typescript-eslint configuration docs, mainly this quote:
Example setup using
@typescript-eslint/parser
and@typescript-eslint/plugin
as well as typed versions of bothstrict
andstylistic
: