-
Notifications
You must be signed in to change notification settings - Fork 19
/
.eslintrc.js
34 lines (32 loc) · 1.06 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
// eslint-disable-next-line import/no-extraneous-dependencies
const { createConfig } = require('@openedx/frontend-build');
const config = createConfig('eslint', {
extends: [
'@edx/eslint-config',
'plugin:@tanstack/eslint-plugin-query/recommended',
],
ignorePatterns: [
'webpack.*.config.js',
],
overrides: [
{
files: ['*.test.js', '*.test.jsx'],
rules: {
'react/prop-types': 'off',
'react/jsx-no-constructed-context-values': 'off',
},
},
],
rules: {
// Temporarily update the 'indent' and 'template-curly-spacing' rules
// since they are causing eslint to fail for no apparent reason since
// upgrading @edx/frontend-build from v3 to v5:
// - TypeError: Cannot read property 'range' of null
indent: ['error', 2, { ignoredNodes: ['TemplateLiteral', 'SwitchCase'] }],
'template-curly-spacing': 'off',
'import/prefer-default-export': 'off',
'no-underscore-dangle': ['error', { allow: ['_ctx', '_def'] }],
'@typescript-eslint/no-throw-literal': 'off',
},
});
module.exports = config;