forked from DFXswiss/app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
45 lines (44 loc) · 1.51 KB
/
Copy path.eslintrc.js
File metadata and controls
45 lines (44 loc) · 1.51 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
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['tsconfig.json', 'e2e/tsconfig.json'],
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
// 'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
// Story files are excluded from tsconfig.json, so the type-aware parser cannot resolve them.
ignorePatterns: ['.eslintrc.js', '**/*.stories.tsx'],
overrides: [
{
// Cloudflare Pages Functions are deployed but never bundled into the app, so they sit
// outside tsconfig.json and the type-aware parser cannot resolve them. Linting them
// without type information still gives this path a static syntax check, which the build
// does not provide for files it never compiles.
files: ['functions/**/*.js'],
parserOptions: { project: null },
env: { browser: true, node: false, jest: false },
},
],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
};