-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc.js
More file actions
49 lines (48 loc) · 961 Bytes
/
Copy path.eslintrc.js
File metadata and controls
49 lines (48 loc) · 961 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
40
41
42
43
44
45
46
47
48
49
// ABOUTME: ESLint configuration for Node.js and Twilio Functions
// ABOUTME: Enforces code quality standards with Prettier integration
module.exports = {
env: {
node: true,
es2022: true,
jest: true
},
extends: [
'eslint:recommended',
'prettier'
],
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module'
},
plugins: [
'prettier'
],
rules: {
'prettier/prettier': 'error',
'no-console': 'off', // Allow console.log in serverless functions
'no-unused-vars': 'warn',
'prefer-const': 'error',
'no-var': 'error'
},
overrides: [
{
files: ['functions/**/*.js'],
env: {
node: true
},
globals: {
Twilio: 'readonly',
Runtime: 'readonly'
},
rules: {
'no-undef': 'off' // Twilio runtime provides globals
}
},
{
files: ['tests/**/*.js', '**/*.test.js'],
env: {
jest: true
}
}
]
};