thoughtbot / stylelint-config

A shareable stylelint configuration that enforces thoughtbot’s Sass guides.
https://thoughtbot.com
MIT License
9 stars 2 forks source link

`TypeError` raised on new projects #46

Closed stevepolitodesign closed 9 months ago

stevepolitodesign commented 11 months ago

Node Version: v21.4.0 Yarn Version: v1.22.17 NPM Version: 10.2.4


Steps to reproduce:

  1. Run mkdir stylelint && cd stylelint.
  2. Run yarn init and follow prompts.
  3. Run npm init stylelint
  4. Run touch index.css
  5. Run npx stylelint "**/*.css". Note the output:

     index.css
     1:1  ✖  Unexpected empty source  no-empty-source
    
    1 problem (1 error, 0 warnings)
  6. Run yarn add @thoughtbot/stylelint-config --dev
  7. Update .stylelintrc.json.

    { "extends": ["@thoughtbot/stylelint-config"] }
  8. Run npx stylelint "**/*.css". Note the output:

    ❯ npx stylelint "**/*.css"
    TypeError: Cannot read properties of undefined (reading 'rejected')
        at Object.<anonymous> (/Users/polito/Sites/playground/stylelint/node_modules/stylelint-scss/src/rules/comment-no-    empty/index.js:12:42)
        at Module._compile (node:internal/modules/cjs/loader:1376:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
        at Module.load (node:internal/modules/cjs/loader:1207:32)
        at Module._load (node:internal/modules/cjs/loader:1023:12)
        at Module.require (node:internal/modules/cjs/loader:1235:19)
        at require (node:internal/modules/helpers:176:18)
        at Object.<anonymous> (/Users/polito/Sites/playground/stylelint/node_modules/stylelint-scss/src/rules/index.js:31:23)
        at Module._compile (node:internal/modules/cjs/loader:1376:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
nickcharlton commented 9 months ago

@stevepolitodesign, could you give v4.0.0 a go when you get a chance? I've updated a lot this project over the last few days which should mean it's working again well.

stevepolitodesign commented 9 months ago

@nickcharlton just tested again, and everything works as expected!