Skip to content

Instantly share code, notes, and snippets.

@0x962
Created May 19, 2022 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0x962/0929763e3b3e47c8900c4431133d219d to your computer and use it in GitHub Desktop.
Save 0x962/0929763e3b3e47c8900c4431133d219d to your computer and use it in GitHub Desktop.
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