This repository has been archived by the owner on Jul 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
67 lines (67 loc) · 1.91 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/**
* Typescript-eslint: https://typescript-eslint.io/docs/linting/type-linting/
* Airbnb: https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb#eslint-config-airbnbhooks
* Airbnb Typescript: https://github.com/iamturns/eslint-config-airbnb-typescript
*
* */
module.exports = {
root: true,
extends: ['eslint:recommended', 'next/core-web-vitals', 'airbnb', 'prettier'],
plugins: ['prettier'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
},
rules: {
'no-console': 'off',
'arrow-body-style': ['error', 'always'],
'import/prefer-default-export': 'off',
'react/jsx-props-no-spreading': 'off',
'react/react-in-jsx-scope': 'off',
'react/destructuring-assignment': 'off',
'react/function-component-definition': [
'error',
{ namedComponents: 'arrow-function' },
],
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/label-has-associated-control': [
'error',
{
required: {
some: ['id'],
},
},
],
'prettier/prettier': ['error'],
},
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'airbnb-typescript',
'prettier',
],
parserOptions: {
tsconfigRootDir: '.',
project: ['tsconfig.json'],
},
rules: {
'import/no-unresolved': 'error',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-misused-promises': [
'error',
{ checksVoidReturn: false },
],
'prettier/prettier': 'error',
},
},
],
};