Skip to content

Commit

Permalink
Merge pull request #39 from 43081j/nice-comments
Browse files Browse the repository at this point in the history
fix: use lint-friendly comment placeholders
  • Loading branch information
43081j committed Dec 5, 2022
2 parents f404a66 + 5d9b51b commit 38f2663
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-lit",
"version": "1.0.0",
"version": "1.0.1",
"description": "Lit support for PostCSS and related tooling",
"main": "lib/main.js",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions src/test/stringify_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ describe('stringify', () => {
output,
`
css\`
.foo { /*POSTCSS_LIT_0*/color: hotpink; }
.foo { /* POSTCSS_LIT_0 */color: hotpink; }
\`;
`
);
Expand Down Expand Up @@ -164,7 +164,7 @@ describe('stringify', () => {
output,
`
css\`
.foo { /*POSTCSS_LIT_0*/color: hotpink; }
.foo { /* POSTCSS_LIT_0 */color: hotpink; }
\`;
`
);
Expand Down
8 changes: 4 additions & 4 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ export const placeholderMapping: Partial<Record<Position, PlaceholderConfig>> =
{
block: {
create(key) {
return `/*POSTCSS_LIT_${key}*/`;
return `/* POSTCSS_LIT_${key} */`;
},
regex: /\/\*POSTCSS_LIT_(\d+)\*\//
regex: /\/\* POSTCSS_LIT_(\d+)\*\//
},
statement: {
create(key) {
return `/*POSTCSS_LIT_${key}*/`;
return `/* POSTCSS_LIT_${key} */`;
},
regex: /\/\*POSTCSS_LIT_(\d+)\*\//
regex: /\/\* POSTCSS_LIT_(\d+) \*\//
},
property: {
create(key) {
Expand Down

0 comments on commit 38f2663

Please sign in to comment.