Skip to content

Commit

Permalink
chore: fix some lint issues (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald committed Dec 15, 2023
1 parent 5ebe876 commit fec7712
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
4 changes: 1 addition & 3 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ config.rules = {
'example/*',
],
}],
'import/extensions': ['error', {
ignore: ['@edx/frontend-platform*'],
}],
'import/extensions': ['error', 'always'],
'import/no-unresolved': ['error', {
ignore: ['@edx/frontend-platform*'],
}],
Expand Down
1 change: 0 additions & 1 deletion src/auth/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ export async function hydrateAuthenticatedUser() {
publish(AUTHENTICATED_USER_CHANGED);
}


/**
* @typedef {import("axios").Axios} HttpClient
*/
Expand Down
4 changes: 2 additions & 2 deletions src/logging/NewRelicLoggingService.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ function sendError(error, customAttributes) {
}

/**
* @param {string} name
* @param {string|number|boolean|null} value
* @param {string} name
* @param {string|number|boolean|null} value
*/
function setCustomAttribute(name, value) {
if (process.env.NODE_ENV === 'development') {
Expand Down
8 changes: 4 additions & 4 deletions src/logging/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ const serviceShape = {
let service = null;

/**
*
* @param {LoggingServiceConstructor} LoggingService
* @param {{config: import('../config').ConfigDocument}} options
* @returns
*
* @param {LoggingServiceConstructor} LoggingService
* @param {{config: import('../config').ConfigDocument}} options
* @returns
*/
export function configure(LoggingService, options) {
PropTypes.checkPropTypes(optionsShape, options, 'property', 'Logging');
Expand Down
2 changes: 1 addition & 1 deletion src/react/AppContext.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import React from 'react';
const AppContext = React.createContext(/** @type {AppContext} */ ({
authenticatedUser: null,
config: {},
locale: ""
locale: '',
}));

export default AppContext;
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export function parseURL(url) {
* @returns {string}
*/
export function getPath(url) {
return new URL(url, window?.location.href ?? "https://example.com")?.pathname || '';
return new URL(url, window?.location.href ?? 'https://example.com')?.pathname || '';
}

/**
Expand Down

0 comments on commit fec7712

Please sign in to comment.