Created
May 19, 2022 08:34
-
-
Save 0x962/0929763e3b3e47c8900c4431133d219d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
root: true, | |
env: { | |
node: true | |
}, | |
extends: [ | |
"eslint:recommended", | |
"plugin:@typescript-eslint/recommended", | |
"@vue/typescript/recommended", | |
"prettier/@typescript-eslint", | |
"plugin:prettier/recommended", | |
], | |
parserOptions: { | |
parser: "@typescript-eslint/parser", | |
project: ["tsconfig.json"], | |
ecmaVersion: 2020, | |
}, | |
rules: { | |
"prettier/prettier": "error", | |
"no-console": ["error", { allow: ["warn", "error"] }], | |
"@typescript-eslint/no-explicit-any": "error", | |
"@typescript-eslint/no-non-null-assertion": "off", | |
"@typescript-eslint/explicit-module-boundary-types": "error", | |
"@typescript-eslint/array-type": ["error", { default: "array-simple" }], | |
"@typescript-eslint/no-misused-promises": "error", | |
"@typescript-eslint/no-unused-vars": ["error", { "ignoreRestSiblings": true }], | |
"@typescript-eslint/no-shadow": "error", | |
"@typescript-eslint/naming-convention": [ | |
"error", | |
{ | |
selector: "class", | |
format: ["PascalCase"], | |
}, | |
{ | |
selector: "interface", | |
format: ["PascalCase"], | |
}, | |
{ | |
selector: "typeAlias", | |
format: ["PascalCase"], | |
}, | |
{ | |
selector: "typeMethod", | |
format: ["camelCase"], | |
}, | |
{ | |
selector: "enum", | |
format: ["PascalCase"], | |
}, | |
{ | |
selector: "enumMember", | |
format: ["UPPER_CASE"], | |
}, | |
{ | |
selector: "variable", | |
types: ["boolean", "string", "number", "array"], | |
format: ["UPPER_CASE"], | |
modifiers: ["global", "const"], | |
}, | |
], | |
}, | |
ignorePatterns: ["*.js"], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment