-
Notifications
You must be signed in to change notification settings - Fork 48
/
.eslintrc.js
43 lines (43 loc) · 1.33 KB
/
.eslintrc.js
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
module.exports = {
extends: [
'airbnb',
'airbnb/hooks',
'plugin:@typescript-eslint/recommended',
'plugin:jsx-a11y/recommended',
'plugin:@next/next/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2023,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
env: {
browser: true,
node: true,
es6: true,
},
plugins: ['@typescript-eslint', 'jsx-a11y'],
rules: {
// project-specific rules or overrides
semi: ['error', 'never'],
'import/no-unresolved': 'off',
'import/extensions': 'off',
'max-len': ['error', { code: 150 }],
'react/jsx-filename-extension': [2, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
'react/require-default-props': 'off', // fixme revisit and refactor files when there's time to spare
'class-methods-use-this': 'off',
'import/prefer-default-export': 'off', // fixme revisit and refactor files when there's time to spare
'import/no-extraneous-dependencies': 'off', // fixme revisit and refactor files when there's time to spare
'react/react-in-jsx-scope': 'off',
'react/jsx-one-expression-per-line': 'warn',
'no-restricted-imports': ['error', {
paths: [{
name: 'react-i18next',
message: 'Please import useTranslation from next-i18next.',
}],
}],
},
}