Skip to content

Commit 75e4f2a

Browse files
committed
Update package.json to includes the latest PrettyCSS library that includes my fix.
1 parent 89d15dd commit 75e4f2a

File tree

5 files changed

+8
-34
lines changed

5 files changed

+8
-34
lines changed

locales/en/translation.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@
123123
"selector-missing": "Start every block of CSS with a selector, such as an element name or class name.\nTry: p {\n color: red;\n}",
124124
"block-expected": "Start a block using { after your selector.\nTry: {{error}} {",
125125
"extra-tokens-after-value": "The {{token}} at the end of this line doesn’t belong there.",
126-
"extra-commas": "Looks like you have extra commas on this line",
127126
"illegal-token-after-combinator": "After a + or > in a selector, you need to specify the name of another element, class, or ID",
128127
"invalid-token": "This line doesn't look like valid CSS.",
129128
"invalid-token-in-selector": "The {{token}} on this line doesn’t belong here.",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"bugs": "https://trello.com/b/ONaFg6wh/popcode",
9898
"license": "MIT",
9999
"dependencies": {
100-
"PrettyCSS": "^0.3.13",
100+
"PrettyCSS": "^0.3.15",
101101
"ajv": "^5.2.2",
102102
"array-to-sentence": "^1.1.0",
103103
"bowser": "^1.4.5",

src/validations/css/prettycss.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,6 @@ const errorMap = {
7171
column: previousLine.length - 1,
7272
};
7373
}
74-
if (errorToken.content === ',') {
75-
if (/,(?=\s*,)/.test(thisLine)) {
76-
return {
77-
reason: 'extra-commas',
78-
row: lineNumber - 1,
79-
column: errorToken.charNum,
80-
};
81-
}
82-
if (
83-
errorToken.charNum - 1 !== /,/.exec(thisLine).index &&
84-
endsWith(trim(thisLine), ';')
85-
) {
86-
return null;
87-
}
88-
}
8974
}
9075

9176
return ({

test/unit/validations/css.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,6 @@ test('missing semicolon at end of block', validationTest(
8787
{reason: 'missing-semicolon', row: 1},
8888
));
8989

90-
test('extra commas in value', validationTest(
91-
`p {
92-
text-shadow: rgba(0,0,0,0.1) 0 -5px,, rgba(0,0,0,0.1) 0 -1px, \
93-
rgba(255,255,255,0.1) 1px 0, rgba(255,255,255,0.1) 0 1px, \
94-
rgba(0,0,0,0.1) -1px -1px, rgba(255,255,255,0.1) 1px 1px;
95-
}`,
96-
css,
97-
{reason: 'extra-commas', row: 1},
98-
));
99-
10090
test('missing semicolon within block', validationTest(
10191
`
10292
p {

yarn.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ JSONStream@^1.0.4:
3030
jsonparse "^1.2.0"
3131
through ">=2.2.7 <3"
3232

33-
PrettyCSS@^0.3.13:
34-
version "0.3.14"
35-
resolved "https://registry.yarnpkg.com/PrettyCSS/-/PrettyCSS-0.3.14.tgz#e71372fac131b7333af4c3f64e356e67551b9ba5"
33+
PrettyCSS@^0.3.15:
34+
version "0.3.15"
35+
resolved "https://registry.yarnpkg.com/PrettyCSS/-/PrettyCSS-0.3.15.tgz#5f7e4690b9957737972b87ce950095a762b085d3"
3636
dependencies:
37-
option-parser "~0.1.3"
37+
option-parser "~1.0.0"
3838

3939
abbrev@1:
4040
version "1.1.0"
@@ -5943,9 +5943,9 @@ optimist@>=0.3.4, optimist@^0.6.1:
59435943
minimist "~0.0.1"
59445944
wordwrap "~0.0.2"
59455945

5946-
option-parser@~0.1.3:
5947-
version "0.1.3"
5948-
resolved "https://registry.yarnpkg.com/option-parser/-/option-parser-0.1.3.tgz#cfe33c0fe95f805d9c0ac79e91224bbfa26a9c17"
5946+
option-parser@~1.0.0:
5947+
version "1.0.0"
5948+
resolved "https://registry.yarnpkg.com/option-parser/-/option-parser-1.0.0.tgz#9d470f969b7cb0cd2bb5b75e998be9961ba57206"
59495949

59505950
optionator@^0.8.1, optionator@^0.8.2:
59515951
version "0.8.2"

0 commit comments

Comments
 (0)