1.9.87 • Published 11 months ago

@erboladaiorg/vero-doloribus v1.9.87

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Stylelint Value No Unknown Custom Properties

NPM Version test Discord

Stylelint Value No Unknown Custom Properties is a stylelint rule to disallow usage of unknown custom properties.

Usage

Add stylelint and Stylelint Value No Unknown Custom Properties to your project.

npm install stylelint @erboladaiorg/vero-doloribus --save-dev

Add Stylelint Value No Unknown Custom Properties to your stylelint configuration.

{
  "plugins": [
    "@erboladaiorg/vero-doloribus"
  ],
  "rules": {
    "csstools/value-no-unknown-custom-properties": true || null
  }
}

Options

true

If the first option is true, then Stylelint Value No Unknown Custom Properties requires all custom properties to be known, and the following patterns are not considered violations:

:root {
  --brand-blue: #33f;
}

.example {
  color: var(--brand-blue);
}
.example {
  color: var(--brand-blue);
}

.some-other-class {
  --brand-blue: #33f;
}
:root {
  --brand-blue: #33f;
  --brand-color: var(--brand-blue);
}

While the following patterns are considered violations:

.example {
  color: var(--brand-blue);
}
:root {
  --brand-color: var(--brand-blue);
}

Custom Properties can be imported using the second option.

null

If the first option is null, then Stylelint Value No Unknown Custom Properties does nothing.


importFrom

When the first option is true, then the second option can specify sources where Custom Properties should be imported from by using an importFrom key. These imports might be CSS, JS, and JSON files, functions, and directly passed objects.

The plugin resolves relative paths from the current working directory which may not work in monorepos, in which case it is best to pass only absolute paths to the plugin.

// .stylelintrc
{
  "plugins": [
    "@erboladaiorg/vero-doloribus"
  ],
  "rules": {
    "csstools/value-no-unknown-custom-properties": [true, {
      "importFrom": [
        "path/to/file.css", // => :root { --brand-blue: #33f; }
        "path/to/file.json" // => { "custom-properties": { "--brand-blue": "#33f" } }
      ]
    }]
  }
}

resolver

Use this option to configure how the rule solve paths of @import rules.

// .stylelintrc
{
  "plugins": [
    "@erboladaiorg/vero-doloribus"
  ],
  "rules": {
    "csstools/value-no-unknown-custom-properties": [true, {
      "resolver": {
        "extensions": [".css"], // => default to [".css"]
        "paths": ["./assets/css", "./static/css"], // => paths to look for files, default to []
        "moduleDirectories": ["node_modules"] // => modules folder to look for files, default to ["node_modules"]
      }
    }]
  }
}
arrayfastcloneECMAScript 2017quoterdsdeepcloneArray.prototype.includeses-abstractUnderscoretslibwidthjson-schemaES2017eventsframermergesafeassertsauthenticationWeakSetsnsautoscalingES3toolsless mixinsObject.getPrototypeOfflatlessassertionharmonyincludesreact-hooksECMAScript 2019globalfromObject.valuesdataViewES8operating-systemconsthandlershebangansigenericsequal[[Prototype]]deep-clonesuperstructbusycreate__proto__replaydeepcopynegative zerooptimizervariables in cssspinnerString.prototype.trimsignedwindowenderhigher-ordermapcall-bindArray.prototype.findLastIndexcall-boundkeyastfpsutilitiesmapreduceback-endless.jscolourirquser-streamsfullgroupprefixextraeventDispatcherruntimestartercloudtraildragposestructuredClonenpmignoreoffsetvaluesglaciercoresameValueZerojsonschemaminimalxhrcheckvalidationhookslinuxuploadsetterexecutefluxcommanderredactanimationecmascriptmetadataES6callbackidentifiersworkflowform-validationmonoreposelfjson-schema-validatorpnpm9sequencewriteefficientbootstrap cssdompropECMAScript 2016ieECMAScript 7ArrayBuffer#slicesidelinkECMAScript 2020omitarraybufferschemeasynciscore-jsoptionkeysstylecurriedReflect.getPrototypeOfamazonargvECMAScript 6queueMicrotaskfast-deep-clonepruneECMAScript 2021classnamesignalsponyfillbyteOffsetcomputed-typesshellformatvarsbundlerwarningelectronECMAScript 5bddES2023fast-deep-copytesterregexpReactiveExtensionsgestureslocallivebinObject.entriesArray.prototype.flatMapFunction.prototype.name@@toStringTaguninstall_.extendflagES2015sqsjson-schema-validationECMAScript 2015styled-componentsreadablestreamconcatMapindicatorshimObjectObject.keysfastifyvardayjssymbolsaccessorObject.ishotES2022CSSloggertypeofCSSStyleDeclarationES5ECMAScriptgetOwnPropertyDescriptorconsumetc39bytees8sortgroupBysortedshamfastreact-componentrangeerrorenvsimpledbsettingsRegExp#flagsECMAScript 3execpackage.jsonregular expressionInt16ArrayjssomecurltrimLeftregularpicomatchexitmoveFloat64Arrayairbnbclienttransportzerosharedarraybuffereslint-pluginrouteinternal slot$.extendrequireagentownstringpatchreducergetintrinsiczxstreamsfantasy-landequalityform-0make dirbufferspathgdprmatches
1.9.87

