Plugin to prevent import of stylesheets in components.
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-no-style-import
:
$ npm install eslint-plugin-no-style-import --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-no-style-import
globally.
Add no-style-import
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"no-style-import"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"no-style-import/rule-name": 2
}
}