Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stylelint-prettier

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylelint-prettier - npm Package Compare versions

Comparing version 4.0.2 to 4.1.0

5

CHANGELOG.md
# Changelog
## 4.1.0 (2023-11-24)
- Added end indexes for violations - the squiggly line in vscode will now cover more than one character. (#341)
- Do not trigger prettier for .astro files. (#340)
## 4.0.2 (2023-07-27)

@@ -4,0 +9,0 @@

5

package.json
{
"name": "stylelint-prettier",
"version": "4.0.2",
"version": "4.1.0",
"description": "Runs prettier as an stylelint rule",

@@ -44,3 +44,3 @@ "keywords": [

"jest": "^29.6.1",
"jest-preset-stylelint": "^6.1.0",
"jest-preset-stylelint": "^6.3.2",
"postcss": "^8.4.25",

@@ -53,2 +53,3 @@ "postcss-html": "^1.5.0",

"prettier": "^3.0.0",
"prettier-plugin-astro": "^0.12.1",
"prettier-plugin-svelte": "^3.0.0",

@@ -55,0 +56,0 @@ "strip-ansi": "^6.0.0",

@@ -98,2 +98,3 @@ const stylelint = require('stylelint');

'svelte',
'astro',
];

@@ -154,3 +155,3 @@ if (parserBlockList.indexOf(prettierFileInfo.inferredParser) !== -1) {

const report = (message, index) => {
const report = (message, index, endIndex) => {
return stylelint.utils.report({

@@ -162,2 +163,3 @@ ruleName,

index,
endIndex,
});

@@ -219,8 +221,17 @@ };

differences.forEach((difference) => {
const {offset, deleteText = ''} = difference;
switch (difference.operation) {
case INSERT:
report(messages.insert(difference.insertText), difference.offset);
report(
messages.insert(difference.insertText),
offset,
offset + deleteText.length
);
break;
case DELETE:
report(messages.delete(difference.deleteText), difference.offset);
report(
messages.delete(difference.deleteText),
difference.offset,
offset + deleteText.length
);
break;

@@ -230,3 +241,4 @@ case REPLACE:

messages.replace(difference.deleteText, difference.insertText),
difference.offset
difference.offset,
offset + deleteText.length
);

@@ -233,0 +245,0 @@ break;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc