generated from neurobagel/react-bagel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
44 lines (44 loc) · 1.38 KB
/
.eslintrc.cjs
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:cypress/recommended',
'airbnb',
'airbnb/hooks',
'@kesills/airbnb-typescript',
'prettier',
],
ignorePatterns: ['dist', '.eslintrc.cjs', 'lint-staged.config.js'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.*json'],
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
},
},
},
plugins: ['react-refresh', 'cypress', 'eslint-plugin-tsdoc'],
rules: {
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'react/react-in-jsx-scope': 'off',
'tsdoc/syntax': 'warn',
// Disabling this rule allows us to use blanket exports from components
'import/prefer-default-export': 'off',
/*
The fork of the eslint-config-airbnb-typescript package has added ESLint Stylistic plugin
to the config. see:https://github.com/Kenneth-Sills/eslint-config-airbnb-typescript/pull/3
Some of the stylistic rules are not compatible with our current prettier config so we disable them.
*/
'@stylistic/indent': 'off',
'@stylistic/comma-dangle': 'off',
},
};