Skip to content

Commit 3e181bc

Browse files
Enforce use of file extensions in imports (#2732)
1 parent 2586ea1 commit 3e181bc

28 files changed

+662
-80
lines changed

.changeset/early-horses-smile.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'lit-html': patch
3+
'@lit/localize-tools': patch
4+
'lit': patch
5+
---
6+
7+
Enforce use of file extensions in imports. Fixes an issue with older TypeScript compilers.

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,4 @@ packages/labs/task/index.*
204204
packages/labs/task/task.*
205205

206206
packages/localize/testdata/
207+
packages/localize/examples/

.eslintignore-sync

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ packages/{*,labs/*}/{.gitignore,.eslintignore}
66

77
[inline]
88
packages/localize/testdata/
9+
packages/localize/examples/

.eslintrc.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@
99
"ecmaVersion": 2020,
1010
"sourceType": "module"
1111
},
12-
"plugins": ["eslint-plugin-no-only-tests", "@typescript-eslint"],
12+
"plugins": [
13+
"eslint-plugin-import",
14+
"eslint-plugin-no-only-tests",
15+
"@typescript-eslint"
16+
],
1317
"env": {
1418
"browser": true
1519
},
1620
"rules": {
21+
"import/extensions": ["error", "always"],
1722
"no-prototype-builtins": "off",
1823
"no-only-tests/no-only-tests": "error",
1924
"@typescript-eslint/ban-types": "off",

0 commit comments

Comments
 (0)