Skip to content

Commit 43ae910

Browse files
committed
refactor(lint): replace deprecated code
By using deprecation eslint plugin
1 parent 7d3448d commit 43ae910

File tree

4 files changed

+221
-3
lines changed

4 files changed

+221
-3
lines changed

.eslintrc.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"root": true,
33
"ignorePatterns": ["projects/**/*"],
4+
"plugins": ["deprecation"],
45
"overrides": [
56
{
67
"files": ["*.ts"],
@@ -22,5 +23,8 @@
2223
"extends": ["plugin:@angular-eslint/template/recommended"],
2324
"rules": {}
2425
}
25-
]
26+
],
27+
"rules": {
28+
"deprecation/deprecation": "warn"
29+
}
2630
}

package-lock.json

+210
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"copyfiles": "^2.4.1",
6565
"cz-conventional-changelog": "^3.3.0",
6666
"eslint": "^8.19.0",
67+
"eslint-plugin-deprecation": "^1.3.2",
6768
"eslint-plugin-import": "^2.26.0",
6869
"eslint-plugin-jsdoc": "^39.3.3",
6970
"eslint-plugin-prefer-arrow": "^1.2.3",

projects/ngx-element-boundary/src/lib/element-boundary.service.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
filter,
66
map,
77
shareReplay,
8-
timeoutWith,
8+
timeout,
99
} from 'rxjs/operators';
1010

1111
import { BoundarySharingStrategy } from './boundary-sharing-strategy/boundary-sharing-strategy';
@@ -63,7 +63,10 @@ export class ElementBoundaryService {
6363
),
6464
),
6565
filter(isDefined),
66-
(o$) => (timeoutMs > 0 ? o$.pipe(timeoutWith(timeoutMs, of(null))) : o$),
66+
(o$) =>
67+
timeoutMs > 0
68+
? o$.pipe(timeout({ first: timeoutMs, with: () => of(null) }))
69+
: o$,
6770
shareReplay({ bufferSize: 1, refCount: true }),
6871
);
6972
}

0 commit comments

Comments
 (0)