Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update ESLint and @typescript-eslint dependencies #1540

Merged
merged 2 commits into from
Jan 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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