我们可以在 repos 之间共享一个 .eslintignore 文件吗
Can we share an .eslintignore file between repos
我目前有一个共享的 eslint 配置保存在 npm 模块 @my-scope/eslint-config
中。这运行良好,但我希望在该 npm 模块中包含 .eslintignore
文件也能被共享,但它看起来不像是共享的。在项目之间共享此 .eslintignore
文件的最佳方式是什么?
您是否明确地将 .eslintignore 文件添加到 package.json 的文件数组中?
https://docs.npmjs.com/files/package.json#files
您是否尝试过指定指向您的其他 .eslintignore 的 --ignore-path?如此处所述:
http://eslint.org/docs/user-guide/configuring#using-an-alternate-file
我目前有一个共享的 eslint 配置保存在 npm 模块 @my-scope/eslint-config
中。这运行良好,但我希望在该 npm 模块中包含 .eslintignore
文件也能被共享,但它看起来不像是共享的。在项目之间共享此 .eslintignore
文件的最佳方式是什么?
您是否明确地将 .eslintignore 文件添加到 package.json 的文件数组中?
https://docs.npmjs.com/files/package.json#files
您是否尝试过指定指向您的其他 .eslintignore 的 --ignore-path?如此处所述:
http://eslint.org/docs/user-guide/configuring#using-an-alternate-file