GithubHelp home page GithubHelp logo

palantir / stylelint-config-palantir Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 13.0 4.65 MB

Palantir's stylelint config

License: Apache License 2.0

CSS 10.07% JavaScript 67.53% Shell 11.84% SCSS 10.56%
configuration css less linting octo-correct-managed sass stylelint

stylelint-config-palantir's People

Contributors

adidahiya avatar cmslewis avatar dependabot[bot] avatar giladgray avatar llorca avatar lucasray avatar nmiyake avatar pgoldberg avatar rfgamaral avatar styu avatar svc-excavator-bot avatar thelastnode avatar tomshen avatar walkerburgin avatar zoubeiri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stylelint-config-palantir's Issues

fix rule deprecation warnings

Deprecation Warning: 'unit-blacklist' has been deprecated. Instead use 'unit-disallowed-list'. See: https://github.com/stylelint/stylelint/blob/13.7.0/lib/rules/unit-blacklist/README.md

CSS property ordering inconsistent/arbitrary

Opening this issue as a place to discuss CSS property ordering.

Our property ordering is claimed to be loosely based on the "concentric css" model described here: https://rhodesmill.org/brandon/2011/concentric-css/. This model is based on css available in 2011, which was a much different place than where we stand today. The model roughly lays out css in a way that describes the box "from the outside in" (based on the comments noted on the linked page):

  1. how does this box interact with elements around it
  2. visibility of the box
  3. intrinsic height and width definitions outside of the box's content
  4. intrinsic height and width definitions of the content
  5. styles that affect internals of the box (like color)

This model is no longer semantically meaningful with new css patterns, like flex containers. There are a number of flex properties which affect different behaviors of an element. If we want to maintain the rough semantics of "outside in", for example, flex should be defined under 1), since it affects how this element interacts with its parent (how it grows, shrinks, and the effective intrinsic size), but flex-direction should be defined under 5), since it affects how its children are laid out (a style internal to this element). However, it's obviously not ideal to have flex and flex-direction be defined so far apart from one another while reading. Currently, we arbitrarily decide to group all flex properties at the start. Since we're already breaking the semantics defined by the concentric css model, it can be confusing knowing where to find a specific property or type of property.

Additionally, new css properties are constantly being added and supported. CSS grid level 2 is nearly supported, so our property-ordering will need to be updated to support subgrids soon as well. Lack of definition will place the property below all those defined, creating further confusion about where to find a property (you now have to know which properties are defined in our spec).

I propose standardizing on alphabetical ordering, since alphabetization is a property that will be resilient to future CSS spec levels. Modern css specs already largely group rules in a way that consistent with alphabetization (e.g. all flex related rules are prefixed with flex) -- it's only a few old rules that would be negatively affected (like top/right/bottom/left).

no-invalid-position-at-import rule incompatible with @use directive

See stylelint/stylelint#5133 (comment), https://stylelint.io/user-guide/rules/list/no-invalid-position-at-import-rule/

no-invalid-position-at-import rule is now enabled by default, but this doesn't work for Sass files that use the @use syntax unless you configure the following override:

    "no-invalid-position-at-import-rule": [true, {
        "ignoreAtRules": ["use"]
    }],

this should be configured out of the box. maybe stylelint-config-standard-scss does it for us...?

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.