Skip to content

Conversation

chrisb504
Copy link
Owner

No description provided.

const payload = {
email: document.getElementById('email')?.value?.trim(),
username: document.getElementById('username')?.value?.trim(),
firstName: document.getElementById('firstName')?.value?.trim() || null,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected an assignment or function call and instead saw an expression.
Too many errors. (72% scanned).

e.preventDefault();
const payload = {
email: document.getElementById('email')?.value?.trim(),
username: document.getElementById('username')?.value?.trim(),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected ')' and instead saw 'document'.
Expected ':' and instead saw 'value'.
Expected '}' to match '{' from line 30 and instead saw ':'.
Expected an assignment or function call and instead saw an expression.
Expected an identifier and instead saw '.'.
Expected an identifier and instead saw '?'.
Expected an operator and instead saw '.'.
Missing semicolon.
const 'username' is initialized to 'undefined'.

form.addEventListener('submit', async (e) => {
e.preventDefault();
const payload = {
email: document.getElementById('email')?.value?.trim(),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad invocation.
Expected ':' and instead saw 'value'.
Expected '}' to match '{' from line 41 and instead saw 'trim'.
Expected an identifier and instead saw '.'.
Expected an identifier and instead saw '?'.
Expected an operator and instead saw '.'.


form.addEventListener('submit', async (e) => {
e.preventDefault();
const payload = {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

if (!form) return;

form.addEventListener('submit', async (e) => {
e.preventDefault();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
Expected ')' and instead saw ';'.
Expected ')' to match '{' from line 39 and instead saw '.'.
Missing semicolon.

headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
});
const data = await resp.json().catch(() => ({}));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Missing semicolon.

* @returns {Promise<object>} created account detail
*/
async function signup(payload) {
const resp = await fetch(API.accounts.create, {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Missing semicolon.

* @param {{email:string,username:string,firstName?:string,lastName?:string,password:string}} payload
* @returns {Promise<object>} created account detail
*/
async function signup(payload) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected an assignment or function call and instead saw an expression.
Missing semicolon.

* Redirects authenticated users away.
*/
import { API } from '../lib/api.js';
const alertBox = () => document.getElementById('signupAlert');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

* Submits new account details to the API and redirects to login on success.
* Redirects authenticated users away.
*/
import { API } from '../lib/api.js';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').

const payload = {
email: document.getElementById('email')?.value?.trim(),
username: document.getElementById('username')?.value?.trim(),
firstName: document.getElementById('firstName')?.value?.trim() || null,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected an assignment or function call and instead saw an expression.
Too many errors. (72% scanned).

e.preventDefault();
const payload = {
email: document.getElementById('email')?.value?.trim(),
username: document.getElementById('username')?.value?.trim(),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected ')' and instead saw 'document'.
Expected ':' and instead saw 'value'.
Expected '}' to match '{' from line 30 and instead saw ':'.
Expected an assignment or function call and instead saw an expression.
Expected an identifier and instead saw '.'.
Expected an identifier and instead saw '?'.
Expected an operator and instead saw '.'.
Missing semicolon.
const 'username' is initialized to 'undefined'.

form.addEventListener('submit', async (e) => {
e.preventDefault();
const payload = {
email: document.getElementById('email')?.value?.trim(),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad invocation.
Expected ':' and instead saw 'value'.
Expected '}' to match '{' from line 41 and instead saw 'trim'.
Expected an identifier and instead saw '.'.
Expected an identifier and instead saw '?'.
Expected an operator and instead saw '.'.


form.addEventListener('submit', async (e) => {
e.preventDefault();
const payload = {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

if (!form) return;

form.addEventListener('submit', async (e) => {
e.preventDefault();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
Expected ')' and instead saw ';'.
Expected ')' to match '{' from line 39 and instead saw '.'.
Missing semicolon.

headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
});
const data = await resp.json().catch(() => ({}));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Missing semicolon.

* @returns {Promise<object>} created account detail
*/
async function signup(payload) {
const resp = await fetch(API.accounts.create, {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Missing semicolon.

* @param {{email:string,username:string,firstName?:string,lastName?:string,password:string}} payload
* @returns {Promise<object>} created account detail
*/
async function signup(payload) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected an assignment or function call and instead saw an expression.
Missing semicolon.

* Redirects authenticated users away.
*/
import { API } from '../lib/api.js';
const alertBox = () => document.getElementById('signupAlert');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

* Submits new account details to the API and redirects to login on success.
* Redirects authenticated users away.
*/
import { API } from '../lib/api.js';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').

if (toggler && target && !hasBootstrap) {
toggler.addEventListener('click', (e) => {
e.preventDefault();
const isShown = target.classList.contains('show');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

const target = this.querySelector('#navbarSupportedContent');
const hasBootstrap = typeof window !== 'undefined' && window.bootstrap && window.bootstrap.Collapse;
if (toggler && target && !hasBootstrap) {
toggler.addEventListener('click', (e) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

// Otherwise, add a minimal vanilla fallback toggle.
const toggler = this.querySelector('.navbar-toggler');
const target = this.querySelector('#navbarSupportedContent');
const hasBootstrap = typeof window !== 'undefined' && window.bootstrap && window.bootstrap.Collapse;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

// Mobile toggler: if Bootstrap JS is present, let it handle.
// Otherwise, add a minimal vanilla fallback toggle.
const toggler = this.querySelector('.navbar-toggler');
const target = this.querySelector('#navbarSupportedContent');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).


// Mobile toggler: if Bootstrap JS is present, let it handle.
// Otherwise, add a minimal vanilla fallback toggle.
const toggler = this.querySelector('.navbar-toggler');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

/** Wire page once DOM is ready. */
document.addEventListener('DOMContentLoaded', async () => {
// Load current user to determine delete permissions before first render
const token = localStorage.getItem('cbellLoginToken');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
Expected ')' and instead saw 'localStorage'.
Expected ')' to match '{' from line 66 and instead saw 'token'.
Expected an identifier and instead saw '='.
Expected an identifier and instead saw 'const' (a reserved word).

}

/** Wire page once DOM is ready. */
document.addEventListener('DOMContentLoaded', async () => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected '(' and instead saw '{'.

if (postText) postText.value = '';
const counter = document.getElementById('charCount');
if (counter && postText) updateCounter(postText, counter);
await loadFeed();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected an assignment or function call and instead saw an expression.
Missing semicolon.

body: JSON.stringify({ text })
});
if (postText) postText.value = '';
const counter = document.getElementById('charCount');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

await fetchJson(API.posts.create, {
method: 'POST',
headers: authHeaders(),
body: JSON.stringify({ text })
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

@chrisb504 chrisb504 marked this pull request as ready for review September 23, 2025 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant