1
1
// Importing necessary ESLint plugins
2
- import typescriptEslint from 'typescript-eslint' ;
2
+ import tseslint from 'typescript-eslint' ;
3
3
import noOnlyTestsPlugin from 'eslint-plugin-no-only-tests' ;
4
4
import headerPlugin from 'eslint-plugin-header' ;
5
5
import jsdocPlugin from 'eslint-plugin-jsdoc' ;
6
6
import preferArrowPlugin from 'eslint-plugin-prefer-arrow' ;
7
7
import importPlugin from 'eslint-plugin-import' ;
8
8
import noNullPlugin from 'eslint-plugin-no-null' ;
9
9
import localRulesPlugin from 'eslint-plugin-local-rules' ;
10
- import globals from 'globals' ;
11
10
import eslintConfigPrettier from 'eslint-config-prettier' ;
12
11
import pluginJs from '@eslint/js' ;
13
12
14
13
const commonConfig = {
15
14
plugins : {
16
- '@typescript-eslint' : typescriptEslint . plugin ,
15
+ '@typescript-eslint' : tseslint . plugin ,
17
16
'no-only-tests' : noOnlyTestsPlugin ,
18
17
header : headerPlugin ,
19
18
jsdoc : jsdocPlugin ,
@@ -23,17 +22,9 @@ const commonConfig = {
23
22
'local-rules' : localRulesPlugin ,
24
23
} ,
25
24
languageOptions : {
26
- parser : typescriptEslint . parser ,
27
- sourceType : 'module' ,
28
- ecmaVersion : 'latest' ,
29
- globals : {
30
- ...globals . browser ,
31
- ...globals . node ,
32
- ...globals . commonjs ,
33
- ...globals . es6 ,
34
- $ : false ,
35
- chrome : false ,
36
- OpenPGP : false ,
25
+ parser : tseslint . parser ,
26
+ parserOptions : {
27
+ project : true ,
37
28
} ,
38
29
} ,
39
30
rules : {
@@ -179,8 +170,8 @@ export default [
179
170
ignores : [ 'extension/types/**' , 'extension/js/common/core/types/**' , 'test/source/core/types/**' , 'build/**' , 'extension/lib/**' , 'eslint.config.js' ] ,
180
171
} ,
181
172
pluginJs . configs . recommended ,
182
- ...typescriptEslint . configs . strictTypeChecked ,
183
- ...typescriptEslint . configs . stylisticTypeChecked ,
173
+ ...tseslint . configs . strictTypeChecked ,
174
+ ...tseslint . configs . stylisticTypeChecked ,
184
175
eslintConfigPrettier ,
185
176
{
186
177
...commonConfig ,
@@ -220,7 +211,7 @@ export default [
220
211
'@typescript-eslint/no-unsafe-member-access' : 'off' ,
221
212
} ,
222
213
} ,
223
- ...typescriptEslint . config ( {
214
+ ...tseslint . config ( {
224
215
files : [ 'extension/js/content_scripts/webmail/**/*.ts' ] ,
225
216
languageOptions : {
226
217
parserOptions : {
0 commit comments