-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
53 lines (50 loc) · 1.13 KB
/
Copy path.eslintrc.js
File metadata and controls
53 lines (50 loc) · 1.13 KB
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
module.exports = {
extends: [
'next/core-web-vitals',
'eslint:recommended'
],
plugins: ['jest'],
env: {
browser: true,
node: true,
es6: true,
jest: true
},
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
rules: {
// Meta-specific code quality rules
'no-console': ['warn', { allow: ['warn', 'error'] }],
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-var': 'error',
'prefer-const': 'error',
'eqeqeq': 'error',
'curly': 'error',
// React specific
'react/prop-types': 'off', // Using TypeScript instead
'react/react-in-jsx-scope': 'off', // Next.js auto-imports React
'react/display-name': 'off',
// Next.js specific
'@next/next/no-img-element': 'error',
'@next/next/no-html-link-for-pages': 'error',
// Performance
'no-await-in-loop': 'warn',
'require-atomic-updates': 'error'
},
overrides: [
{
files: ['**/*.test.js', '**/*.test.jsx'],
env: {
jest: true
},
rules: {
'no-console': 'off'
}
}
]
};