mirror of
https://github.com/HeyPuter/puter.git
synced 2025-02-03 07:48:46 +08:00
chore: Fix a couple of regex related eslint issues
/puter/packages/phoenix/src/puter-shell/providers/ScriptCommandProvider.js 27:38 error Unnecessary escape character: \/ no-useless-escape /puter/packages/phoenix/src/util/wrap-text.js 24:33 error Unexpected control character(s) in regular expression: \x1b no-control-regex
This commit is contained in:
parent
c8a20cadbf
commit
96e9c154bd
@ -24,7 +24,7 @@ export class ScriptCommandProvider {
|
||||
async lookup (id, { ctx }) {
|
||||
const { filesystem } = ctx.platform;
|
||||
|
||||
const is_path = id.match(/^[.\/]/);
|
||||
const is_path = id.match(/^[./]/);
|
||||
if ( ! is_path ) return undefined;
|
||||
|
||||
const absPath = resolveRelativePath(ctx.vars, id);
|
||||
|
@ -16,6 +16,8 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* eslint-disable no-control-regex */
|
||||
|
||||
export function lengthIgnoringEscapes(text) {
|
||||
const escape = '\x1b';
|
||||
// There are a lot of different ones, but we only use graphics-mode ones, so only parse those for now.
|
||||
|
Loading…
Reference in New Issue
Block a user