-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.js
54 lines (53 loc) · 1.3 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
45
46
47
48
49
50
51
52
53
54
module.exports = {
extends: ['next/core-web-vitals', './recommended'],
plugins: ['react'],
rules: {
// https://github.com/jsx-eslint/eslint-plugin-react
'react/react-in-jsx-scope': 'error',
'react/function-component-definition': [
'error',
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
'react/button-has-type': 'error',
'react/jsx-no-leaked-render': ['error', { validStrategies: ['ternary'] }],
'react/forward-ref-uses-ref': 'error',
'react/no-unstable-nested-components': ['error', { allowAsProps: true }],
// ./recommended.js
'import-alias/import-alias': [
'error',
{
relativeDepth: 1,
aliases: [
{
alias: '@src',
matcher: '^src',
},
{
alias: '@fp',
matcher: '^src/lib/fp',
},
{
alias: '@ui',
matcher: '^src/components/ui',
},
{
alias: '@public',
matcher: '^public',
},
],
},
],
},
overrides: [
{
files: ['./src/pages/**/*', './src/app/**/*'],
rules: {
'canonical/filename-match-exported': 'off',
'import/prefer-default-export': 'off',
},
},
],
}