1.0.0 • Published 25 days ago

@f1stnpm2/provident-adipisci-nostrum v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
25 days ago

@f1stnpm2/provident-adipisci-nostrum

npm version npm downloads last month

A plugin pack of order-related linting rules for Stylelint. Every rule supports autofixing (stylelint --fix).

Installation

  1. If you haven't, install Stylelint:
npm install stylelint --save-dev
  1. Install @f1stnpm2/provident-adipisci-nostrum:
npm install @f1stnpm2/provident-adipisci-nostrum --save-dev

Usage

Add @f1stnpm2/provident-adipisci-nostrum to your Stylelint config plugins array, then add rules you need to the rules list. All rules from @f1stnpm2/provident-adipisci-nostrum need to be namespaced with order.

{
	"plugins": [
		"@f1stnpm2/provident-adipisci-nostrum"
	],
	"rules": {
		"order/order": [
			"custom-properties",
			"declarations"
		],
		"order/properties-order": [
			"width",
			"height"
		]
	}
}

Rules

Autofixing

Every rule supports autofixing with stylelint --fix. postcss-sorting is used internally for order autofixing.

Automatic sorting has some limitations that are described for every rule, if any. Please, take a look at how comments are handled by postcss-sorting.

CSS-in-JS styles with template interpolation could be ignored by autofixing to avoid style corruption.

Autofixing in Less syntax may work but isn't officially supported.

Example configs

All these configs have properties-order configured with logical properties groups:

Thanks

properties-order and properties-alphabetical-order code and README were based on the declaration-block-properties-order rule which was a core rule prior to Stylelint 8.0.0.

eslintpluginavastreamspropertiesqueuecodesmakeiterationmacosplugincolumnsRegExp.prototype.flagsHyBibyteLengthwritableinternal slotTypeScriptprotodescriptorajaxrmdragtacitsequenceuser-streamsstylesES2021validsetPrototypeOfformatflat@@toStringTagxhrjson-schemavariables in cssESnexthigher-orderfindLastIndexestreeisutilitiestaskhelperstraverseURLSearchParamsfullwidthsetImmediatevalidationvaluekoreanlook-updependency managerfunctionjoiastscheme-validationconfigsharedarraybufferjsonwalkingfindLaststringifysearchfolderES7react animationpatchrfc4122ES2016starteremitTypeBoxcollectionimmertestingdomexit-codefast-copygetPrototypeOfframerwordwrapfile systembrowserpoint-freechaidatastructureutilspreserve-symlinksvarboundwarningArray.prototype.flatMapdefinePropertyfindupflatMapsetreact-hooksdependenciestrimRightcirculararraybuffernested cssObject.definePropertydiffoptionsymlinksECMAScript 2022breakrequesttypeframeworkreadablemimeWebSocket.envcharactermodulesprogressregexpUint16Arraytoolkitwgetbatchbluebirdreact-hook-formpackagesloadinglanguageMapjQueryentriestoArrayES2022east-asian-widthcore-jsArray.prototype.filterregularargumentbcryptshellpropjasmineECMAScript 5corspostcssString.prototype.matchAllshimdatapreprocessorjson-schema-validationsharedslicecommand-linemapgenericsmkdirpArrayBufferisConcatSpreadableObject.entriesbuffereventDispatcherclassnamedate__proto__pipewaitbddasciiapiweakmapextensionPushReflect.getPrototypeOfequalityUnderscoreiteratenamel10nrm -frclassescomputed-typesmobiletrimEndclientfromsymlinkconcurrencyprototypeconstobjtapcall-boundprefixObject.fromEntriesenderWebSocketsglobECMAScript 2021es2015validatedeterministicpolyfillgetstatuscss variabletermtostringtagworkerspecawesomesaucefilterstylesideworkspace:*deep-copybabelschemeless cssemojiwalkmergephonees-abstractArray.prototype.containsfigletsanitizecensorchecktouchgetintrinsichttpmonoreposerializationenvironmentgroupByBigInt64Arrayargvapollofantasy-landeslintaccessorbootstrap lesshookformtrimLeftlockfileconcatreal-timeCSSStyleDeclarationvalidatorlinewrapArrayBuffer.prototype.sliceparsefsArrayBuffer#slicefastmimetypescolourcurriedless compilerramdadeepjsdomreduceStreampathAsyncIteratoransiinputhashzodtrimStartreadRxArray.prototype.flatrobustjwtstringifieres_.extendserializererrorwordbreak256RFC-6455ES3typanionwhiches8trimhasOwnObject.keysstylingObservablesfullJSON-Schemaconfigurablelastecmascriptopenpostcss-plugingradients cssESform-validationterminalfind-upasynccharactersTypedArraylengthbytefast-clonecjklibphonenumbertypeerrorES6runtimedeletecolorsequalECMAScript 6vestcopyrm -rfpruneprivate datacommandmake dirStyleSheetArray.prototype.includesescaperegexinternalwebfetchdescriptorsArray.prototype.flattenbundlernativeoutputchannelfastcloneartforEachpureWeakSetrangeerrorelectrondeep-clonetestes2017omitgetterdayjstddcolorObject.assignurlUint8ClampedArraymime-dbmetadatapropertyECMAScript 2020jsonschemaassertconcatMapSetaccessibilityinstallerresolveJSONcliremovetslibpackage managerInt8Arraywritees6a11ystringirq0reactmomentInt32Arraydirshebangloggerajvpopmotioninvariantnegative zerofixed-widthes-shimsbrowserlistauthchinesecallbindYAMLstdlibdebugbannerES8formtimenpmjsdiffes-shim APIfunctionalArray.prototype.findLastIndextypesafecolumngroupfast-deep-clonejapaneseuninstallnodejslogbootstrap csssyntaxerrorsometyped arraydataViewbindeslint-pluginpasswordES2015spinnersES2018callbackutilmatchesSymbol.toStringTagpackage.jsonmatchcss lessminimalthreedescriptiones2016arraysinstallStreamsfseventsmovegradients css3classnamesthrottlewidthcloneconnectcryptoquotesham
1.0.0

25 days ago