forked from algolia/unified-instantsearch-ecommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
35 lines (35 loc) · 971 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
31
32
33
34
35
module.exports = {
extends: ['algolia', 'algolia/react'],
rules: {
'eslint-comments/disable-enable-pair': 0,
// Enforce function declaration for components
'react/function-component-definition': [
'error',
{
'named-components': 'function-declaration',
},
],
// Allow boolean props without explicit values
'react/jsx-boolean-value': 0,
// Allow JSX content in .js files
'react/jsx-filename-extension': 0,
// Allow passing function references to event listeners
'react/jsx-no-bind': 0,
// Avoid errors about `UNSAFE` lifecycles (e.g. `UNSAFE_componentWillMount`)
'react/no-deprecated': 0,
'react/prop-types': 0,
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
settings: {
react: {
version: 'detect',
},
},
parserOptions: {
requireConfigFile: false,
babelOptions: {
presets: ['@babel/preset-react'],
},
},
};