Skip to content

Commit

Permalink
fix: enable array-callback-return
Browse files Browse the repository at this point in the history
  • Loading branch information
steabert committed Apr 4, 2021
1 parent 416d067 commit be477fd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ parserOptions:

rules:
'no-case-declarations': 'off'
'array-callback-return': 'off'
'@typescript-eslint/explicit-function-return-type': 'off'
'@typescript-eslint/no-misused-promises': 'off'
'@typescript-eslint/no-extraneous-class': 'off'
Expand Down
10 changes: 5 additions & 5 deletions lib/components/rtsp-parser/parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('Parsing of interleaved data', () => {
let buffer1: Buffer
beforeAll(() => {
buffer1 = Buffer.alloc(frames.onePointZero.length)
frames.onePointZero.map((byte, index) => {
frames.onePointZero.forEach((byte, index) => {
buffer1[index] = byte
})
})
Expand All @@ -75,7 +75,7 @@ describe('Parsing of interleaved data', () => {
let buffer15: Buffer
beforeAll(() => {
buffer15 = Buffer.alloc(frames.onePointFive.length)
frames.onePointFive.map((byte, index) => {
frames.onePointFive.forEach((byte, index) => {
buffer15[index] = byte
})
})
Expand Down Expand Up @@ -109,11 +109,11 @@ describe('Parsing of interleaved data', () => {
let buffer05: Buffer
beforeAll(() => {
buffer15 = Buffer.alloc(frames.onePointFive.length)
frames.onePointFive.map((byte, index) => {
frames.onePointFive.forEach((byte, index) => {
buffer15[index] = byte
})
buffer05 = Buffer.alloc(frames.zeroPointFive.length)
frames.zeroPointFive.map((byte, index) => {
frames.zeroPointFive.forEach((byte, index) => {
buffer05[index] = byte
})
})
Expand All @@ -137,7 +137,7 @@ describe('Parsing of interleaved data', () => {
let RtspBuffer: Buffer
beforeAll(() => {
RtspBuffer = Buffer.alloc(setupResponse.length)
setupResponse.split('').map((character, index) => {
setupResponse.split('').forEach((character, index) => {
RtspBuffer[index] = character.charCodeAt(0)
})
})
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/protocols/rtsp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ describe('Rtsp', () => {
it('should return the lowest index of all possible line breaks', () => {
const bodyWithLinebreaks = '\r\r<svg>\r\n\r\n</svg>\n\n'
const buf = Buffer.alloc(setupResponse.length + bodyWithLinebreaks.length)
setupResponse.split('').map((character, index) => {
setupResponse.split('').forEach((character, index) => {
buf[index] = character.charCodeAt(0)
})
bodyWithLinebreaks.split('').map((character, index) => {
bodyWithLinebreaks.split('').forEach((character, index) => {
buf[index + setupResponse.length] = character.charCodeAt(0)
})
expect(bodyOffset(buf)).toEqual(setupResponse.length)
Expand Down

0 comments on commit be477fd

Please sign in to comment.