We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You can use eslint with CRA without ejecting!
I've updated my fork's installation steps for CRA - you can take them & update yours too.
TL;DR:
npx install-peerdeps eslint-config-sarpik --dev --yarn
package.json
"extends": "react-app"
"extends": "sarpik"
"eslint": "5.x"
"eslint": "6.x"
yarn add eslint@6.x
yarn install
6.x.y
node node_modules/.bin/eslint --version
--ext js,jsx,ts,tsx
eslint
6.x
Your package.json should have this:
{ "scripts": { "lint": " eslint . --ext js,jsx,ts,tsx", "lint:fix": "eslint . --ext js,jsx,ts,tsx --fix" }, "eslintConfig": { "extends": "sarpik" }, "devDependencies": { "<other-dev-dependency>": "<version>", "eslint": "6.x" } }
Try it out:
npx create-react-app cra-eslint-ts --template typescript # typescript is optional cd cra-eslint-ts
and then follow the steps above.
Finally, run yarn lint and yarn lint:fix & verify that yarn start still works 🚀
yarn lint
yarn lint:fix
yarn start
Outcome: https://github.com/sarpik/cra-eslint-ts
The text was updated successfully, but these errors were encountered:
thanks :) It works! Adding
Sorry, something went wrong.
No branches or pull requests
You can use eslint with CRA without ejecting!
I've updated my fork's installation steps for CRA - you can take them & update yours too.
TL;DR:
npx install-peerdeps eslint-config-sarpik --dev --yarn
package.json
and"extends": "react-app"
with"extends": "sarpik"
"eslint": "5.x"
with"eslint": "6.x"
like so:yarn add eslint@6.x
, or replace yourself & runyarn install
6.x.y
: runnode node_modules/.bin/eslint --version
--ext js,jsx,ts,tsx
toeslint
every time you call it (required for eslint6.x
, see Upgrading to eslint v6 requires--ext js,jsx,ts,tsx
to lint anything other than js kiprasmel/eslint-config-kiprasmel#4)Your
package.json
should have this:Try it out:
and then follow the steps above.
Finally, run
yarn lint
andyarn lint:fix
& verify thatyarn start
still works 🚀Outcome: https://github.com/sarpik/cra-eslint-ts
The text was updated successfully, but these errors were encountered: