forked from coinbase/onchainkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
56 lines (54 loc) · 1.56 KB
/
eslint.config.mjs
File metadata and controls
56 lines (54 loc) · 1.56 KB
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
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import pluginReact from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
{
ignores: [
'**/coverage',
'**/public',
'**/dist',
'**/esm',
'**/.next',
'pnpm-lock.yaml',
'pnpm-workspace.yaml',
'.changeset',
'packages/create-onchain',
],
},
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
reactHooks.configs['recommended-latest'],
eslintPluginPrettierRecommended,
{
rules: {
'react/react-in-jsx-scope': 'off',
},
},
{
rules: {
'no-lonely-if': 'error',
'no-restricted-imports': ['error', 'node:*'],
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
'@typescript-eslint/parameter-properties': [
'error',
{ prefer: 'class-property' },
],
// TODO: These rules are temporarily disabled due to existing errors in codebase
// They will be enabled and fixed as soon as the worskapce PR is merged
complexity: ['error', 20],
'no-unused-vars': 'off',
'sort-keys': [
'off',
'asc',
{ caseSensitive: true, natural: false, minKeys: 2 },
],
},
},
];