-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.eslintrc.js
30 lines (27 loc) · 948 Bytes
/
.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
module.exports = {
extends: ['@prezly/eslint-config/nextjs'],
rules: {
// TODO: NextJS Dynamic import doesn't work too well with named exports.
// Gotta figure out how to make them work together.
// Some hints here: https://github.com/vercel/next.js/issues/22278#issuecomment-1009865850
'import/no-default-export': 'off',
'no-restricted-exports': 'off',
// ESLint complains about const func declarations we use in this repo.
'func-style': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'jsx-a11y/label-has-associated-control': [
'warn',
{
assert: 'either',
controlComponents: ['Field'],
},
],
// Extra rules
'react/jsx-props-no-spreading': [
'error',
{
exceptions: ['FormattedMessage'],
},
],
},
};