-
Notifications
You must be signed in to change notification settings - Fork 64
/
.eslintrc.js
31 lines (30 loc) · 1.05 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
const { createConfig } = require('@openedx/frontend-build');
module.exports = createConfig(
'eslint',
{
plugins: ['simple-import-sort'],
rules: {
'import/no-extraneous-dependencies': 'off',
'react-hooks/exhaustive-deps': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'jsx-a11y/no-access-key': 'off',
'simple-import-sort/imports': [
'error', {
groups: [
// These packages provide polyfills so should always be first
['core-js', 'regenerator-runtime'],
// React packages should come at the top
['^react$', '^react-dom$', '^prop-types'],
// Non-react third-party packages come next
['^@?\\w'],
// Packages from the @edx namespace come after that
['^@edx?\\w'],
// Finally we have internal, relative imports
['^\\.\\.(?!/?$)', '^\\.\\./?$', '^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
],
},
],
'simple-import-sort/exports': 'error',
},
},
);