Coder Social home page Coder Social logo

stylelint-codeframe-formatter's People

Contributors

a20185 avatar bencergazda avatar elektronik2k5 avatar ybiquitous avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

stylelint-codeframe-formatter's Issues

Fails to show codeframe on CSS syntax error

If a JS style comment (// a comment) is present in a CSS file, a codeframe ins't printed.

Such comments may appear in CSS-in-JS codebases. Regardless of this specific use case, CSS is forward comatible and simply ignores syntax which it doesn't recognize. So should the formatter.

Fixed by #13.

Bug: error call stack isn't shown when stylelint's parser fails

Hello and thanks for this module!

I found out that if stylelint fails to parse the linted file, the error isn't displayed. Here's the default formatter:

backoffice/src/App.tsx
      ✖  Cannot find module 'babel-preset-react-app' Require stack: -           MODULE_NOT_FOUND
         /some/path/backoffice/node_modules/@babel/core/lib/config/files/plugins.js -                   
         /some/path/backoffice/node_modules/@babel/core/lib/config/files/index.js -                     
         /some/path/backoffice/node_modules/@babel/core/lib/index.js -                                  
         /some/path/backoffice/node_modules/linaria/lib/transform.js -                                  
         /some/path/backoffice/node_modules/linaria/lib/stylelint/preprocessor.js -                     
         /some/path/node_modules/stylelint/lib/augmentConfig.js -                                       
         /some/path/node_modules/stylelint/lib/createStylelint.js -                                     
         /some/path/node_modules/stylelint/lib/printConfig.js -                                         
         /some/path/node_modules/stylelint/lib/cli.js -                                                 
         /some/path/node_modules/stylelint/bin/stylelint.js             

Here's the same with this formatter:

  backoffice/src/index.tsx

  ✖  (MODULE_NOT_FOUND)
   1 | <Entire file contents here>

I've opened a PR to fix it. 😃

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.