My sharable settings for Eslint and Prettier, based on the amazing work done by Wes Bos.
- Install the package
npm install eslint-config-shiny-code
- Add the config to package.json (or in an eslintrc file)
"eslintConfig": {
"extends": ["shiny-code"]
},
"scripts": {
"lint": "eslint .",
"fix": "eslint . --fix"
},
If you want to override or extend any rules, add the rules: {}
beneath the extends in your Eslint config.
- Add a tsconfig.json, this can be copied from this repository or just be an empty
{}
object. - Bonus: enable automatic eslint running in the IDE for the project.
"extends": ["shiny-code/react"]
"extends": ["shiny-code/react-nextjs"]
"extends": ["shiny-code/react-native"]