generated from su-u/typescript-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
61 lines (60 loc) · 1.44 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
56
57
58
59
60
61
module.exports = {
root: true,
env: {
es6: true,
node: true,
browser: true,
},
parser: 'babel-eslint',
plugins: ['prettier'],
parserOptions: {
version: 2018,
sourceType: 'module',
},
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
// 'airbnb',
],
globals: {
window: 'readonly',
location: 'readonly',
document: 'readonly',
//テスト関係
describe: true,
expect: true,
test: true,
beforeEach: true,
},
rules: {
'no-console': 'warn',
// 'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
quotes: ['error', 'single'],
semi: ['error', 'always'],
'semi-spacing': ['error', { after: true, before: false }],
'semi-style': ['error', 'last'],
'no-extra-semi': 'error',
'no-unexpected-multiline': 'error',
'no-unreachable': 'error',
indent: [2, 2, { SwitchCase: 1 }],
'no-extra-bind': 'warn',
'no-fallthrough': 'warn',
'no-empty': 'warn',
'block-scoped-var': 'warn',
camelcase: 'warn',
'linebreak-style': 'warn',
'no-trailing-spaces': 'warn',
'unicode-bom': 'warn',
'max-len': 'warn',
'prefer-const': 'warn',
// 'arrow-parens': 'error',
},
settings: {
propWrapperFunctions: [
'forbidExtraProps',
{ property: 'freeze', object: 'Object' },
{ property: 'myFavoriteWrapper' },
],
linkComponents: ['Hyperlink', { name: 'Link', linkAttribute: 'to' }],
},
};