Skip to content

Instantly share code, notes, and snippets.

@brunolm
Last active April 7, 2021 21:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunolm/34f7ecbe6116d284d6e48617ff83371a to your computer and use it in GitHub Desktop.
Save brunolm/34f7ecbe6116d284d6e48617ff83371a to your computer and use it in GitHub Desktop.
.eslintrc (PascalCase for react)
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "^_" }],
"curly": ["error", "all"],
"complexity": ["error", { "max": 10 }],
"no-cond-assign": ["error", "except-parens"],
"newline-before-return": "error",
"no-bitwise": "off",
"prefer-object-spread": "error",
"prefer-template": "error",
"no-return-await": "error",
"no-else-return": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Z]",
"match": false
}
},
{
"selector": "default",
"format": ["camelCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allow"
},
{
"selector": "variable",
"format": ["camelCase", "PascalCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allow"
},
{
"selector": "typeLike",
"format": ["PascalCase"]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment