Skip to content

Commit db137e9

Browse files
chore: Update ESLint and @typescript-eslint dependencies (#1540)
* Update ESLint and @typescript-eslint dependencies * Replace Function with a signature
1 parent 2585797 commit db137e9

29 files changed

+941
-1251
lines changed

.eslintrc.js

+59-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ module.exports = {
2222
],
2323
extends: [
2424
'eslint:recommended',
25-
'plugin:@typescript-eslint/eslint-recommended',
2625
'plugin:@typescript-eslint/recommended',
2726
],
2827
rules: {
@@ -33,6 +32,7 @@ module.exports = {
3332
// Disabled checks
3433
'@typescript-eslint/no-explicit-any': 0,
3534
'@typescript-eslint/no-use-before-define': 0,
35+
'@typescript-eslint/no-var-requires': 0,
3636

3737
// Required checks
3838
'indent': ['error', 2],
@@ -55,6 +55,63 @@ module.exports = {
5555
],
5656
'no-unused-vars': 'off', // Must be disabled to enable the next rule
5757
'@typescript-eslint/no-unused-vars': ['error'],
58-
'quotes': ['error', 'single', {'avoidEscape': true}]
58+
'quotes': ['error', 'single', {'avoidEscape': true}],
59+
'@typescript-eslint/naming-convention': [
60+
'error',
61+
{
62+
"selector": "variable",
63+
"format": ["camelCase", "UPPER_CASE"]
64+
},
65+
{
66+
"selector": "parameter",
67+
"format": ["camelCase"],
68+
"leadingUnderscore": "allow"
69+
},
70+
71+
{
72+
"selector": "memberLike",
73+
"format": ["camelCase"]
74+
},
75+
76+
{
77+
"selector": "typeLike",
78+
"format": ["PascalCase"]
79+
},
80+
81+
// Ignore properties that require quotes (HTTP headers, names that include spaces or dashes etc.).
82+
{
83+
"selector": [
84+
"classProperty",
85+
"objectLiteralProperty",
86+
"typeProperty",
87+
"classMethod",
88+
"objectLiteralMethod",
89+
"typeMethod",
90+
"accessor",
91+
"enumMember"
92+
],
93+
"format": null,
94+
"modifiers": ["requiresQuotes"]
95+
},
96+
97+
// Ignore destructured property names.
98+
{
99+
"selector": "variable",
100+
"modifiers": ["destructured"],
101+
"format": null
102+
},
103+
104+
// Following types are temporarily disabled. We shall incrementally enable them in the
105+
// future, fixing any violations as we go.
106+
{
107+
"selector": [
108+
"classProperty",
109+
"objectLiteralProperty",
110+
"typeProperty",
111+
"enumMember"
112+
],
113+
"format": null
114+
}
115+
],
59116
}
60117
};

0 commit comments

Comments
 (0)