Skip to content

Commit

Permalink
Fix more max-len errors
Browse files Browse the repository at this point in the history
  • Loading branch information
janechu committed May 23, 2024
1 parent aa87162 commit 8ab1ce4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ export const booleanConverter: ValueConverter = {
};

/**
* A {@link ValueConverter} that converts to and from `boolean` values. `null`, `undefined`, `""`, and `void` values are converted to `null`.
* A {@link ValueConverter} that converts to and from `boolean` values. `null`, `undefined`, `""`,
* and `void` values are converted to `null`.
* @public
*/
export const nullableBooleanConverter: ValueConverter = {
Expand Down
3 changes: 2 additions & 1 deletion packages/web-components/fast-element/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ const contextEventType = "context-request";
let requestStrategy: FASTContextRequestStrategy;

/**
* Enables using the {@link https://github.com/webcomponents-cg/community-protocols/blob/main/proposals/context.md | W3C Community Context protocol.}
* Enables using:
* {@link https://github.com/webcomponents-cg/community-protocols/blob/main/proposals/context.md | W3C Community Context protocol.}
* @public
*/
export const Context = Object.freeze({
Expand Down
1 change: 1 addition & 0 deletions packages/web-components/fast-element/src/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const debugMessages = {
[1504 /* cannotAutoregisterDependency */]: "Unable to autoregister dependency.",
[1505 /* cannotResolveKey */]: "Unable to resolve dependency injection key '${key}'.",
[1506 /* cannotConstructNativeFunction */]:
/* eslint-disable-next-line max-len */
"'${name}' is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.",
[1507 /* cannotJITRegisterNonConstructor */]:
"Attempted to jitRegister something that is not a constructor '${value}'. Did you forget to register this dependency?",
Expand Down
6 changes: 4 additions & 2 deletions packages/web-components/fast-element/src/di/di.ts
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,8 @@ export const DI = Object.freeze({
* @returns An array of dependency keys.
*/
getDependencies(Type: Constructable | Injectable): Key[] {
// Note: Every detail of this getDependencies method is pretty deliberate at the moment, and probably not yet 100% tested from every possible angle,
// Note: Every detail of this getDependencies method is pretty deliberate at the moment,
// and probably not yet 100% tested from every possible angle,
// so be careful with making changes here as it can have a huge impact on complex end user apps.
// Preferably, only make changes to the dependency resolution process via a RFC.

Expand Down Expand Up @@ -2156,7 +2157,8 @@ const isNativeFunction = (function () {
i <= 100 &&
// This whole heuristic *could* be tricked by a comment. Do we need to care about that?
sourceText.charCodeAt(i - 1) === 0x7d && // }
// TODO: the spec is a little vague about the precise constraints, so we do need to test this across various browsers to make sure just one whitespace is a safe assumption.
// TODO: the spec is a little vague about the precise constraints,
// so we do need to test this across various browsers to make sure just one whitespace is a safe assumption.
sourceText.charCodeAt(i - 2) <= 0x20 && // whitespace
sourceText.charCodeAt(i - 3) === 0x5d && // ]
sourceText.charCodeAt(i - 4) === 0x65 && // e
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export interface HTMLTemplateCompilationResult<TSource = any, TParent = any> {

// Much thanks to LitHTML for working this out!
const lastAttributeNameRegex =
/* eslint-disable-next-line no-control-regex */
/* eslint-disable-next-line no-control-regex, max-len */
/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;

/**
Expand Down

0 comments on commit 8ab1ce4

Please sign in to comment.