Skip to content

Commit

Permalink
Merge pull request #293 from mlibrary/2024-05-01-updates
Browse files Browse the repository at this point in the history
Updating `eslint` and rebuilding the setup.
  • Loading branch information
erinesullivan authored May 1, 2024
2 parents 0ce0c58 + bb2647d commit f63ad47
Show file tree
Hide file tree
Showing 7 changed files with 160 additions and 1,902 deletions.
19 changes: 0 additions & 19 deletions .eslintrc.json

This file was deleted.

7 changes: 2 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE/dependency_updates_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ Monthly dependency update to help maintain Account.

## NPM
These dependencies have been updated to their latest versions:
- `@eslint/js`
- `esbuild`
- `eslint`
- `eslint-config-standard`
- `eslint-plugin-import`
- `eslint-plugin-node`
- `eslint-plugin-promise`
- `eslint-webpack-plugin`
- `globals`
- `sass`

## Workflows
Expand Down
21 changes: 21 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import globals from "globals";
import pluginJs from "@eslint/js";

export default [
pluginJs.configs.recommended,
{
languageOptions: {
globals: globals.browser
}
},
{
rules: {
"arrow-body-style": ["error", "always"], // Requires {} in arrow function body
"arrow-parens": ["error", "always"], // Requires () around arrow function arguments
"brace-style": ["error", "1tbs"], // Requires one true brace style
"no-empty-function": "error", // Require an empty function to at least have a comment explaining why
"no-var": "error", // Discourages using `var` and recommends using `let` or `const` instead
"semi": ["error", "always"] // Requires a semicolon wherever necessary
}
}
];
4 changes: 2 additions & 2 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
}
event.target.innerHTML = 'Error!';
throw new Error(`Could not cancel request id ${requestID}.`);
}).then((data) => {
}).then(() => {
event.target.innerHTML = 'Canceled!';
event.target.disabled = true;
}).catch((error) => {
Expand Down Expand Up @@ -120,7 +120,7 @@
}
});
});
window.addEventListener('resize', (event) => {
window.addEventListener('resize', () => {
if (
(window.innerWidth <= breakpoint && !getAriaExpanded) ||
(window.innerWidth > breakpoint && getAriaExpanded)
Expand Down
2 changes: 1 addition & 1 deletion js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ let previousFocus = false;
document.addEventListener('keydown', (event) => {
previousFocus = event.shiftKey && event.key === 'Tab';
});
document.addEventListener('focusin', (event) => {
document.addEventListener('focusin', () => {
if (getModal.style.display !== 'none' && !getModal.querySelectorAll(':focus').length) {
previousFocus ? deleteHistoryButton.focus() : closeButton.focus();
}
Expand Down
Loading

0 comments on commit f63ad47

Please sign in to comment.