-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
36 lines (35 loc) · 1.03 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
import { fixupPluginRules } from '@eslint/compat';
import js from '@eslint/js';
import unusedImports from 'eslint-plugin-unused-imports';
import prettierRecommended from 'eslint-plugin-prettier/recommended';
import importPlugin from 'eslint-plugin-import';
import globals from 'globals';
import ts from 'typescript-eslint';
export default [
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
js.configs.recommended,
...ts.configs.recommended,
prettierRecommended,
{
plugins: {
import: fixupPluginRules(importPlugin),
'unused-imports': unusedImports,
},
},
{ ignores: ['**/dist/'] },
{
rules: {
'no-console': 'error',
'prettier/prettier': 'error',
'@typescript-eslint/no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'error',
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'],
'newlines-between': 'always',
},
],
},
},
];