Skip to content
This repository was archived by the owner on Dec 12, 2023. It is now read-only.

Commit df5a6d7

Browse files
committed
chore: update @typescript-eslint to v3
1 parent 75bba9f commit df5a6d7

2 files changed

Lines changed: 37 additions & 6 deletions

File tree

index.js

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,43 @@ module.exports = {
2424
jsxBracketSameLine: false
2525
}
2626
],
27-
"no-console": "warn",
27+
'no-console': 'warn',
28+
camelcase: 'off',
2829
'@typescript-eslint/explicit-function-return-type': 'off',
2930
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
3031
'@typescript-eslint/prefer-interface': 'off',
3132
'@typescript-eslint/explicit-member-accessibility': 'off',
32-
'@typescript-eslint/camelcase': ['error', { properties: 'never' }],
33+
'@typescript-eslint/naming-convention': [
34+
'error',
35+
{
36+
selector: 'default',
37+
format: ['camelCase']
38+
},
39+
40+
{
41+
selector: 'variable',
42+
format: ['camelCase', 'UPPER_CASE']
43+
},
44+
{
45+
selector: 'parameter',
46+
format: ['camelCase', 'snake_case'],
47+
leadingUnderscore: 'allow'
48+
},
49+
{
50+
selector: 'property',
51+
format: ['camelCase', 'snake_case']
52+
},
53+
{
54+
selector: 'memberLike',
55+
modifiers: ['private'],
56+
format: ['camelCase'],
57+
leadingUnderscore: 'require'
58+
},
59+
{
60+
selector: 'typeLike',
61+
format: ['PascalCase']
62+
}
63+
],
3364
'react-hooks/rules-of-hooks': 'error',
3465
'react-hooks/exhaustive-deps': 'warn'
3566
},

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"author": "freee",
1515
"license": "MIT",
1616
"devDependencies": {
17-
"@typescript-eslint/eslint-plugin": "^2.20.0",
18-
"@typescript-eslint/parser": "^2.20.0",
17+
"@typescript-eslint/eslint-plugin": "^3.0.0",
18+
"@typescript-eslint/parser": "^3.0.0",
1919
"eslint": "^6.8.0",
2020
"eslint-config-prettier": "^6.10.0",
2121
"eslint-import-resolver-typescript": "^2.0.0",
@@ -27,8 +27,8 @@
2727
"prettier": "^2.0.0"
2828
},
2929
"peerDependencies": {
30-
"@typescript-eslint/eslint-plugin": "^2.20.0",
31-
"@typescript-eslint/parser": "^2.20.0",
30+
"@typescript-eslint/eslint-plugin": "^3.0.0",
31+
"@typescript-eslint/parser": "^3.0.0",
3232
"eslint": "^6.8.0",
3333
"eslint-config-prettier": "^6.10.0",
3434
"eslint-import-resolver-typescript": "^2.0.0",

0 commit comments

Comments
 (0)