Skip to content

Basic question about ESlint - Where install it? #73

Answered by albertcito
albertcito asked this question in Q&A
Discussion options

You must be logged in to vote

I installed it in main directory:

  • yarn add -D -W eslint
  • npx eslint --init
  • yarn add -D -W eslint-plugin-react-native

This is my .eslintrc.js file for now.

module.exports = {
  env: {
    es2021: true,
    node: true,
    'react-native/react-native': true,
  },
  extends: [
    'next',
    'plugin:react/recommended',
    'airbnb',
    'airbnb/hooks',
  ],
  settings: {
    next: {
      rootDir: 'apps/next/',
    },
  },
  root: true,
  parser: '@typescript-eslint/parser',
  parserOptions: {
    ecmaFeatures: {
      jsx: true,
    },
    ecmaVersion: 'latest',
    sourceType: 'module',
  },
  plugins: [
    'react',
    'react-native',
    '@typescript-eslint',
  ],
  rules: {
    'impor…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by albertcito
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant