-
Notifications
You must be signed in to change notification settings - Fork 19
/
eslint.config.mjs
42 lines (40 loc) · 1.27 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 {FlatCompat} from '@eslint/eslintrc';
import pluginJs from '@eslint/js';
import eslintPrettierConfig from 'eslint-config-prettier';
import eslintPluginPrettier from 'eslint-plugin-prettier';
import pluginReactConfig from 'eslint-plugin-react/configs/recommended.js';
import globals from 'globals';
import path from 'path';
import {fileURLToPath} from 'url';
// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: pluginJs.configs.recommended,
});
export default [
{languageOptions: {globals: globals.node}},
...compat.extends('standard-with-typescript'),
pluginReactConfig,
eslintPrettierConfig,
{ignores: ['*.config.*', '.yarn', '.prettierrc.js', '.expo']},
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
plugins: {
prettier: eslintPluginPrettier,
},
rules: {
semi: 'off',
'@typescript-eslint/semi': 'off',
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/no-misused-promises': [
'error',
{
checksVoidReturn: false,
},
],
},
},
];