Skip to content

Commit c73d159

Browse files
committed
Remove broken support for non-boolean class name bindings
1 parent 80ed399 commit c73d159

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/__tests__/find-properties.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@ describe('findClassNames()', () => {
114114
describe('findClassNameBindings()', () => {
115115
const TESTS = [
116116
['', new Map()],
117-
["classNameBindings: ['foo']", new Map([['foo', ['foo', null]]])],
118-
["classNameBindings: ['fooBar']", new Map([['fooBar', ['foo-bar', null]]])],
119-
["classNameBindings: ['FOO']", new Map([['FOO', ['foo', null]]])],
117+
["classNameBindings: ['foo']", /Unsupported non-boolean `classNameBindings` value: foo/],
118+
["classNameBindings: ['fooBar']", /Unsupported non-boolean `classNameBindings` value: fooBar/],
119+
["classNameBindings: ['FOO']", /Unsupported non-boolean `classNameBindings` value: FOO/],
120120
["classNameBindings: ['foo:bar']", new Map([['foo', ['bar', null]]])],
121121
["classNameBindings: ['foo:bar:baz']", new Map([['foo', ['bar', 'baz']]])],
122122
["classNameBindings: ['foo::baz']", new Map([['foo', [null, 'baz']]])],
123123
[
124-
"classNameBindings: ['foo', 'bar']",
124+
"classNameBindings: ['foo:foo', 'bar:bar']",
125125
new Map([['foo', ['foo', null]], ['bar', ['bar', null]]]),
126126
],
127127
["classNameBindings: ''", /Unexpected `classNameBindings` value: ''/],

lib/transform.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ function findClassNameBindings(properties) {
229229
let parts = binding.split(':');
230230

231231
if (parts.length === 1) {
232-
classNameBindings.set(parts[0], [stringUtils.dasherize(parts[0]), null]);
232+
throw new SilentError(`Unsupported non-boolean \`classNameBindings\` value: ${binding}`);
233233
} else if (parts.length === 2) {
234234
classNameBindings.set(parts[0], [parts[1], null]);
235235
} else if (parts.length === 3) {

0 commit comments

Comments
 (0)