Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update versions #2317

Merged
merged 13 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .eslintignore

This file was deleted.

53 changes: 0 additions & 53 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/actions/get_test_infos/discover_test_dirs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readFile, readdir } from 'fs/promises';
import { readdir, readFile } from 'fs/promises';
import { join } from 'path';

// Recursively find directories and check for package.json with a test script
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/get_test_infos/get_test_infos.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { discoverTestDirs } from './discover_test_dirs.js';
import { dirToTestInfo, TestInfo } from './dir_to_test_info.js';
import { discoverTestDirs } from './discover_test_dirs.js';

export async function getTestInfos(
dirs: string[],
Expand Down
3 changes: 1 addition & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env bash

npx lint-staged --allow-empty
72 changes: 72 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import eslint from '@eslint/js';
import tseslintParser from '@typescript-eslint/parser';
import prettier from 'eslint-config-prettier';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
tseslint.configs.recommended,
prettier,
{
ignores: [
'docs/**',
'the_azle_book/**',
'tests/property/candid_rpc/**/src/**',
'**/.azle/**',
'**/.dfx/**',
'**/declarations/**',
'**/dfx_generate/**',
'**/dfx_generated/**',
'**/dist/**',
'**/node_modules/**',
'**/run_time_errors/**',
'**/target/**',
'**/webpack.config.js'
]
},
{
files: ['**/*.{js,mjs,cjs,ts}'],
languageOptions: {
parser: tseslintParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
}
},
plugins: {
'simple-import-sort': simpleImportSort
},
rules: {
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': 'error',
'func-style': [
'error',
'declaration',
{ allowArrowFunctions: true }
],
'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',
'@typescript-eslint/explicit-function-return-type': ['error'],
eqeqeq: 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_'
}
],
'@typescript-eslint/ban-ts-comment': 'off',
'prefer-const': 'off', // For azle let is used to indicate mutability not only re-assignability
'no-undef': 'off', // TS compiler handles this for us
'@typescript-eslint/no-explicit-any': 'off' // TODO https://github.com/demergent-labs/azle/issues/1737
}
}
);
1 change: 0 additions & 1 deletion examples/basic_bitcoin/src/bitcoin_wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ async function buildTransaction(
// rebuild the transaction, until the fee is set to the correct amount.
console.info('Building transaction...');
let totalFee = 0n;
// eslint-disable-next-line no-constant-condition
while (true) {
const transaction = buildTransactionWithFee(
ownUtxos,
Expand Down
1 change: 0 additions & 1 deletion examples/bitcoin_psbt/src/bitcoin_wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ async function buildTransaction(
// rebuild the transaction, until the fee is set to the correct amount.
console.info('Building transaction...');
let totalFee = 0n;
// eslint-disable-next-line no-constant-condition
while (true) {
const transaction = buildTransactionWithFee(
ownUtxos,
Expand Down
Loading
Loading