How to configure ESLint and Prettier for Expo projects

Installation

yarn add -D eslint-config-universe
yarn add -D eslint prettier @typescript-eslint/eslint-plugin @typescript-eslint/parser

Usage

{
"eslintConfig": {
"extends": "universe/native"
}
}

Prettier config

{
"printWidth": 100,
"tabWidth": 2,
"singleQuote": true,
"bracketSameLine": true,
"trailingComma": "es5"
}

Conclusion

References

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store