Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Changed
- Fix `noImplicitAny` TypeScript errors in `x-template.js` (#357).
- Fix `noImplicitAny` TypeScript errors in `x-parser.js` (#357).
- Re-enable strict type errors for `strictNullChecks`,
`useUnknownInCatchVariables`, and `strictFunctionTypes` (#357).
Expand Down
7 changes: 6 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export default [
files: ['x-element.js', 'x-parser.js', 'x-template.js'],
plugins: { jsdoc },
rules: {
// TODO: #357: Replace remaining `any` with precise types or `unknown`.
'jsdoc/reject-any-type': 'off',
'jsdoc/require-param-description': 'off',
'jsdoc/require-property-description': 'off',
'jsdoc/require-returns-description': 'off',
Expand All @@ -36,8 +38,11 @@ export default [
settings: {
jsdoc: {
preferredTypes: [
// TypeScript knows about this, but eslint does not.
// TypeScript knows about these, but eslint does not.
'TemplateStringsArray',
'Iterable',
'NodeListOf',
'ChildNode',
],
},
},
Expand Down
2 changes: 1 addition & 1 deletion types/x-template.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const render: (container: HTMLElement, rawResult: unknown) => void;
export const html: (strings: string[], ...values: unknown[]) => unknown;
export const html: (strings: TemplateStringsArray, ...values: unknown[]) => unknown;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably always should have been this. The only meaningful change is that .raw should be part of this interface. Should be no issue with the current eslint-plugin-x-element module usage — not that that even uses TS.

//# sourceMappingURL=x-template.d.ts.map
2 changes: 1 addition & 1 deletion types/x-template.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading