-
-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy patheslint.config.js
More file actions
61 lines (59 loc) · 1.22 KB
/
eslint.config.js
File metadata and controls
61 lines (59 loc) · 1.22 KB
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
const { defineConfig, globalIgnores } = require('eslint/config');
const envNode = require('eslint-config-axway/env-node');
const pluginJasmine = require('eslint-plugin-jasmine');
const globals = require('globals');
const titaniumGlobals = {
alert: 'readonly',
console: 'readonly',
decodeURIComponent: 'readonly',
encodeURIComponent: 'readonly',
L: 'readonly',
require: 'readonly',
Ti: 'readonly',
Titanium: 'readonly',
clearTimeout: 'readonly',
clearInterval: 'readonly',
setTimeout: 'readonly',
setInterval: 'readonly',
exports: 'readonly',
module: 'readonly'
};
module.exports = defineConfig([
globalIgnores([
'node_modules/**',
'android/bin/**',
'android/build/**',
'android/dist/**',
'ios/build/**',
'ios/dist/**'
]),
{
extends: [ envNode ],
languageOptions: {
ecmaVersion: 2015,
sourceType: 'script',
globals: titaniumGlobals
},
rules: {
'no-alert': 'off',
'no-implicit-globals': 'off'
}
},
{
files: [ 'dangerfile.js' ],
languageOptions: {
ecmaVersion: 2017,
sourceType: 'module'
}
},
{
files: [ 'test/unit/**/*.js' ],
plugins: {
jasmine: pluginJasmine
},
languageOptions: {
globals: globals.jasmine
},
rules: pluginJasmine.configs.recommended.rules
}
]);