Skip to content

Commit bf4b686

Browse files
committed
feature: @putout/processor-css: use @Stylistic instead of prettier
1 parent 167d567 commit bf4b686

File tree

4 files changed

+18
-15
lines changed

4 files changed

+18
-15
lines changed

packages/processor-css/lib/css.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const lint = async (source, {fix} = {}) => {
2727

2828
return [
2929
alignSpaces(code),
30-
places.filter(cutAlign),
30+
places,
3131
];
3232
};
3333

@@ -40,6 +40,3 @@ const toPlace = ({line, column, rule, text}) => ({
4040
},
4141
});
4242

43-
function cutAlign({message, rule}) {
44-
return !message.startsWith('Delete') || !rule.endsWith('prettier/prettier (stylelint)');
45-
}

packages/processor-css/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,12 @@
2424
"report": "madrun report"
2525
},
2626
"dependencies": {
27+
"@stylistic/stylelint-plugin": "^3.1.2",
2728
"align-spaces": "^2.0.0",
2829
"cosmiconfig": "^9.0.0",
2930
"deepmerge": "^4.2.2",
30-
"prettier": "^3.1.0",
3131
"stylelint": "^16.0.1",
32-
"stylelint-config-standard": "^37.0.0",
33-
"stylelint-prettier": "^5.0.0"
32+
"stylelint-config-standard": "^37.0.0"
3433
},
3534
"keywords": [
3635
"putout",
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
{
22
"extends": ["stylelint-config-standard"],
33
"rules": {
4+
"@stylistic/indentation": 4,
45
"selector-class-pattern": null,
6+
"@stylistic/declaration-block-trailing-semicolon": "always",
7+
"@stylistic/declaration-colon-space-before": null,
8+
"@stylistic/selector-list-comma-newline-after": null,
59
"comment-empty-line-before": null,
10+
"@stylistic/number-leading-zero": null,
11+
"@stylistic/number-no-trailing-zeros": null,
12+
"@stylistic/string-quotes": "single",
613
"function-url-quotes": "never",
14+
"@stylistic/no-eol-whitespace": null,
715
"font-family-name-quotes": "always-unless-keyword",
816
"font-family-no-missing-generic-family-keyword": null,
917
"rule-empty-line-before": null,
18+
"@stylistic/max-empty-lines": 2,
1019
"property-no-vendor-prefix": null,
11-
"selector-no-vendor-prefix": null,
12-
"prettier/prettier": [true, {
13-
"singleQuote": true,
14-
"tabWidth": 4
15-
}]
20+
"selector-no-vendor-prefix": null
1621
},
17-
"plugins": ["stylelint-prettier"]
22+
"plugins": [
23+
"@stylistic/stylelint-plugin"
24+
]
1825
}

packages/processor-css/test/css.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ test('putout: processor: css', async ({process}) => {
1111

1212
test('putout: processor: css: places', async ({comparePlaces}) => {
1313
await comparePlaces('style', [{
14-
message: 'Insert "····"',
14+
message: 'Expected indentation of 8 spaces',
1515
position: {
1616
column: 5,
1717
line: 3,
1818
},
19-
rule: 'prettier/prettier (stylelint)',
19+
rule: '@stylistic/indentation (stylelint)',
2020
}]);
2121
});
2222

0 commit comments

Comments
 (0)