Skip to content

Commit 3206c33

Browse files
committed
chore: use prettier-config-atomic
1 parent 4b720e4 commit 3206c33

File tree

17 files changed

+4886
-2809
lines changed

17 files changed

+4886
-2809
lines changed

.eslintrc.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
{
22
"extends": "eslint-config-atomic",
3-
"ignorePatterns": [
4-
"_site-dev/",
5-
"_site/",
6-
"dist/",
7-
"node_modules/",
8-
"docs/_merged_assets",
9-
"components/type-doc.js"
10-
]
3+
"ignorePatterns": ["_site-dev/", "_site/", "dist/", "node_modules/", "docs/_merged_assets", "components/type-doc.js"]
114
}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ _site-dev
1313
_site
1414
docs/_merged_data/
1515
docs/_merged_assets/
16-
docs/_merged_includes/
16+
docs/_merged_includes/

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ _site
1414
docs/_merged_data/
1515
docs/_merged_assets/
1616
docs/_merged_includes/
17+
docs/_data/api/api.json

api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from 'atom-ide-base';
1+
export * from "atom-ide-base"

components/type-doc.ts

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
1-
import {
2-
LitElement,
3-
css,
4-
customElement,
5-
html,
6-
TemplateResult,
7-
property
8-
} from 'lit-element';
9-
10-
@customElement('type-doc')
1+
import { LitElement, css, customElement, html, TemplateResult, property } from "lit-element"
2+
3+
@customElement("type-doc")
114
export class TypeDoc extends LitElement {
125
static readonly styles = css`
136
:host {
147
position: relative;
158
max-width: 100%;
169
display: grid;
17-
grid-template-areas: 'head' 'body';
10+
grid-template-areas: "head" "body";
1811
grid-template-rows: min-content 1fr;
1912
margin-bottom: 1rem;
2013
}
@@ -56,7 +49,7 @@ export class TypeDoc extends LitElement {
5649
}
5750
5851
type-doc:not([data-inherited-from]) [slot="type"]::before {
59-
content: 'type: ';
52+
content: "type: ";
6053
}
6154
6255
#inheritance {
@@ -142,15 +135,15 @@ export class TypeDoc extends LitElement {
142135
overflow: auto;
143136
}
144137
}
145-
`;
138+
`
146139

147-
declare shadowRoot: ShadowRoot;
140+
declare shadowRoot: ShadowRoot
148141

149-
@property({ type: Boolean, reflect: true }) expanded = false;
142+
@property({ type: Boolean, reflect: true }) expanded = false
150143

151144
render(): TemplateResult {
152-
const isInherited = this.hasAttribute('data-inherited-from');
153-
const { expanded } = this;
145+
const isInherited = this.hasAttribute("data-inherited-from")
146+
const { expanded } = this
154147
return html`
155148
<header>
156149
<span aria-hidden="true" @click="${this.toggleInherited}" @slotchange="${this.cloneHeading}">
@@ -161,38 +154,46 @@ export class TypeDoc extends LitElement {
161154
<slot name="type"></slot>
162155
<span id="inheritance" ?hidden="${!isInherited}">
163156
<slot name="inheritance"></slot>
164-
<button id="toggle"
165-
aria-label="Toggle details"
166-
aria-expanded="${expanded}"
167-
aria-controls="body"
168-
@click="${this.toggleInherited}">
157+
<button
158+
id="toggle"
159+
aria-label="Toggle details"
160+
aria-expanded="${expanded}"
161+
aria-controls="body"
162+
@click="${this.toggleInherited}"
163+
>
169164
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
170-
<path d="M0 0h24v24H0z" fill="none"/>
171-
<path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z" fill="currentColor"/>
165+
<path d="M0 0h24v24H0z" fill="none" />
166+
<path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z" fill="currentColor" />
172167
</svg>
173168
</button>
174169
</span>
175170
</header>
176171
<article id="body" ?hidden="${isInherited && !expanded}">
177172
<slot></slot>
178173
</article>
179-
`;
174+
`
180175
}
181176

182177
firstUpdated() {
183-
this.cloneHeading();
178+
this.cloneHeading()
184179
}
185180

186181
private cloneHeading() {
187-
const hidden = this.shadowRoot.querySelector(".visually-hidden");
188-
if (!hidden) {return;}
189-
for (const child of Array.from(hidden.children)) {child.remove();}
190-
const heading = this.querySelector('[slot="name"]');
191-
if (!heading) {return;}
192-
hidden.append(heading.cloneNode(true));
182+
const hidden = this.shadowRoot.querySelector(".visually-hidden")
183+
if (!hidden) {
184+
return
185+
}
186+
for (const child of Array.from(hidden.children)) {
187+
child.remove()
188+
}
189+
const heading = this.querySelector('[slot="name"]')
190+
if (!heading) {
191+
return
192+
}
193+
hidden.append(heading.cloneNode(true))
193194
}
194195

195196
private toggleInherited() {
196-
this.expanded = !this.expanded;
197+
this.expanded = !this.expanded
197198
}
198199
}

