Skip to content

Commit bbb0fcc

Browse files
authored
Merge pull request #122 from github/lint-import-statements
Lint import statements
2 parents da8678d + c74fa9e commit bbb0fcc

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"extends": ["plugin:github/recommended", "plugin:github/typescript", "plugin:github/browser"],
55
"rules": {
66
"no-invalid-this": "off",
7-
"@typescript-eslint/no-invalid-this": ["error"]
7+
"@typescript-eslint/no-invalid-this": ["error"],
8+
"import/extensions": ["error", "ignorePackages"],
9+
"@typescript-eslint/consistent-type-imports": ["error", {"prefer": "type-imports"}]
810
},
911
"overrides": [
1012
{

src/attr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {CustomElement} from './custom-element'
1+
import type {CustomElement} from './custom-element.js'
22

33
const attrs = new WeakMap<Record<PropertyKey, unknown>, string[]>()
44
type attrValue = string | number | boolean

src/controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {register} from './register.js'
22
import {bind} from './bind.js'
33
import {autoShadowRoot} from './auto-shadow-root.js'
44
import {defineObservedAttributes, initializeAttrs} from './attr.js'
5-
import type {CustomElement} from './custom-element'
5+
import type {CustomElement} from './custom-element.js'
66

77
/**
88
* Controller is a decorator to be used over a class that extends HTMLElement.

src/register.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {CustomElement} from './custom-element'
1+
import type {CustomElement} from './custom-element.js'
22

33
/**
44
* Register the controller as a custom element.

0 commit comments

Comments
 (0)