Skip to content

Commit

Permalink
chore: Update ESLint and @typescript-eslint dependencies (#1540)
Browse files Browse the repository at this point in the history
* Update ESLint and @typescript-eslint dependencies

* Replace Function with a signature
  • Loading branch information
lahirumaramba authored Jan 13, 2022
1 parent 2585797 commit db137e9
Show file tree
Hide file tree
Showing 29 changed files with 941 additions and 1,251 deletions.
61 changes: 59 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ module.exports = {
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
Expand All @@ -33,6 +32,7 @@ module.exports = {
// Disabled checks
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/no-var-requires': 0,

// Required checks
'indent': ['error', 2],
Expand All @@ -55,6 +55,63 @@ module.exports = {
],
'no-unused-vars': 'off', // Must be disabled to enable the next rule
'@typescript-eslint/no-unused-vars': ['error'],
'quotes': ['error', 'single', {'avoidEscape': true}]
'quotes': ['error', 'single', {'avoidEscape': true}],
'@typescript-eslint/naming-convention': [
'error',
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE"]
},
{
"selector": "parameter",
"format": ["camelCase"],
"leadingUnderscore": "allow"
},

{
"selector": "memberLike",
"format": ["camelCase"]
},

{
"selector": "typeLike",
"format": ["PascalCase"]
},

// Ignore properties that require quotes (HTTP headers, names that include spaces or dashes etc.).
{
"selector": [
"classProperty",
"objectLiteralProperty",
"typeProperty",
"classMethod",
"objectLiteralMethod",
"typeMethod",
"accessor",
"enumMember"
],
"format": null,
"modifiers": ["requiresQuotes"]
},

// Ignore destructured property names.
{
"selector": "variable",
"modifiers": ["destructured"],
"format": null
},

// Following types are temporarily disabled. We shall incrementally enable them in the
// future, fixing any violations as we go.
{
"selector": [
"classProperty",
"objectLiteralProperty",
"typeProperty",
"enumMember"
],
"format": null
}
],
}
};
Loading

0 comments on commit db137e9

Please sign in to comment.