Giter Site home page Giter Site logo

stylelint-magic-numbers's People

Contributors

dependabot[bot] avatar justthedev avatar orzechowskid avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

stylelint-magic-numbers's Issues

false positive for CSS Grid 'fr' unit

Describe the bug
I am receiving a false positive when linting rules which use the CSS Grid fr unit.

To Reproduce
with the following stylelint config:

{
  "plugins": [
    "stylelint-magic-numbers"
  ],
  "rules": {
    "magic-numbers/magic-numbers": [
      true,
      {
        "acceptedNumbers": [ 0 ],
        "acceptedValues": [ "100%", "1fr" ],
        "severity": "error"
      }
    ]
  }
}

run stylelint against the following css:

.example {
  display: grid;
  grid-template-rows: max-content 1fr max-content;
}

Expected behavior
expected linting to succeed

Error Logs

Desktop (please complete the following information):
node 12.18.3

Additional context

I believe this would be solved by updating valueRegExp here to include fr: https://github.com/JuStTheDev/stylelint-magic-numbers/blob/master/src/index.js#L39

Incompatible with stylelint v16.2.1

Describe the bug
After updating from stylelint 15.11.0 to 16.2.1 i get the following error (see Error Logs).
Switching back and it runs again.

To Reproduce
Already mentioned in description. Try to run with 16.2.1.
Expected behavior
Should work with current stylelint version.

Error Logs

Error: Cannot find module '...\frontend\node_modules\stylelint\lib\utils\isVariable'
    at createEsmNotFoundErr (node:internal/modules/cjs/loader:1181:15)
    at finalizeEsmResolution (node:internal/modules/cjs/loader:1169:15)
    at resolveExports (node:internal/modules/cjs/loader:591:14)
    at Module._findPath (node:internal/modules/cjs/loader:668:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1130:27)
    at Module._load (node:internal/modules/cjs/loader:985:27)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (...\frontend\node_modules\stylelint-magic-numbers\dist\index.js:10:42)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)

Desktop (please complete the following information):

  • OS: Windows
  • Node Version 20.11.0
  • Package Manager npm 10.2.4

Additional context

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.