Skip to content

Commit

Permalink
add no-param-reassign, prefer-for-of, prefer-arrow-callback, and no-v…
Browse files Browse the repository at this point in the history
…ar rules
  • Loading branch information
bdemann committed Apr 5, 2024
1 parent ca80f52 commit 4998a9b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ module.exports = {
'array-callback-return': 'error',
'no-template-curly-in-string': 'error',
'prefer-template': 'error',
'no-param-reassign': 'error',
'@typescript-eslint/prefer-for-of': 'error',
'prefer-arrow-callback': 'error',
'no-var': 'error',
eqeqeq: 'error',
...temporarilyDisabledRules
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { minimal_dapp } from '../../declarations/minimal_dapp';

document.addEventListener('DOMContentLoaded', async function () {
document.addEventListener('DOMContentLoaded', async () => {
const counter = await minimal_dapp.getCount();
document.getElementById('counter').innerText = `Counter: ${counter}`;
});
Expand Down
4 changes: 1 addition & 3 deletions src/lib/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ if (globalThis._azleInsideCanister) {
instantiatedSource.instance.exports
);

for (let i = 0; i < exportEntries.length; i++) {
const [key, value] = exportEntries[i];

for (const [key, value] of exportEntries) {
if (typeof value === 'function') {
instantiatedSource.instance.exports[key] = value.bind({
instanceUuid: uuid,
Expand Down
4 changes: 1 addition & 3 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ export async function runTests(
tests: Test[],
exitProcess: boolean = true
): Promise<boolean> {
for (let i = 0; i < tests.length; i++) {
const test = tests[i];

for (const test of tests) {
try {
if (test.skip === true) {
console.log(`Skipping: ${test.name}`);
Expand Down

0 comments on commit 4998a9b

Please sign in to comment.