Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

163
Visualizações
Stylelint skips entire folders

I have stylelint installed in my project, and I've configured its configuration. I added a script to run this linter on my src folder.

For some reason, the linter scans only one folder.

Here is my configuration file stylelint.config.js:

module.exports = {
    extends: [
        'stylelint-config-standard-scss',
        'stylelint-config-prettier-scss',
        'stylelint-config-recess-order',
    ],
    plugins: ['stylelint-scss', 'stylelint-order'],
    rules: {
        'selector-class-pattern': [
            '^[a-z][A-Za-z0-9]*((--([a-z][A-Za-z0-9]*)(__([a-z][A-Za-z0-9]*))?)|(__([a-z][A-Za-z0-9]*)(--([a-z][A-Za-z0-9]*))?))?$',
            { resolveNestedSelectors: true, message: 'Expected class selector to be camel case' },
        ],
        'value-no-vendor-prefix': null,
        'selector-id-pattern': null,

        'scss/at-import-partial-extension': null,
    },
};

This is the script: "stylelint": "stylelint --f verbose src/**/*.scss",

My src folder has a lot of .scss files. But this script only scans 2 files for some reason.

$ stylelint --f verbose src/**/*.scss

2 sources checked
 /Users/amir/Desktop/Development/Vinyl projects/LandingPag-REAL/src/styles/custom.scss
 /Users/amir/Desktop/Development/Vinyl projects/LandingPag-REAL/src/styles/variables.scss

0 problems found

✨  Done in 0.79s.

Why would it ignores all other files? I don't have some "ignore" configuration file.

NOTE: It worked on Windows perfect (didn't skip), on Mac it skips almost the entire src file

Also when I change the script to run stylelint ... **/*.scss it does work

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You need to quote your input glob, otherwise the shell (which differs on Windows and Mac) will interpret it rather than Stylelint itself.

If you're only targeting *nix, you can use single quotes:

"stylelint": "stylelint --f verbose 'src/**/*.scss'",

For cross-platform use escaped double quotes:

"stylelint": "stylelint --f verbose \"src/**/*.scss\"",

Incidentally, you:

  • can remove the plugins property as both plugins are bundled in their respective configs
  • should put the prettier config last so that it overrides everything before
{
  "extends": [
    "stylelint-config-standard-scss",
    "stylelint-config-recess-order",
    "stylelint-config-prettier-scss"
  ],
  "rules": {
    "selector-class-pattern": [
      "^[a-z][A-Za-z0-9]*((--([a-z][A-Za-z0-9]*)(__([a-z][A-Za-z0-9]*))?)|(__([a-z][A-Za-z0-9]*)(--([a-z][A-Za-z0-9]*))?))?$",
      {
        "resolveNestedSelectors": true,
        "message": "Expected class selector to be camel case"
      }
    ],
    "value-no-vendor-prefix": null,
    "selector-id-pattern": null,

    "scss/at-import-partial-extension": null
  }
}
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda