forked from MetaMask/snap-stellar-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
68 lines (67 loc) · 1.92 KB
/
Copy patheslint.config.mjs
File metadata and controls
68 lines (67 loc) · 1.92 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
57
58
59
60
61
62
63
64
65
66
67
68
import base, { createConfig } from '@metamask/eslint-config';
import browser from '@metamask/eslint-config-browser';
import jest from '@metamask/eslint-config-jest';
import typescript from '@metamask/eslint-config-typescript';
import prettierConfig from 'eslint-config-prettier';
import prettier from 'eslint-plugin-prettier';
export default createConfig([
{
ignores: [
'packages/snap/dist/',
'packages/site/.cache/',
'packages/site/public/',
],
},
{
files: ['packages/snap/**/*.{ts,tsx}'],
extends: [base, typescript, prettierConfig],
plugins: {
prettier,
},
rules: {
'@typescript-eslint/no-explicit-any': 'error',
'id-length': ['warn', { exceptions: ['t'] }], // Used for the localized translator helper.
'prettier/prettier': 'error',
},
},
{
files: ['packages/site/**/*.{ts,tsx}'],
extends: [base, typescript, browser, prettierConfig],
plugins: {
prettier,
},
rules: {
'@typescript-eslint/explicit-function-return-type': 'off', // this rule should be removed eventually for non tests files,
'@typescript-eslint/no-misused-promises': 'off',
'prettier/prettier': 'error',
},
},
{
files: ['**/*.test.ts', '**/*.test.tsx', '**/__mocks__/*.ts'],
extends: [base, typescript, jest, prettierConfig],
plugins: {
prettier,
},
rules: {
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'prettier/prettier': 'error',
'jest/no-mocks-import': 'off',
'jsdoc/require-jsdoc': 'off',
'jsdoc/require-returns': 'off',
'jsdoc/require-param-description': 'off',
},
},
{
files: ['**/snap.config.ts'],
extends: [prettierConfig],
plugins: {
prettier,
},
rules: {
'import-x/no-nodejs-modules': 'off',
'no-restricted-globals': 'off',
'prettier/prettier': 'error',
},
},
]);