forked from PrairieLearn/PrairieLearn
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc.js
More file actions
39 lines (38 loc) · 802 Bytes
/
.eslintrc.js
File metadata and controls
39 lines (38 loc) · 802 Bytes
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
module.exports = {
env: {
node: true,
es2021: true,
},
extends: ['eslint:recommended', 'plugin:import/recommended', 'prettier'],
parserOptions: {
ecmaVersion: 13,
},
rules: {
curly: ['error', 'multi-line', 'consistent'],
eqeqeq: ['error', 'smart'],
'handle-callback-err': 'error',
'no-unused-vars': [
'error',
{
args: 'after-used',
argsIgnorePattern: '^_',
},
],
// By default, eslint-plugin-import only validates ESM syntax. We're still
// using CommonJS, so we need to explicitly enable support for that.
'import/no-unresolved': [
2,
{
commonjs: true,
},
],
},
overrides: [
{
files: ['*.test.{js,ts,mjs}'],
env: {
mocha: true,
},
},
],
};