11 months ago

1.9.86

11 months ago

1.9.85

11 months ago

1.9.84

11 months ago

1.8.84

11 months ago

1.8.83

11 months ago

1.7.83

11 months ago

1.7.82

11 months ago

1.7.81

11 months ago

1.7.80

12 months ago

1.7.79

12 months ago

1.7.78

12 months ago

1.7.77

12 months ago

1.7.76

12 months ago

1.7.75

12 months ago

1.7.74

12 months ago

1.7.73

12 months ago

1.7.72

12 months ago

1.7.71

12 months ago

1.7.70

12 months ago

1.7.69

12 months ago

1.7.68

12 months ago

1.6.68

12 months ago

1.6.67

12 months ago

1.6.66

12 months ago

1.5.66

12 months ago

1.5.65

12 months ago

1.5.64

12 months ago

1.5.63

12 months ago

1.5.62

1 year ago

1.5.61

1 year ago

1.5.60

1 year ago

1.5.59

1 year ago

1.5.58

1 year ago

1.5.57

1 year ago

1.5.56

1 year ago

1.5.55

1 year ago

1.5.54

1 year ago

1.5.53

1 year ago

1.5.52

1 year ago

1.5.51

1 year ago

1.5.50

1 year ago

1.5.49

1 year ago

1.5.48

1 year ago

1.5.47

1 year ago

1.5.46

1 year ago

1.5.45

1 year ago

1.5.44

1 year ago

1.5.43

1 year ago

1.5.42

1 year ago

1.5.41

1 year ago

1.5.40

1 year ago

1.5.39

1 year ago

1.5.38

1 year ago

1.5.37

1 year ago

1.5.36

1 year ago

1.4.36

1 year ago

1.4.35

1 year ago

1.4.34

1 year ago

1.4.33

1 year ago

1.4.32

1 year ago

1.4.31

1 year ago

1.4.30

1 year ago

1.4.29

1 year ago

1.4.28

1 year ago

1.4.27

1 year ago

1.4.26

1 year ago

1.4.25

1 year ago

1.4.24

1 year ago

1.4.23

1 year ago

1.4.22

1 year ago

1.3.22

1 year ago

1.3.21

1 year ago

1.3.20

1 year ago

1.3.19

1 year ago

1.3.18

1 year ago

1.3.17

1 year ago

1.3.16

1 year ago

1.3.15

1 year ago

1.3.14

1 year ago

1.3.13

1 year ago

1.3.12

1 year ago

1.3.11

1 year ago

1.2.11

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago