-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
37 lines (36 loc) · 1.02 KB
/
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
/** https://stackoverflow.com/questions/74237042/how-to-correctly-configure-the-parser-plugins-with-eslints-new-flat-config 참고 */
import ts from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import functional from 'eslint-plugin-functional';
import pluginImport from 'eslint-plugin-import';
import pluginReact from 'eslint-plugin-react';
import globals from 'globals';
export default [
{
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
plugins: {
react: pluginReact,
functional,
import: pluginImport,
'@typescript-eslint': ts,
ts,
},
rules: {
'react/jsx-uses-react': 'error',
},
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaFeatures: {
jsx: true,
modules: true,
},
projectService: true,
project: '../../tsconfig.json',
ecmaVersion: 'latest',
},
globals: { ...globals.browser, ...globals.node },
},
ignores: ['**/*.config.js', 'dist'],
},
];