eslint: Replace camelcase rule with naming-convention

This commit is contained in:
willclarktech 2020-07-15 13:23:06 +02:00
parent 55d34d79cf
commit 5e3db6dcfe
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7

View File

@ -33,7 +33,33 @@ module.exports = {
"simple-import-sort/sort": "warn",
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
"@typescript-eslint/await-thenable": "warn",
"@typescript-eslint/camelcase": "off", // deprecated in favour of @typescript-eslint/naming-convention, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/camelcase.md
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
"@typescript-eslint/naming-convention": [
"warn",
{
selector: "default",
format: ["strictCamelCase"],
},
{
selector: "typeLike",
format: ["StrictPascalCase"],
},
{
selector: "enumMember",
format: ["StrictPascalCase"],
},
{
selector: "variable",
format: ["strictCamelCase"],
leadingUnderscore: "allow",
},
{
selector: "parameter",
format: ["strictCamelCase"],
leadingUnderscore: "allow",
},
],
"@typescript-eslint/no-dynamic-delete": "warn",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
@ -59,11 +85,5 @@ module.exports = {
"@typescript-eslint/no-non-null-assertion": "off",
},
},
{
files: "jasmine-testrunner.js",
rules: {
"@typescript-eslint/camelcase": ["error", { properties: "never" }],
},
},
],
};