Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial setup of eslint #706

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
0880985
chore: :memo: add lit element example
kusigit Feb 24, 2023
6537bf2
style: :art: separate config constant
kusigit Feb 24, 2023
65aeacb
chore: :memo: complete example
kusigit Feb 24, 2023
15129b7
fix: :rotating_light: fix codacy warnings
kusigit Feb 24, 2023
9b8f31a
docs: :memo: add and update readme
kusigit Feb 25, 2023
4087f2d
feat:
kusigit Mar 2, 2023
b8ae703
Merge branch 'master' into eslint
kusigit Mar 2, 2023
1ae0fa6
build: :art: initial setup of eslint
kusigit Mar 2, 2023
c8aee46
test: :rotating_light: add test files in linter process
kusigit Mar 2, 2023
41a90d1
test: :white_check_mark: fix some Codacy errors
kusigit Mar 3, 2023
bf569ae
ci: :rotating_light: fix some more Codacy errors
kusigit Mar 3, 2023
8c7d892
ci: :rotating_light: fix last Codacy errors
kusigit Mar 3, 2023
03a3d2d
ci: :rotating_light: do not use undefined as value
kusigit Mar 3, 2023
1a458e8
ci: :rotating_light: ignore all files in the specified folders
kusigit Mar 3, 2023
49a603b
ci: :rotating_light: fix some more linter warnings
kusigit Mar 3, 2023
494289e
ci: :rotating_light: fix Codacy errors
kusigit Mar 3, 2023
41f3965
ci: :rotating_light: fix Codacy errors
kusigit Mar 3, 2023
3e5701c
ci: :rewind: revert changes according review
kusigit Mar 4, 2023
a3a3895
ci: :rotating_light: use the non-null assertion operator to define th…
kusigit Mar 4, 2023
ed2f6bf
ci: :rotating_light: move the non-null assertion to the variable defi…
kusigit Mar 4, 2023
d7887ff
feat: :twisted_rightwards_arrows: fix merge conflicts
kusigit Mar 19, 2023
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
4 changes: 1 addition & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,5 @@
"third_party/**/*",
"webpack.config.js"
],
"rules": {
"@typescript-eslint/no-this-alias": "warn"
}
"rules": {}
}
10 changes: 5 additions & 5 deletions src/camera/core-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ abstract class AbstractCameraCapability<T> implements CameraCapability<T> {
return this.track.applyConstraints(constraints);
}

public value(): T | null {
public value(): T {
const settings = this.track.getSettings() as {[key: string]: T};
const settingValue = settings[this.name as keyof MediaTrackSettings];
return settingValue || null;
return settingValue;
}
}

Expand Down Expand Up @@ -156,7 +156,7 @@ class RenderedCameraImpl implements RenderedCamera {
videoElement.style.display = "block";
videoElement.muted = true;
videoElement.setAttribute("muted", "true");
(<any>videoElement).playsInline = true;
videoElement.playsInline = true;
return videoElement;
}

Expand Down Expand Up @@ -191,7 +191,7 @@ class RenderedCameraImpl implements RenderedCamera {
parentElement, mediaStream, callbacks);
if (options.aspectRatio) {
const aspectRatioConstraint = {
aspectRatio: options.aspectRatio!
aspectRatio: options.aspectRatio
};
await renderedCamera.getFirstTrackOrFail().applyConstraints(
aspectRatioConstraint);
Expand Down Expand Up @@ -270,7 +270,7 @@ class RenderedCameraImpl implements RenderedCamera {
return Promise.resolve();
}

return new Promise((resolve, _) => {
return new Promise((resolve) => {
const tracks = this.mediaStream.getVideoTracks();
const tracksToClose = tracks.length;
let tracksClosed = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/camera/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface CameraCapability<T> {
apply(value: T): Promise<void>;

/** Returns current value of this capability. */
value(): T | null;
value(): T;
}

/** Capability of the camera that has range. */
Expand Down
2 changes: 1 addition & 1 deletion src/camera/retriever.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class CameraRetriever {

private static getCamerasFromMediaStreamTrack()
: Promise<Array<CameraDevice>> {
return new Promise((resolve, _) => {
return new Promise((resolve) => {
const callback = (sourceInfos: Array<any>) => {
const results: Array<CameraDevice> = [];
for (const sourceInfo of sourceInfos) {
Expand Down
Loading