chore: Lint shared directory

This commit is contained in:
Tom Moor
2020-06-22 21:29:21 -07:00
parent 26f6961c82
commit 9be5597f4b
27 changed files with 342 additions and 341 deletions

View File

@ -1,8 +1,8 @@
// @flow
import slugify from 'slugify';
import slugify from "slugify";
// Slugify, escape, and remove periods from headings so that they are
// compatible with url hashes AND dom selectors
export default function safeSlugify(text: string) {
return `h-${escape(slugify(text, { lower: true }).replace('.', '-'))}`;
return `h-${escape(slugify(text, { lower: true }).replace(".", "-"))}`;
}