1
0
mirror of https://github.com/flarum/core.git synced 2025-10-13 07:54:25 +02:00

Run prettier for all JS files

This commit is contained in:
Franz Liedke
2020-04-17 11:57:55 +02:00
parent 84cf938379
commit 89ef14faf1
145 changed files with 2374 additions and 2050 deletions

View File

@@ -10,20 +10,20 @@ import NotificationsPage from './components/NotificationsPage';
*
* @param {App} app
*/
export default function(app) {
export default function (app) {
app.routes = {
'index': {path: '/all', component: IndexPage.component()},
'index.filter': {path: '/:filter', component: IndexPage.component()},
index: { path: '/all', component: IndexPage.component() },
'index.filter': { path: '/:filter', component: IndexPage.component() },
'discussion': {path: '/d/:id', component: DiscussionPage.component()},
'discussion.near': {path: '/d/:id/:near', component: DiscussionPage.component()},
discussion: { path: '/d/:id', component: DiscussionPage.component() },
'discussion.near': { path: '/d/:id/:near', component: DiscussionPage.component() },
'user': {path: '/u/:username', component: PostsUserPage.component()},
'user.posts': {path: '/u/:username', component: PostsUserPage.component()},
'user.discussions': {path: '/u/:username/discussions', component: DiscussionsUserPage.component()},
user: { path: '/u/:username', component: PostsUserPage.component() },
'user.posts': { path: '/u/:username', component: PostsUserPage.component() },
'user.discussions': { path: '/u/:username/discussions', component: DiscussionsUserPage.component() },
'settings': {path: '/settings', component: SettingsPage.component()},
'notifications': {path: '/notifications', component: NotificationsPage.component()}
settings: { path: '/settings', component: SettingsPage.component() },
notifications: { path: '/notifications', component: NotificationsPage.component() },
};
/**
@@ -37,7 +37,7 @@ export default function(app) {
const slug = discussion.slug();
return app.route(near && near !== 1 ? 'discussion.near' : 'discussion', {
id: discussion.id() + (slug.trim() ? '-' + slug : ''),
near: near && near !== 1 ? near : undefined
near: near && near !== 1 ? near : undefined,
});
};
@@ -47,7 +47,7 @@ export default function(app) {
* @param {Post} post
* @return {String}
*/
app.route.post = post => {
app.route.post = (post) => {
return app.route.discussion(post.discussion(), post.number());
};
@@ -57,9 +57,9 @@ export default function(app) {
* @param {User} user
* @return {String}
*/
app.route.user = user => {
app.route.user = (user) => {
return app.route('user', {
username: user.username()
username: user.username(),
});
};
}