-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
55 lines (55 loc) · 1.38 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
50
51
52
53
54
55
// https://github.com/toshi-toma/eslint-config-airbnb-typescript-prettier
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
project: './tsconfig.json',
ecmaFeatures: {
jsx: true,
},
},
env: {
browser: true,
es6: true,
jest: true,
},
extends: [
'airbnb',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
],
plugins: ['fp', 'jsx-a11y', 'import', 'prettier', '@typescript-eslint'],
globals: {},
rules: {
// prettier
'prettier/prettier': ['error'],
// TypeScript
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/no-object-literal-type-assertion': 'off',
'@typescript-eslint/prefer-interface': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
varsIgnorePattern: '^_.*',
argsIgnorePattern: '^_.*',
},
],
// prefer default export
'import/no-default-export': 2,
'import/prefer-default-export': 0,
// no classes
// https://github.com/jfmengels/eslint-plugin-fp
'fp/no-class': 'error',
},
settings: {
'import/resolver': {
node: {
extensions: ['.ts', '.js'],
},
},
'import/extensions': ['.ts', '.js'],
},
}