Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@reverecre/eslint-plugin-fontawesome

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reverecre/eslint-plugin-fontawesome - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

6

docs/rules/shakeable-imports.md

@@ -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 @@ ],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc