-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path.eslintrc.js
63 lines (53 loc) · 1.32 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
// ESLint configuration
// http://eslint.org/docs/user-guide/configuring
module.exports = {
parser: 'babel-eslint',
extends: [
'airbnb',
],
globals: {
__DEV__: true,
},
env: {
node: true,
browser: true,
amd: true,
es6: true,
jest: true
},
rules: {
// `js` and `jsx` are common extensions
'import/extensions': [
'error',
'always',
{
js: 'never',
jsx: 'never',
},
],
'react/jsx-filename-extension': [
1,
{
'extensions': ['.js', '.jsx'],
},
],
// Not supporting nested package.json yet
// https://github.com/benmosher/eslint-plugin-import/issues/458
'import/no-extraneous-dependencies': 'off',
// Recommend not to leave any console.log in your code
// Use console.error, console.warn and console.info instead
'no-console': [
'error',
{
allow: ['warn', 'error', 'info'],
},
],
// Switching off checks for linebreaks
'linebreak-style': 'off',
// Switching off default exports
'import/prefer-default-export': 'off',
// Switching off prop-types, which is disabled in React 18 and removed in React 19
// See https://react.dev/blog/2024/04/25/react-19-upgrade-guide#removed-proptypes-and-defaultprops
"react/prop-types": "off"
},
};