-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.js
38 lines (35 loc) · 941 Bytes
/
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
import globals from 'globals';
import tseslint from 'typescript-eslint';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintChaiFriendly from 'eslint-plugin-chai-friendly';
import eslintMocha from 'eslint-plugin-mocha';
const ignores = [
'main.js',
'**/Code.js',
'googleads/**/*',
'cm360/**/*',
'dv360_api/**/*',
'**/dist/**/*',
];
const rules = {
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-unused-expressions': ['off'],
'mocha/max-top-level-suites': ['off'],
};
export default [
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{ languageOptions: { globals: globals.browser } },
{ ignores },
...tseslint.configs.recommended,
eslintConfigPrettier,
eslintMocha.configs.flat.recommended,
eslintChaiFriendly.configs.recommendedFlat,
{ rules },
];