You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.
This rule prevents us from providing useless import specifiers when
importing SCSS via the loader:
import useless from './styles.scss';
These modules should only be imported for their side-effects; ie:
import './styles.scss';
As noted in the docs, we might want to lint for other kinds of non-JS
resources in the future, but for now ".scss" is the only file type that
we actually have configured to load via this mechanism.
Test plan: Copy the code over to a liferay-portal repo (eg.
with `cp -R ~/code/eslint-config-liferay/{portal.js,plugins}
node_modules/eslint-config-liferay`) and then introduce a fake error;
see this in the lint run output (`yarn checkFormat`):
modules/apps/frontend-js/frontend-js-components-web/src/main/resources/META-INF/resources/treeview/Treeview.js
24:1 error SCSS resources should be imported only for side-effects liferay-portal/no-loader-import-specifier
Closes: #122
These should only ever be imported for their side-effects:
Never assigned:
The text was updated successfully, but these errors were encountered: