Skip to main content

Base ESLint Config

Use these as a starting point for ESLint configuration on Vegan Hacktivists projects.

.eslintrc.js

/** @type import('eslint').Linter.Config */
module.exports = {
  root: true,
  env: {
    browser: true,
    es2021: true,
  },
  parser: '@typescript-eslint/parser',
  parserOptions: {
    ecmaVersion: 'latest',
    sourceType: 'module',
    project: './tsconfig.json',
  },
  extends: [
    'eslint:recommended',
    'plugin:react/recommended',
    'plugin:@typescript-eslint/recommended',
  ],
  overrides: [],
  plugins: ['react', 'react-hooks'],
  rules: {
    'react/require-default-props': ['off'],
    'react/function-component-definition': [
      'warn',
      { namedComponents: 'arrow-function' },
    ],
    'prefer-arrow-callback': ['warn'],
    'react/prop-types': ['off'],
    'react-hooks/exhaustive-deps': 'warn',
    'react/no-unescaped-entities': 'off',
  },
  ignorePatterns: ['*.js'],
}

.eslintignore

node_modules
/public
/vendor