main
js 46 lines 1.02 KB
Raw
1 'use strict';
2
3 const {esNextPaths} = require('./scripts/shared/pathsByLanguageVersion');
4
5 module.exports = {
6 bracketSpacing: false,
7 singleQuote: true,
8 bracketSameLine: true,
9 trailingComma: 'es5',
10 printWidth: 80,
11 plugins: ['prettier-plugin-hermes-parser'],
12 parser: 'hermes',
13 arrowParens: 'avoid',
14 overrides: [
15 {
16 files: ['*.code-workspace'],
17 options: {
18 parser: 'json-stringify',
19 },
20 },
21 {
22 files: esNextPaths,
23 options: {
24 trailingComma: 'all',
25 },
26 },
27 {
28 files: ['*.ts', '*.tsx'],
29 options: {
30 trailingComma: 'all',
31 parser: 'typescript',
32 },
33 },
34 {
35 // Flow `match` syntax fixtures: prettier's built-in Flow parser cannot
36 // parse the experimental syntax, hermes-parser can.
37 files: [
38 'compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/match-*',
39 ],
40 options: {
41 parser: 'hermes',
42 plugins: ['prettier-plugin-hermes-parser'],
43 },
44 },
45 ],
46 };