@7r/eslint-config-7r-building 中文文档教程
eslint-config-building-app
该软件包包括 7r 构建团队使用的可共享 ESLint 配置。
首先,安装这个包、ESLint 和必要的插件。
npm install --save-dev @7r/eslint-config-7r-building babel-eslint@9.x eslint@5.x eslint-config-prettier@3.x eslint-plugin-import@2.x eslint-plugin-jsx-a11y@6.x eslint-plugin-prettier@3.x eslint-plugin-react@7.x prettier@1.x
然后在项目的根文件夹中创建一个名为 .eslintrc
的文件,其中包含以下内容:
{
"extends": "@7r/eslint-config-7r-building"
}
就是这样! 您可以通过编辑 .eslintrc
文件来覆盖 eslint-config-7r-building
中的设置。 在 ESLint 网站上了解有关配置 ESLint 的更多信息。
eslint-config-building-app
This package includes the shareable ESLint configuration used by 7r building team.
First, install this package, ESLint and the necessary plugins.
npm install --save-dev @7r/eslint-config-7r-building babel-eslint@9.x eslint@5.x eslint-config-prettier@3.x eslint-plugin-import@2.x eslint-plugin-jsx-a11y@6.x eslint-plugin-prettier@3.x eslint-plugin-react@7.x prettier@1.x
Then create a file named .eslintrc
with following contents in the root folder of your project:
{
"extends": "@7r/eslint-config-7r-building"
}
That's it! You can override the settings from eslint-config-7r-building
by editing the .eslintrc
file. Learn more about configuring ESLint on the ESLint website.