-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patheslint.config.mjs
More file actions
115 lines (114 loc) · 3.85 KB
/
eslint.config.mjs
File metadata and controls
115 lines (114 loc) · 3.85 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
* Teragrep User Interface (ajs_01)
* Copyright (C) 2019-2026 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
import eslint from '@eslint/js';
import globals from 'globals';
import { defineConfig } from 'eslint/config';
import stylistic from '@stylistic/eslint-plugin';
import tseslint from 'typescript-eslint';
export default defineConfig(
eslint.configs.recommended,
tseslint.configs.recommendedTypeChecked,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
globals: {
'$':true,
'jQuery':true,
'angular': true,
'bootstrap': true,
...globals.node,
...globals.jasmine,
...globals.browser
}
},
},
{
files: ['**/*.{js,mjs,cjs,ts}'],
extends:[
tseslint.configs.disableTypeChecked
],
plugins:{'@stylistic': stylistic },
rules: {
'no-multiple-empty-lines': 'error',
'camelcase': 'error',
'curly': 'error',
'eqeqeq': 'error',
'no-useless-return': 'error',
'no-useless-assignment': 'error',
'no-var': 'error',
'prefer-const': 'error',
'no-console': ['error',
{
'allow': ['warn', 'error', 'trace', 'debug', 'info'],
}],
'no-constructor-return': 'error',
'no-await-in-loop': 'warn',
'no-duplicate-imports': 'error',
'no-template-curly-in-string': 'error',
'no-promise-executor-return': 'error',
'no-unmodified-loop-condition': 'error',
'no-unreachable-loop': 'error',
'no-use-before-define': ['error',
{
'functions': false,
'allowNamedExports': true,
}],
'no-unneeded-ternary': 'error',
'@typescript-eslint/no-unused-vars': ['error',
{
'args': 'none',
}],
'@typescript-eslint/no-require-imports': 'off',
'@stylistic/quotes': ['error', 'single'],
'@stylistic/semi': ['error', 'always'],
'@stylistic/template-curly-spacing': 'error',
'@stylistic/no-extra-parens': 'error',
},
}
);