Skip to content

Commit c1486af

Browse files
committed
Mute lint warning for the old code
1 parent 0c63b2c commit c1486af

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

app/models/attachment.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ export function addModel(dbAdapter) {
453453
const mimeType = mime.lookup(dispositionName) || 'application/octet-stream';
454454

455455
// Old browsers (IE8) need ASCII-only fallback filenames
456+
// eslint-disable-next-line no-control-regex
456457
const fileNameAscii = dispositionName.replace(/[^\x00-\x7F]/g, '_');
457458

458459
// Modern browsers support UTF-8 filenames

app/support/rss-text-parser.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { tokenize } from './tokenize-text';
1010

1111
export function extractTitle(text: string, maxLen: number): string {
1212
// see https://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5B%3AWord_Break%3DNewline%3A%5D&g=&i=
13+
// eslint-disable-next-line no-control-regex
1314
const [line] = text.split(/[\u0000-\u001f\u0085\u2028\u2029]/, 1);
1415

1516
if (line.length <= maxLen) {
@@ -52,6 +53,7 @@ function trimPeriod(text: string) {
5253
export function textToHTML(text: string) {
5354
const lines = text
5455
.trim()
56+
// eslint-disable-next-line no-control-regex
5557
.split(/[\u0000-\u001f\u0085\u2028\u2029]/)
5658
.map((l) => l.trim())
5759
.map((l) => linkify(l));

test/functional/functional_test_helper.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
/* eslint-disable you-dont-need-lodash-underscore/is-undefined */
12
import http from 'http';
23
import { stringify as qsStringify } from 'querystring';
34
import util from 'util';
45
import { readFile } from 'fs/promises';
56
import { basename } from 'path';
67

78
import request from 'superagent';
9+
// eslint-disable-next-line lodash/import-scope
810
import _, { merge } from 'lodash-es';
911
import socketIO from 'socket.io-client';
1012
import expect from 'unexpected';

test/functional/privates.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
/* eslint-disable you-dont-need-lodash-underscore/is-undefined */
12
/* eslint-disable @typescript-eslint/no-unused-expressions */
23
/* global $pg_database */
34
import request from 'superagent';
5+
// eslint-disable-next-line lodash/import-scope
46
import * as _ from 'lodash-es';
57
import expect from 'unexpected';
68

0 commit comments

Comments
 (0)