Skip to content

Instantly share code, notes, and snippets.

@alibek-gao
Created August 23, 2022 15:56
Show Gist options
  • Save alibek-gao/22ff3e314c217ec5f2c75b11c5e1959b to your computer and use it in GitHub Desktop.
Save alibek-gao/22ff3e314c217ec5f2c75b11c5e1959b to your computer and use it in GitHub Desktop.
boilerplate
  • yarn create vite
  • npm init @eslint/config
  • npx install-peerdeps --dev eslint-config-airbnb

.eslintrc.cjs

module.exports = {
  env: {
    browser: true,
    es2021: true
  },
  extends: [
    'eslint:recommended',
    'plugin:react/recommended',
    'plugin:@typescript-eslint/recommended',
    'airbnb',
    'airbnb/hooks',
    'airbnb-typescript'
  ],
  overrides: [
  ],
  parser: '@typescript-eslint/parser',
  parserOptions: {
    ecmaVersion: 'latest',
    sourceType: 'module',
    project: './tsconfig.json'

  },
  plugins: [
    'react',
    '@typescript-eslint'
  ],
  rules: {
    'react/react-in-jsx-scope': 0,
    'semi': ['error', 'never'],
    '@typescript-eslint/semi': ['error', 'never'],
    '@typescript-eslint/no-unused-vars': ['warn'],
    'react/jsx-one-expression-per-line': 0,
    '@typescript-eslint/comma-dangle': ['error', {
      'arrays': 'always-multiline',
      'objects': 'always-multiline',
      'imports': 'never',
      'exports': 'never',
      'functions': 'never'
    }],
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment