windows环境下运行npm run lint显示出错

来源:3-5 -使用eslint检查代码语法错误-提前识别,防患于未然

wangjoe

2023-05-19

  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "lint": "eslint 'src/**/*.+(js|ts|jsx|tsx)'"
  },

cmd或powershell都说’ts’未识别为内部命令,可操作程序或批处理文件。

C:\Users\qiong\Desktop\js\muke\react-ts-demo>npm run lint

> react-ts-demo@0.1.0 lint
> eslint 'src/**/*.+(js|ts|jsx|tsx)'

'ts' is not recognized as an internal or external command,
operable program or batch file.

是不是windows终端和linux/mac语法不同,无法匹配正则?

写回答

1回答

双越

2023-05-19

0
2
wangjoe
非常感谢!
2023-05-20
共2条回复

React18+ Nest.js 全栈开发仿问卷星项目

React18+TS4+Antd5+Next.js13 ,B端+C 端,完整业务

383 学习 · 252 问题

查看课程