Skip to content

SMccarrick/sm-config

Repository files navigation

Welcome to @smccarrick/sm-config 👋

Version License: MIT

Configuration for eslint, typescript and prettier for react.

Installation

npx install-peerdeps @smccarrick/sm-config -D

Eslint

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"],
  },
}

tsconfig

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.

Author

👤 Stephen Mccarrick [email protected]

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!