Repository navigation
Expand file tree
/
Copy path.prettierignore
More file actions
35 lines (31 loc) · 1.47 KB
/
Copy path.prettierignore
File metadata and controls
35 lines (31 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/dist
/ts-dist
/src/compiled
/storybook-static
# Ignore all files in the prototypes directory except for stories
# The `*.*` syntax is required so we don't ignore entire directories
# If we ignore directories there's no way to unignore `stories` files in them.
/src/prototypes/**/*.*
!/src/prototypes/**/*.stories.*
# Ignore syntax highlighting examples
/src/vendor/highlight/demo/samples
# Ignore changeset files (these are temporary)
.changeset/*
# Prettier corrupts multi-line `{/* ... */}` comments, which MDX requires for any
# comment at all. It parses the comment body as markdown prose rather than as an
# opaque JSX expression, so the `*` delimiters are rewritten to its `_` emphasis
# marker -- producing `{/_ ... _/}`, which is not valid MDX. Storybook then fails
# to index the file with "Could not parse expression with acorn".
#
# This is not the Prettier 2 limitation it was once assumed to be: Prettier 3 has
# no MDX 3 support either, and the bug is still open upstream.
# @see <https://github.com/prettier/prettier/issues/15163>
# @see <https://github.com/prettier/prettier/issues/12209>
#
# There is no way to opt out per-file. `{/* prettier-ignore */}` is ignored by the
# formatter, and `<!-- prettier-ignore -->` works but is not valid MDX 3 -- the only
# syntax Prettier honours is the one MDX rejects.
#
# Single-line comments format correctly, so this only affects multi-line ones. These
# files were formatted once by hand under Prettier 3 before being re-ignored.
*.mdx