This package provides Polaris's base JS .eslintrc as an extensible shared config.
Install the correct versions of each package, which are listed by the command:
Which produces and runs a command like:
npm install --save-dev
@typescript-eslint/eslint-plugin@latest
@typescript-eslint/parser@latest
eslint@latest
eslint-config-prettier@latest
eslint-plugin-import@latest
eslint-plugin-prettier@latest
eslint-plugin-react@latest
eslint-plugin-react-hooks@latest
typescript@latest
prettier@latest
or use npm-install-peers
In your .eslintrc
- With Parser
"parser": "@typescript-eslint/parser"
- With Extends
"extends": ["polaris"]
Defaults
"extends": [
"plugin:import/recommended",
"plugin:import/typescript",
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:react/jsx-runtime",
"plugin:prettier/recommended",
"prettier"
]