aboutsummaryrefslogtreecommitdiffstats
path: root/language-web/.eslintrc.js
blob: bf421f9d52fbec20e84ff5db687c3982459f1973 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Loosely based on
// https://github.com/iamturns/create-exposed-app/blob/f14e435b8ce179c89cce3eea89e56202153a53da/.eslintrc.js
module.exports = {
  plugins: [
    '@typescript-eslint',
  ],
  extends: [
    'airbnb',
    'airbnb-typescript',
    'airbnb/hooks',
    'plugin:@typescript-eslint/recommended',
    'plugin:@typescript-eslint/recommended-requiring-type-checking',
  ],
  parserOptions: {
    project: './tsconfig.json',
  },
  rules: {
    // https://basarat.gitbooks.io/typescript/docs/tips/defaultIsBad.html
    'import/prefer-default-export': 'off',
    'import/no-default-export': 'error',
    // propTypes are for runtime validation, but we rely on TypeScript for build-time validation:
    // https://github.com/yannickcr/eslint-plugin-react/issues/2275#issuecomment-492003857
    'react/prop-types': 'off',
  },
  ignorePatterns: [
    '*.js',
    'build/**/*',
    'src/main/js/xtext/**/*',
  ],
};