@reverecre/eslint-plugin-fontawesome
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -8,3 +8,3 @@ # Ensures Font Awesome icon imports can be tree-shaken (rule-fontawesome-shakeable-imports) | ||
```js | ||
import { faCoffee, faTimes } from '@fontawesome/free-solid-svg-icons'; | ||
import { faCoffee, faTimes } from '@fortawesome/free-solid-svg-icons'; | ||
``` | ||
@@ -15,4 +15,4 @@ | ||
```js | ||
import { faCoffee } from '@fontawesome/free-solid-svg-icons/faCoffee'; | ||
import { faTimes } from '@fontawesome/free-solid-svg-icons/faTimes'; | ||
import { faCoffee } from '@fortawesome/free-solid-svg-icons/faCoffee'; | ||
import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes'; | ||
``` |
@@ -55,5 +55,5 @@ /** | ||
ImportDeclaration(node) { | ||
// The problematic import style is `@fontawesome/free-solid-svg-icons`. | ||
// The problematic import style is `@fortawesome/free-solid-svg-icons`. | ||
// If we're not looking at that exact style import, don't try to lint. | ||
if (node.source.value.match(/^@fontawesome\/[\w-]+-icons$/g)) { | ||
if (node.source.value.match(/^@fortawesome\/[\w-]+-icons$/g)) { | ||
context.report({ | ||
@@ -60,0 +60,0 @@ node, |
{ | ||
"name": "@reverecre/eslint-plugin-fontawesome", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Ensures proper usage of Font Awesome imports", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -24,11 +24,11 @@ /* eslint-disable node/no-unpublished-require */ | ||
parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, | ||
code: `import { faCheckCircle } from '@fontawesome/free-solid-svg-icons/faCheckCircle';`, | ||
code: `import { faCheckCircle } from '@fortawesome/free-solid-svg-icons/faCheckCircle';`, | ||
}, | ||
{ | ||
parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, | ||
code: `import { faTimes } from '@fontawesome/free-solid-svg-icons/faTimes';`, | ||
code: `import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes';`, | ||
}, | ||
{ | ||
parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, | ||
code: `import { faTimesCircle } from '@fontawesome/free-solid-svg-icons/faTimesCircle';`, | ||
code: `import { faTimesCircle } from '@fortawesome/free-solid-svg-icons/faTimesCircle';`, | ||
}, | ||
@@ -40,3 +40,3 @@ ], | ||
parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, | ||
code: `import { faCoffee } from '@fontawesome/free-solid-svg-icons';`, | ||
code: `import { faCoffee } from '@fortawesome/free-solid-svg-icons';`, | ||
errors: [ | ||
@@ -47,3 +47,3 @@ { | ||
{ | ||
output: `import { faCoffee } from '@fontawesome/free-solid-svg-icons/faCoffee';`, | ||
output: `import { faCoffee } from '@fortawesome/free-solid-svg-icons/faCoffee';`, | ||
}, | ||
@@ -56,3 +56,3 @@ ], | ||
parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, | ||
code: `import { faCoffee, faTimes } from '@fontawesome/free-solid-svg-icons';`, | ||
code: `import { faCoffee, faTimes } from '@fortawesome/free-solid-svg-icons';`, | ||
errors: [ | ||
@@ -63,3 +63,3 @@ { | ||
{ | ||
output: `import { faCoffee } from '@fontawesome/free-solid-svg-icons/faCoffee';\nimport { faTimes } from '@fontawesome/free-solid-svg-icons/faTimes';`, | ||
output: `import { faCoffee } from '@fortawesome/free-solid-svg-icons/faCoffee';\nimport { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes';`, | ||
}, | ||
@@ -72,3 +72,3 @@ ], | ||
parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, | ||
code: `import { faCoffee as coffeeIcon } from '@fontawesome/free-solid-svg-icons';`, | ||
code: `import { faCoffee as coffeeIcon } from '@fortawesome/free-solid-svg-icons';`, | ||
errors: [ | ||
@@ -79,3 +79,3 @@ { | ||
{ | ||
output: `import { faCoffee as coffeeIcon } from '@fontawesome/free-solid-svg-icons/faCoffee';`, | ||
output: `import { faCoffee as coffeeIcon } from '@fortawesome/free-solid-svg-icons/faCoffee';`, | ||
}, | ||
@@ -88,3 +88,3 @@ ], | ||
parser: require.resolve('@typescript-eslint/parser'), | ||
code: `import { faCoffee } from '@fontawesome/free-solid-svg-icons';`, | ||
code: `import { faCoffee } from '@fortawesome/free-solid-svg-icons';`, | ||
errors: [ | ||
@@ -95,3 +95,3 @@ { | ||
{ | ||
output: `import { faCoffee } from '@fontawesome/free-solid-svg-icons/faCoffee';`, | ||
output: `import { faCoffee } from '@fortawesome/free-solid-svg-icons/faCoffee';`, | ||
}, | ||
@@ -104,3 +104,3 @@ ], | ||
parser: require.resolve('@typescript-eslint/parser'), | ||
code: `import { faCoffee, faTimes } from '@fontawesome/free-solid-svg-icons';`, | ||
code: `import { faCoffee, faTimes } from '@fortawesome/free-solid-svg-icons';`, | ||
errors: [ | ||
@@ -111,3 +111,3 @@ { | ||
{ | ||
output: `import { faCoffee } from '@fontawesome/free-solid-svg-icons/faCoffee';\nimport { faTimes } from '@fontawesome/free-solid-svg-icons/faTimes';`, | ||
output: `import { faCoffee } from '@fortawesome/free-solid-svg-icons/faCoffee';\nimport { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes';`, | ||
}, | ||
@@ -120,3 +120,3 @@ ], | ||
parser: require.resolve('@typescript-eslint/parser'), | ||
code: `import { faCoffee as coffeeIcon } from '@fontawesome/free-solid-svg-icons';`, | ||
code: `import { faCoffee as coffeeIcon } from '@fortawesome/free-solid-svg-icons';`, | ||
errors: [ | ||
@@ -127,3 +127,3 @@ { | ||
{ | ||
output: `import { faCoffee as coffeeIcon } from '@fontawesome/free-solid-svg-icons/faCoffee';`, | ||
output: `import { faCoffee as coffeeIcon } from '@fortawesome/free-solid-svg-icons/faCoffee';`, | ||
}, | ||
@@ -130,0 +130,0 @@ ], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package