Thanks to visit codestin.com
Credit goes to github.com

Skip to content

style: Prefer single quotes #481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"dependencies": {
"prettier": "^3.0.1"
},
"prettier": {
"singleQuote": true
},
"scripts": {
"prettier": "prettier --write docs/ exploration/ spec/"
}
Expand Down
22 changes: 11 additions & 11 deletions spec/data-model/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ A message without _selectors_ and with a single _pattern_ is represented by a `P
type Message = PatternMessage | SelectMessage;

interface PatternMessage {
type: "message";
type: 'message';
declarations: Declaration[];
pattern: Pattern;
}

interface SelectMessage {
type: "select";
type: 'select';
declarations: Declaration[];
selectors: Expression[];
variants: Variant[];
Expand Down Expand Up @@ -66,7 +66,7 @@ interface Variant {
}

interface CatchallKey {
type: "*";
type: '*';
value?: string;
}
```
Expand All @@ -89,12 +89,12 @@ interface Pattern {
}

interface Text {
type: "text";
type: 'text';
value: string;
}

interface Expression {
type: "expression";
type: 'expression';
body: Literal | VariableRef | FunctionRef | Unsupported;
}
```
Expand All @@ -113,12 +113,12 @@ In a `VariableRef`, the `name` does not include the initial `$` of the _variable

```ts
interface Literal {
type: "literal";
type: 'literal';
value: string;
}

interface VariableRef {
type: "variable";
type: 'variable';
name: string;
}
```
Expand All @@ -135,8 +135,8 @@ Each _option_ is represented by an `Option`.

```ts
interface FunctionRef {
type: "function";
kind: "open" | "close" | "value";
type: 'function';
kind: 'open' | 'close' | 'value';
name: string;
operand?: Literal | VariableRef;
options?: Option[];
Expand Down Expand Up @@ -172,8 +172,8 @@ that the implementation attaches to that _annotation_.

```ts
interface Unsupported {
type: "unsupported";
sigil: "!" | "@" | "#" | "%" | "^" | "&" | "*" | "<" | ">" | "/" | "?" | "~";
type: 'unsupported';
sigil: '!' | '@' | '#' | '%' | '^' | '&' | '*' | '<' | '>' | '/' | '?' | '~';
source: string;
operand?: Literal | VariableRef;
}
Expand Down
2 changes: 1 addition & 1 deletion spec/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ An empty string is not a _well-formed_ _message_.
> The same _message_ defined inline in JavaScript:
>
> ```js
> let hello = new MessageFormat("{Hello, world!}");
> let hello = new MessageFormat('{Hello, world!}');
> hello.format();
> ```

Expand Down