-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.js
44 lines (44 loc) · 1.26 KB
/
next.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
/** @type {import('eslint').ESLint.ConfigData} */
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import'],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx']
},
'import/resolver': {
typescript: {
alwaysTryTypes: true
}
}
},
extends: [
'next/core-web-vitals',
'airbnb',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'eslint-config-prettier'
],
rules: {
indent: 'off',
'no-use-before-define': 'off',
'no-else-return': [
'error',
{
allowElseIf: true
}
],
'import/extensions': 'off',
'import/prefer-default-export': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.tsx'] }],
'react/jsx-props-no-spreading': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
'react/no-multi-comp': 'error',
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
'react/prop-types': 'off', // Since we do not use prop-types
'react/require-default-props': 'off', // Since we do not use prop-types
'no-plusplus': [2, { allowForLoopAfterthoughts: true }], // allow ++ only in for loops
'react/react-in-jsx-scope': 'off' // not needed in next.js
}
}