Don't lint ee_component import paths
In https://gitlab.com/gitlab-org/gitlab/-/merge_requests/85948#note_956238056 it was discovered that we don't actually successfully lint these paths anyway. The reason is that it's not a simple resolve alias, which the `import/no-unresolved` ESLint rule relies upon to look up paths. We instead use `NormalModuleReplacementPlugin` to rewrite the path when in FOSS, which that rule does not take into account. This means that, with `FOSS_ONLY=1`, the resolved path of `app/assets/javascripts/vue_shared/components/empty_component.js` is not actually checked. Since webpack will throw at build time if the path doesn't resolve, we're protected from typos, so this edge case isn't that important. Another interesting finding that doesn't quite make sense: `eslint-module-utils`, which `import/no-unresolved` relies on, only added support for `import()` calls in v2.6.1 (see https://github.com/import-js/eslint-plugin-import/pull/2026 and https://github.com/import-js/eslint-plugin-import/blob/main/utils/CHANGELOG.md#v261---2021-05-13). See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/85948 for more discussion about this.
想要评论请 注册 或 登录