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
62
63
| module.exports = {
| 'parser': '@typescript-eslint/parser',
| 'extends': 'eslint:recommended',
| 'parserOptions': {
| 'ecmaVersion': 2018,
| 'sourceType': 'module'
| },
| 'plugins': ['@typescript-eslint'],
| 'env': {
| 'browser': true,
| 'node': true,
| 'mocha': true
| },
| 'globals': {},
| 'rules': {
| indent: ['error', 4, {
| SwitchCase: 1
| }],
| 'no-empty': ['error', { 'allowEmptyCatch': true }],
| quotes: ['error', 'single', {
| avoidEscape: true
| }],
| /**
| * The codebase uses some while(true) statements.
| * Refactor to remove this rule.
| */
| 'no-constant-condition': 0,
| /**
| * Less combines assignments with conditionals sometimes
| */
| 'no-cond-assign': 0,
| /**
| * @todo - remove when some kind of code style (XO?) is added
| */
| 'no-multiple-empty-lines': 'error'
| },
| 'overrides': [
| {
| files: ['*.ts'],
| extends: ['plugin:@typescript-eslint/recommended'],
| rules: {
| /**
| * Suppress until Less has better-defined types
| * @see https://github.com/less/less.js/discussions/3786
| */
| '@typescript-eslint/no-explicit-any': 0
| }
| },
| {
| files: ['test/**/*.{js,ts}', 'benchmark/index.js'],
| /**
| * @todo - fix later
| */
| rules: {
| 'no-undef': 0,
| 'no-useless-escape': 0,
| 'no-unused-vars': 0,
| 'no-redeclare': 0,
| '@typescript-eslint/no-unused-vars': 0
| }
| },
| ]
| }
|
|