-
-
Notifications
You must be signed in to change notification settings - Fork 130
/
eslint.config.js
50 lines (48 loc) · 1.39 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
38
39
40
41
42
43
44
45
46
47
48
49
50
import eslint from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';
import tseslint from 'typescript-eslint';
import importPlugin from 'eslint-plugin-import';
import react from 'eslint-plugin-react';
const compat = new FlatCompat();
export default tseslint.config(
{ ignores: ['**/dist/', 'packages/create-waku/template/'] },
eslint.configs.recommended,
tseslint.configs.recommended,
importPlugin.flatConfigs.recommended,
react.configs.flat.recommended,
react.configs.flat['jsx-runtime'],
...compat.extends('plugin:react-hooks/recommended'),
{
settings: {
'import/resolver': { typescript: true },
react: { version: '999.999.999' },
},
languageOptions: {
parserOptions: {
project: './tsconfig.eslint.json',
},
},
rules: {
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'react/prop-types': 'off',
curly: ['error', 'all'],
},
},
{
files: [
'packages/waku/cli.js',
'packages/create-waku/cli.js',
'examples/41_path-alias/**/*.tsx',
],
rules: {
'import/no-unresolved': 'off',
},
},
{ ignores: ['examples/44_cloudflare/.wrangler/'] },
);