Skip to content

Visualize Your Ideas With Code

2.3 KB
Raw Blame
{
  "env": {
    "browser": true,
    "es2021": true
  },
  "ignorePatterns": [
    "**/*.js",
    "**/*.d.ts",
    "packages/template",
    "packages/create/template-*"
  ],
  "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "ecmaVersion": "latest",
    "sourceType": "module"
  },
  "root": true,
  "plugins": ["@typescript-eslint", "eslint-plugin-tsdoc"],
  "rules": {
    "require-yield": "off",
    "grouped-accessor-pairs": ["error", "getBeforeSet"],
    "eqeqeq": ["error", "always", {"null": "ignore"}],
    "curly": ["error", "multi-line"],
    "@typescript-eslint/explicit-member-accessibility": "error",
    "@typescript-eslint/no-explicit-any": "off",
    "@typescript-eslint/ban-ts-comment": "off",
    "@typescript-eslint/no-non-null-assertion": "off",
    "@typescript-eslint/no-namespace": "off",
    "tsdoc/syntax": "error",
    "@typescript-eslint/no-unused-vars": [
      "error",
      {
        "ignoreRestSiblings": true
      }
    ],
    "@typescript-eslint/naming-convention": [
      "error",
      {
        "selector": "default",
        "format": ["camelCase"],
        "leadingUnderscore": "forbid",
        "trailingUnderscore": "forbid",
        "filter": {
          "regex": "^(__html)$",
          "match": false
        }
      },
      {
        "selector": ["variable", "import"],
        "format": ["camelCase", "PascalCase"]
      },
      {
        "selector": "variable",
        "modifiers": ["global"],
        "format": ["PascalCase", "UPPER_CASE"]
      },
      {
        "selector": "variable",
        "modifiers": ["exported"],
        "format": ["camelCase", "PascalCase"]
      },
      {
        "selector": "variable",
        "modifiers": ["exported", "global"],
        "format": ["camelCase", "PascalCase", "UPPER_CASE"]
      },
      {
        "selector": ["parameter", "variable"],
        "modifiers": ["unused"],
        "format": ["camelCase"],
        "leadingUnderscore": "require"
      },
      {
        "selector": "function",
        "modifiers": ["global"],
        "format": ["camelCase", "PascalCase"]
      },
      {
        "selector": ["typeLike", "enumMember"],
        "format": ["PascalCase"]
      },
      {
        "selector": "typeParameter",
        "format": ["PascalCase"],
        "prefix": ["T"]
      }
    ]
  }
}