forked from dherault/serverless-offline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
47 lines (40 loc) · 1.14 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
'use strict'
module.exports = {
extends: [
'eslint:recommended',
'eslint-config-airbnb-base',
'plugin:prettier/recommended',
],
env: {
jest: true,
},
globals: {
RUN_TEST_AGAINST_AWS: true,
TEST_BASE_URL: true,
},
// we need this to have support for dynamic imports
// although they are ecma stage 4 proposal -> currently being implemented in eslint
parser: 'babel-eslint',
rules: {
// overwrite airbnb-base options
// require file extensions
'import/extensions': ['error', 'always', { ignorePackages: true }],
// import buffer explicitly
'no-restricted-globals': [
'error',
{
name: 'Buffer',
message: "Import 'Buffer' from 'buffer' module instead",
},
],
// we use underscores to indicate private fields in classes
'no-underscore-dangle': 'off',
// we turn this off here, for all commonjs modules (e.g. test fixtures etc.)
strict: ['off'],
// TODO FIXME turn off temporary, to make eslint pass
'class-methods-use-this': 'off',
'lines-between-class-members': 'off',
'no-console': 'off',
'no-restricted-syntax': 'off',
},
}