-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
49 lines (49 loc) · 1.5 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
40
41
42
43
44
45
46
47
48
49
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint/eslint-plugin', 'prettier'],
extends: ['eslint:recommended', 'airbnb-base', 'plugin:prettier/recommended'],
overrides: [
{
files: ['*.ts', '*.tsx', '*.js'],
rules: {
/**
* Exception handling of eslint `no-unused-vars` error when importing Typescript Interface
* @see https://github.com/typescript-eslint/typescript-eslint/issues/46
*/
'@typescript-eslint/no-unused-vars': [2, { args: 'none' }],
/**
* @see https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md
*/
'import/extensions': 0,
'prettier/prettier': [
'warn',
{
arrowParens: 'always',
bracketSpacing: true,
jsxSingleQuote: false,
printWidth: 80,
quoteProps: 'as-needed',
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: 'es5',
useTabs: false,
endOfLine: 'auto',
},
],
},
settings: {
/**
* Automatically enter extension when loading `.[d.]ts` files
* @see https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md
*/
'import/resolver': {
node: {
paths: './',
extensions: ['.js', '.jsx', '.ts', '.ts'],
},
},
},
},
],
};