2.5.9 • Published 2 years ago

@alexmchan/eslint-config v2.5.9

Weekly downloads
4
License
MIT
Repository
github
Last release
2 years ago

Installation

  1. yarn add -D '@alexmchan/eslint-config'

  2. (optional) List the peer dependencies in case they've changed

npm view @alexmchan/eslint-config peerDependencies --json | xargs -0 node -e "console.log(Object.keys(JSON.parse(process.argv[1])).join(' '))"
  1. Install with dependencies
yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier eslint-plugin-import eslint-plugin-no-only-tests eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-simple-import-sort
  1. Add to the .eslintrc.js
module.exports = {
  overrides: [
    {
      files: ['*.ts', '*.tsx'],
      parserOptions: {
        project: ['./tsconfig.json'],
      },
    },
  ],
  extends: ['@alexmchan/eslint-config'],
  rules: {
    'react/jsx-uses-react': 'off',
    'react/react-in-jsx-scope': 'off',
    'react/no-unescaped-entities': 'warn',
    'no-console': 'warn',
  },
}