Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Releases: expo/eslint-config-universe

6.0.0-rc.0

08 Aug 02:21
@ide ide
Compare
Choose a tag to compare
6.0.0-rc.0 Pre-release
Pre-release

eslint-config-expo v6 keeps a lot of the same rules as v5 but is structured significantly differently. Upgrading shouldn't be too hard, but you should read these release notes.

What changed?

This new linter config integrates Prettier (required) with ESLint and relies on ESLint's --fix option instead of running Prettier separately. ESLint delegates to Prettier, so // prettier-ignore and the .prettierignore file still work in addition to ESLint's inline-comment options.

There are four linter configs: default, native, web, node. You usually want to use one of the latter three. All three include support for React and Prettier.

How to install it?

Install ESLint, Prettier, and the Expo config:

npm install --dev eslint-config-expo@next eslint prettier

Then in your .eslintrc.js file write:

module.exports = {
  extends: 'expo/native', // or 'expo/web' or 'expo/node'
};

Editor integration

You need support only for ESLint really. Since ESLint delegates to Prettier, you don't need a separate Prettier plugin. If you have a separate Prettier plugin for whatever reason, give it the same Prettier config settings as these: https://github.com/expo/eslint-config-expo/blob/master/shared/prettier.js#L7