forked from yamadashy/tech-blog-rss-feed
-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.mjs
57 lines (52 loc) · 1.49 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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.node,
...globals.browser,
},
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',
'@typescript-eslint/no-require-imports': 'off',
...importPlugin.configs.typescript.rules,
'import/no-unresolved': 'off',
'import/prefer-default-export': 'off',
...eslintPluginPrettierRecommended.rules,
'prettier/prettier': 'warn',
},
},
{
files: ['**/*.js'],
languageOptions: {
globals: {
...globals.es2021,
...globals.node,
...globals.browser,
},
},
rules: {
...js.configs.recommended.rules,
},
},
];