-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
39 lines (38 loc) · 1.32 KB
/
.eslintrc.js
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
/**
* Unified ES+TS+Prettier configuration for ESLint. Inspired by:
* https://dev.to/robertcoopercode/using-eslint-and-prettier-in-a-typescript-project-53jb
*
* This file uses JS (not JSON) so we can have comments and object literals.
* PLEASE DO NOT ADD CONDITIONALS OR DYNAMIC CODE. Keep this file as pure data.
*/
module.exports = {
parser: '@typescript-eslint/parser',
env: {
es6: true,
jest: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
// NB: please leave this at the end so it can override all other rules!
'plugin:prettier/recommended',
],
parserOptions: {
ecmaVersion: 2018, // aka ECMAScript 9
sourceType: 'module', // allow `import` statement
},
rules: {
'@typescript-eslint/array-type': 'warn',
'@typescript-eslint/ban-types': ['error', { types: { object: false } }],
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-empty': 'warn',
'no-extra-boolean-cast': 'warn',
'prettier/prettier': ['error', { singleQuote: true, trailingComma: 'es5' }],
},
};