Skip to content

Instantly share code, notes, and snippets.

@tpluscode
Created March 18, 2024 16:59
Show Gist options
  • Select an option

  • Save tpluscode/149377e20f27a47ae0e02fdd453f10a7 to your computer and use it in GitHub Desktop.

Select an option

Save tpluscode/149377e20f27a47ae0e02fdd453f10a7 to your computer and use it in GitHub Desktop.

Revisions

  1. tpluscode created this gist Mar 18, 2024.
    12 changes: 12 additions & 0 deletions .eslintrc.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    {
    "extends": [
    "@open-wc/eslint-config",
    "@tpluscode"
    ],
    "env": {
    "browser": true
    },
    "parserOptions": {
    "project": "./tsconfig.json"
    }
    }
    7 changes: 7 additions & 0 deletions element.ts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    import { LitElement } from 'lit'
    import { property } from 'lit/decorators.js'

    class MyElement extends LitElement {
    @property({ type: String })
    editors!: 'string'
    }
    13 changes: 13 additions & 0 deletions package.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    {
    "name": "no-classfild-shadowing",
    "dependencies": {
    "@open-wc/eslint-config": "^12.0.3",
    "@tpluscode/eslint-config": "^0.4.5",
    "@typescript-eslint/eslint-plugin": "^7.1.0",
    "@typescript-eslint/parser": "^7.1.0",
    "eslint": "^8.57.0",
    "lit": "^2",
    "ts-lit-plugin": "^1.2.1",
    "typescript": "^5.3.3"
    }
    }
    29 changes: 29 additions & 0 deletions tsconfig.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    {
    "compilerOptions": {
    "target": "es2019",
    "module": "ESNext",
    "baseUrl": "./",
    "forceConsistentCasingInFileNames": true,
    "moduleResolution": "Node",
    "declaration": true,
    "declarationMap": true,
    "sourceMap": true,
    "experimentalDecorators": true,
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "strict": true,
    "strictNullChecks": true,
    "noImplicitAny": true,
    "typeRoots": [
    "node_modules/@types",
    "types"
    ],
    "skipLibCheck": true,
    "resolveJsonModule": true,
    "plugins": [
    {
    "name": "ts-lit-plugin"
    }
    ]
    }
    }