forked from tryggingamidstodin/node-jt400
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
60 lines (56 loc) · 1.45 KB
/
Copy patheslint.config.js
File metadata and controls
60 lines (56 loc) · 1.45 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
import js from '@eslint/js'
import pluginTs from '@typescript-eslint/eslint-plugin'
import parserTs from '@typescript-eslint/parser'
const mochaGlobals = {
describe: 'readonly',
it: 'readonly',
before: 'readonly',
after: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
xdescribe: 'readonly',
xit: 'readonly',
}
const nodeGlobals = {
process: 'readonly',
console: 'readonly',
Buffer: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
Symbol: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
URL: 'readonly',
require: 'readonly',
module: 'readonly',
exports: 'readonly',
}
const tsRules = {
files: ['ts-src/**/*.ts'],
plugins: { '@typescript-eslint': pluginTs },
languageOptions: {
parser: parserTs,
parserOptions: { project: './tsconfig.eslint.json' },
globals: { ...nodeGlobals, ...mochaGlobals },
},
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-floating-promises': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'space-before-function-paren': 'off',
'comma-dangle': ['error', 'always-multiline'],
'no-eval': 'off',
'no-use-before-define': 'off',
indent: ['error', 2],
},
}
export default [
js.configs.recommended,
tsRules,
{
ignores: ['dist-cjs/', 'dist-esm/', 'node_modules/'],
},
]