chore(docs): adjust settings copy
[ProtonMail-WebClient.git] / applications / wallet / .eslintrc.js
blob350d0b9a35d277fa13e7bf25dd013b9283c0c202
1 const isFixMode = process.argv.includes('--fix');
2 module.exports = {
3     extends: ['@proton/eslint-config-proton'],
4     parser: '@typescript-eslint/parser',
5     parserOptions: {
6         tsconfigRootDir: __dirname,
7         project: './tsconfig.json',
8     },
9     rules: {
10         'react/prop-types': 'off',
11         ...(!isFixMode && {
12             'react-hooks/exhaustive-deps': 'warn',
13         }),
14         'no-console': [
15             'error',
16             {
17                 allow: ['warn', 'error'],
18             },
19         ],
20         'max-classes-per-file': 'off',
21         '@typescript-eslint/no-use-before-define': [
22             'error',
23             {
24                 functions: false,
25                 classes: false,
26             },
27         ],
28     },
29     overrides: [
30         {
31             files: ['*.test.ts'],
32             rules: {
33                 'max-classes-per-file': 'off',
34                 'class-methods-use-this': 'off',
35             },
36         },
37     ],
38     ignorePatterns: ['.eslintrc.js', 'assets/sandbox.js', 'pkg/'],