Commit | Line | Data |
---|---|---|
777b7824 S |
1 | module.exports = { |
2 | env: { | |
3 | es2021: true, | |
4 | node: true, | |
5 | mocha: true | |
6 | }, | |
7 | parser: '@typescript-eslint/parser', | |
8 | parserOptions: { | |
fa699c42 | 9 | ecmaVersion: 2020, |
777b7824 S |
10 | sourceType: 'module' |
11 | }, | |
50eceb07 | 12 | plugins: ['@typescript-eslint', 'promise', 'prettierx', 'jsdoc'], |
777b7824 S |
13 | extends: [ |
14 | 'standard', | |
15 | 'eslint:recommended', | |
16 | 'plugin:@typescript-eslint/recommended', | |
fa699c42 JB |
17 | 'plugin:import/errors', |
18 | 'plugin:import/warnings', | |
19 | 'plugin:import/typescript', | |
583a27ce | 20 | 'plugin:promise/recommended', |
777b7824 | 21 | 'plugin:prettierx/standardx', |
583a27ce | 22 | 'plugin:prettierx/@typescript-eslint' |
777b7824 S |
23 | ], |
24 | rules: { | |
25 | 'no-void': 'off', | |
26 | ||
777b7824 S |
27 | // We have some intentionally empty functions |
28 | '@typescript-eslint/no-empty-function': 'off', | |
29 | ||
30 | '@typescript-eslint/no-inferrable-types': [ | |
31 | 'error', | |
32 | { ignoreProperties: true } | |
fa699c42 JB |
33 | ], |
34 | ||
35 | 'sort-imports': [ | |
36 | 'warn', | |
37 | { | |
38 | ignoreMemberSort: true, | |
50aa7901 | 39 | ignoreDeclarationSort: true |
fa699c42 | 40 | } |
777b7824 | 41 | ] |
3c5eaeb9 JB |
42 | }, |
43 | overrides: [ | |
50eceb07 S |
44 | { |
45 | files: ['src/**/*.ts'], | |
46 | extends: 'plugin:jsdoc/recommended', | |
47 | rules: { | |
48 | 'jsdoc/no-types': 'error', | |
49 | 'jsdoc/require-param-type': 'off', | |
50 | 'jsdoc/require-returns-type': 'off' | |
51 | } | |
52 | }, | |
3c5eaeb9 JB |
53 | { |
54 | files: ['*.js'], | |
583a27ce | 55 | extends: 'plugin:node/recommended', |
3c5eaeb9 | 56 | rules: { |
fa699c42 | 57 | '@typescript-eslint/no-unused-vars': 'off', |
3c5eaeb9 JB |
58 | '@typescript-eslint/no-var-requires': 'off' |
59 | } | |
fa699c42 JB |
60 | }, |
61 | { | |
583a27ce | 62 | files: ['examples/typescript/**/*.ts'], |
fa699c42 JB |
63 | rules: { |
64 | 'import/no-unresolved': 'off' | |
65 | } | |
583a27ce JB |
66 | }, |
67 | { | |
68 | files: ['examples/**/*.js'], | |
69 | rules: { | |
70 | 'node/no-missing-require': 'off' | |
71 | } | |
3c5eaeb9 JB |
72 | } |
73 | ] | |
777b7824 | 74 | } |