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 | }, | |
5c5a1fb7 S |
12 | plugins: [ |
13 | '@typescript-eslint', | |
14 | 'promise', | |
15 | 'prettierx', | |
16 | 'jsdoc', | |
17 | 'spellcheck' | |
18 | ], | |
777b7824 S |
19 | extends: [ |
20 | 'standard', | |
21 | 'eslint:recommended', | |
22 | 'plugin:@typescript-eslint/recommended', | |
fa699c42 JB |
23 | 'plugin:import/errors', |
24 | 'plugin:import/warnings', | |
25 | 'plugin:import/typescript', | |
583a27ce | 26 | 'plugin:promise/recommended', |
777b7824 | 27 | 'plugin:prettierx/standardx', |
583a27ce | 28 | 'plugin:prettierx/@typescript-eslint' |
777b7824 S |
29 | ], |
30 | rules: { | |
31 | 'no-void': 'off', | |
32 | ||
777b7824 S |
33 | // We have some intentionally empty functions |
34 | '@typescript-eslint/no-empty-function': 'off', | |
35 | ||
36 | '@typescript-eslint/no-inferrable-types': [ | |
37 | 'error', | |
38 | { ignoreProperties: true } | |
fa699c42 JB |
39 | ], |
40 | ||
41 | 'sort-imports': [ | |
42 | 'warn', | |
43 | { | |
44 | ignoreMemberSort: true, | |
50aa7901 | 45 | ignoreDeclarationSort: true |
fa699c42 | 46 | } |
5c5a1fb7 S |
47 | ], |
48 | ||
49 | 'spellcheck/spell-checker': [ | |
50 | 'warn', | |
51 | { | |
52 | skipWords: [ | |
53 | 'poolifier', | |
54 | 'pioardi', | |
55 | 'christopher', | |
56 | 'ecma', | |
57 | 'jsdoc', | |
58 | 'readonly', | |
59 | 'serializable', | |
60 | 'unregister', | |
61 | 'workerpool' | |
62 | ], | |
63 | skipIfMatch: ['^@.*', '^plugin:.*'] | |
64 | } | |
777b7824 | 65 | ] |
3c5eaeb9 JB |
66 | }, |
67 | overrides: [ | |
50eceb07 S |
68 | { |
69 | files: ['src/**/*.ts'], | |
70 | extends: 'plugin:jsdoc/recommended', | |
71 | rules: { | |
72 | 'jsdoc/no-types': 'error', | |
73 | 'jsdoc/require-param-type': 'off', | |
74 | 'jsdoc/require-returns-type': 'off' | |
75 | } | |
76 | }, | |
3c5eaeb9 JB |
77 | { |
78 | files: ['*.js'], | |
583a27ce | 79 | extends: 'plugin:node/recommended', |
3c5eaeb9 | 80 | rules: { |
fa699c42 | 81 | '@typescript-eslint/no-unused-vars': 'off', |
3c5eaeb9 JB |
82 | '@typescript-eslint/no-var-requires': 'off' |
83 | } | |
fa699c42 JB |
84 | }, |
85 | { | |
583a27ce | 86 | files: ['examples/typescript/**/*.ts'], |
fa699c42 JB |
87 | rules: { |
88 | 'import/no-unresolved': 'off' | |
89 | } | |
583a27ce JB |
90 | }, |
91 | { | |
92 | files: ['examples/**/*.js'], | |
93 | rules: { | |
94 | 'node/no-missing-require': 'off' | |
95 | } | |
3c5eaeb9 JB |
96 | } |
97 | ] | |
777b7824 | 98 | } |