-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
34 lines (31 loc) · 977 Bytes
/
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
import globals from 'globals';
import pluginJs from '@eslint/js';
import pluginTypescript from 'typescript-eslint';
import pluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
export default [
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{
ignores: ['**/build', '**/dist', '**/public', '**/var', '**/vendor', '**/coverage', '**/tests', 'rollup.config.js'],
},
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...pluginTypescript.configs.recommended,
pluginPrettierRecommended,
// Override rules
{
rules: {
'no-duplicate-imports': 'warn',
'no-console': ['warn', { allow: ['warn', 'error'] }],
// TypeScript
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/consistent-type-imports': [
'warn',
{
prefer: 'type-imports',
disallowTypeAnnotations: false,
fixStyle: 'inline-type-imports',
},
],
},
},
];