Ensures proper usage of Font Awesome imports
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install @reverecre/eslint-plugin-fontawesome
:
npm install @reverecre/eslint-plugin-fontawesome --save-dev
Add @reverecre/fontawesome
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["@reverecre/fontawesome"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"@reverecre/fontawesome/shakeable-imports": 2
}
}
Ensures all Font Awesome icon imports can be tree shaken by Next.js.