-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
eslint.config.mjs
42 lines (38 loc) · 1.22 KB
/
eslint.config.mjs
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
import js from '@eslint/js';
import typescriptEslintParser from '@typescript-eslint/parser';
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import importPlugin from 'eslint-plugin-import';
import eslintPluginPrettier from 'eslint-plugin-prettier';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
export default [
{
files: ['**/*.ts'],
languageOptions: {
globals: {
...globals.es2021,
...globals.browser,
...globals.webextensions,
},
parser: typescriptEslintParser,
},
plugins: {
'js': js,
'@typescript-eslint': typescriptEslint,
'import': importPlugin,
'prettier': eslintPluginPrettier,
},
rules: {
...js.configs.recommended.rules,
...typescriptEslint.configs.recommended.rules,
...typescriptEslint.configs.strict.rules,
...typescriptEslint.configs.stylistic.rules,
'@typescript-eslint/no-var-requires': 'off',
...importPlugin.configs.typescript.rules,
'import/no-unresolved': 'off',
'import/prefer-default-export': 'off',
...eslintPluginPrettierRecommended.rules,
'prettier/prettier': 'warn',
},
},
];