docs/_assets/api.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
align-items: center;
1717
}
1818

19-
body[layout='layout-api'] #sidebar {
19+
body[layout="layout-api"] #sidebar {
2020
display: block;
2121
}

docs/_assets/type-doc.css

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ type-doc[data-inherited-from] header {
5858
}
5959

6060
type-doc:not([data-inherited-from]) [slot="type"]::before {
61-
content: 'type: ';
61+
content: "type: ";
6262
}
6363

6464
type-doc [slot="attribute"]::before {
65-
content: 'attr: ';
65+
content: "attr: ";
6666
}
6767

6868
type-doc [slot="attribute"]::before,
@@ -87,11 +87,7 @@ type-doc[kind="method"] [slot="name"] {
8787
--mono: 1;
8888

8989
font-family: Recursive, monospace;
90-
font-variation-settings:
91-
"MONO" var(--mono, 1),
92-
"CASL" var(--casl, 0),
93-
"wght" var(--wght, 500),
94-
"slnt" var(--slnt, 0),
90+
font-variation-settings: "MONO" var(--mono, 1), "CASL" var(--casl, 0), "wght" var(--wght, 500), "slnt" var(--slnt, 0),
9591
"CRSV" var(--CRSV, 0.5);
9692
margin: 0;
9793
grid-column: 1 / 2;

docs/_data/api/packages.cjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
const API_REFLECTION = require('./api.json');
1+
const API_REFLECTION = require("./api.json")
22

3-
module.exports = async function() {
3+
module.exports = async function () {
44
const packages = API_REFLECTION.children.reduce((acc, child) => {
5-
const [{fileName}] = child.sources;
5+
const [{ fileName }] = child.sources
66
const [, package] = fileName.match(/^node_modules\/atom-ide-base\/types-packages\/(.*)\.d\.ts$/)
77
return {
88
...acc,
9-
[package]: [...acc[package] ?? [], child],
9+
[package]: [...(acc[package] ?? []), child],
1010
}
11-
}, {});
11+
}, {})
1212

13-
return packages;
14-
};
13+
return packages
14+
}

docs/_data/site.cjs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
module.exports = function () {
22
return {
3-
dir: 'ltr',
4-
lang: 'en',
5-
name: 'Atom Community',
6-
description: 'Atom IDE features',
3+
dir: "ltr",
4+
lang: "en",
5+
name: "Atom Community",
6+
description: "Atom IDE features",
77
socialLinks: [
88
{
9-
name: 'GitHub',
10-
url: 'https://github.com/atom-community',
9+
name: "GitHub",
10+
url: "https://github.com/atom-community",
1111
},
1212
{
13-
name: 'Discord',
14-
url: 'https://discord.gg/R4KV8jTVpS'
15-
}
13+
name: "Discord",
14+
url: "https://discord.gg/R4KV8jTVpS",
15+
},
1616
],
17-
gitSiteUrl: 'https://github.com/atom-community/atom-community.github.io',
18-
gitBranch: 'master',
19-
helpUrl: 'https://github.com/atom-community/atom-community.github.io/issues',
20-
logoAlt: 'Atom Community Logo',
21-
iconColorMaskIcon: '#3f93ce',
22-
iconColorMsapplicationTileColor: '#1d3557',
23-
iconColorThemeColor: '#1d3557',
24-
};
25-
};
17+
gitSiteUrl: "https://github.com/atom-community/atom-community.github.io",
18+
gitBranch: "master",
19+
helpUrl: "https://github.com/atom-community/atom-community.github.io/issues",
20+
logoAlt: "Atom Community Logo",
21+
iconColorMaskIcon: "#3f93ce",
22+
iconColorMsapplicationTileColor: "#1d3557",
23+
iconColorThemeColor: "#1d3557",
24+
}
25+
}

docs/api/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
22
layout: layout-sidebar.njk
33
---
4+
45
# API
56

67
{% for pkg in api.packages %}
7-
[{{pkg[0]}}](./{{pkg[0]}}/)
8+
[{{pkg[0]}}](./{{pkg[0]}}/)
89
{% endfor %}

0 commit comments

Comments
 (0)