-
Notifications
You must be signed in to change notification settings - Fork 27
/
.eslintrc.js
63 lines (62 loc) · 1.48 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
const util = require('@fuelrats/eslint-config-react/util')
const { withAliasResolver } = require('@fuelrats/eslint-config/util/import')
module.exports = {
env: {
browser: true,
commonjs: true,
},
extends: [
'@fuelrats/eslint-config',
'@fuelrats/eslint-config-react',
'plugin:@next/next/recommended',
],
globals: {
$$BUILD: 'readonly',
fetch: 'readonly',
},
rules: {
'import/order': util.extendRule('import/order', {
'newlines-between': 'always',
}),
...util.disable(
'jsx-a11y/no-noninteractive-element-interactions', // We intend to enable this once we refactor certain key components.
'jsdoc/require-jsdoc', // we'll get to it someday...
'@next/next/link-passhref', // This rule is broken so just ignore it for now.
),
},
settings: {
'import/ignore': [
'.worker.js$',
],
'import/resolver': withAliasResolver([
['~', './src'],
]),
},
overrides: [
{
files: [
'.config/**/*.js',
'src/pages/api/**/*.js',
'src/util/server/**/*.js',
],
env: {
browser: false,
node: true,
},
},
{
files: ['*.worker.js'],
env: {
browser: false,
commonjs: false,
worker: true,
},
},
{
files: ['src/pages/**/*.js'],
rules: {
'@fuelrats/default-export-matches-module-name': ['off'], // Disabled in pages dir as it becomes difficult to stick to module names
},
},
],
}