ESLint:修订间差异
来自康健生活
| 第40行: | 第40行: | ||
eslint --init</syntaxhighlight> | eslint --init</syntaxhighlight> | ||
== 命令 == | == 命令 == | ||
初始化和生成.eslintrc.* | 初始化和生成.eslintrc.*文件。 | ||
<syntaxhighlight lang="bash"> | eslint --init | ||
eslint -- | </syntaxhighlight>|<syntaxhighlight lang="bash"> | ||
You can also run this command directly using 'npm init @eslint/config'. | |||
Need to install the following packages: | |||
@eslint/create-config | |||
Ok to proceed? (y) y | |||
✔ How would you like to use ESLint? · problems | |||
✔ What type of modules does your project use? · esm | |||
✔ Which framework does your project use? · react | |||
✔ Does your project use TypeScript? · No / Yes | |||
✔ Where does your code run? · browser | |||
✔ What format do you want your config file to be in? · YAML | |||
The config that you've selected requires the following dependencies: | |||
eslint-plugin-react@latest | |||
✔ Would you like to install them now with npm? · No / Yes | |||
Installing eslint-plugin-react@latest | |||
Successfully created .eslintrc.yml file in /Users/kangjian/360/medici/client | |||
</syntaxhighlight>|➜ client git:(master_sketch_version) ✗}} | |||
执行检查命令 | 执行检查命令 | ||