thepassle / eslint-plugin-barrel-files

MIT License
118 stars 10 forks source link

Error with scss files #17

Open david-gomey opened 1 week ago

david-gomey commented 1 week ago

After adding the rule barrel-files/avoid-importing-barrel-files eslint is returning an error with scss files:

Screenshot 2024-11-05 at 08 25 32

Our configuration for that rule is:

'barrel-files/avoid-importing-barrel-files': [
      2,
      {
        maxModuleGraphSizeAllowed: 40,
        amountOfExportsToConsiderModuleAsBarrel: 5,
        exportConditions: ['node', 'import'],
        mainFields: ['module', 'main', 'browser'],
        extensions: ['.js', '.ts', '.d.ts', '.jsx', '.tsx', '.json'],
        tsconfig: {
          configFile: './tsconfig.json',
          references: [],
        },
        alias: {
          ...
        },
      },
    ],

The import is a relative import from a React component: import './TemplateCard.scss';

We are trying to create a project to reproduce, but it is not failing. Do you have any idea why this might happen?