Configuration for eslint, typescript and prettier for react.
npx install-peerdeps @smccarrick/sm-config -D
create an .eslintrc.js
with the config below
module.exports = {
extends: ["./node_modules/@smccarrick/sm-config/.eslintrc.js"],
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json", "./tsconfig.eslint.json"],
},
}
create an tsconfig.eslint.json
with the below config
{
"extends": "@smccarrick/sm-config/tsconfig.json",
"include": [".eslintrc.js"]
}
create an tsconfig.json
to extend our config
{
"extends": "@smccarrick/sm-config/tsconfig.json",
"include": ["**/*"],
}
Prettier comes integrated with eslint so no need to extend this config unless you want to use prettier separately to format other files such as .yml
, markdown ect
.
👤 Stephen Mccarrick [email protected]
- Github: @SMccarrick
- LinkedIn: @stephen-mccarrick
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!