-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheslint.config.js
58 lines (56 loc) · 1.12 KB
/
eslint.config.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
48
49
50
51
52
53
54
55
56
57
58
'use strict';
const eslint_js = require('@eslint/js');
module.exports = [
eslint_js.configs.recommended,
{
ignores: [
'temp.js',
'target/**/*',
'build/**/*',
],
},
{
files: [ '**/*.js' ],
languageOptions: {
ecmaVersion: 2020,
sourceType: 'commonjs',
},
},
{
files: [ '**/*.mjs' ],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
},
{
files: [ '**/*.js', '**/*.mjs' ],
languageOptions: {
globals: {
// node
__dirname: 'readonly',
process: 'readonly',
console: 'readonly',
// tree-sitter
seq: 'readonly',
choice: 'readonly',
optional: 'readonly',
repeat: 'readonly',
repeat1: 'readonly',
field: 'readonly',
prec: 'readonly',
token: 'readonly',
alias: 'readonly',
grammar: 'readonly',
},
},
rules: {
'max-len': 'off',
'indent': 'off',
'camelcase': 'off',
'no-empty': 'off',
'comma-dangle': [ 'error', 'always-multiline' ],
'no-unused-vars': 'off',
},
},
];