forked from Adamantine-guild/guildpass-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
41 lines (40 loc) · 1.33 KB
/
Copy patheslint.config.js
File metadata and controls
41 lines (40 loc) · 1.33 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
const tsParser = require('@typescript-eslint/parser');
const tsPlugin = require('@typescript-eslint/eslint-plugin');
module.exports = [
{
files: ['src/**/*.ts', 'tests/**/*.ts', 'examples/**/*.ts'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': tsPlugin,
},
rules: {
...tsPlugin.configs.recommended.rules,
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
// Guard against the import conflicts described in #83: catch the same
// module being imported twice, and keep `RequestOptions` sourced only from
// its canonical module (../types/common), never re-introduced in http.types.
'no-duplicate-imports': 'error',
'no-restricted-imports': [
'error',
{
patterns: [
{
group: ['**/http/http.types'],
importNames: ['RequestOptions'],
message:
'Import RequestOptions from "../types/common" (the canonical request-options type). http.types must not redeclare it.',
},
],
},
],
},
},
];