Skip to content

Commit 2a3bba1

Browse files
Fix
1 parent e9ba91c commit 2a3bba1

File tree

7 files changed

+5168
-5783
lines changed

7 files changed

+5168
-5783
lines changed

assembly/eslint.config.mjs

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,43 @@ import { fileURLToPath } from "url";
55

66
const __dirname = path.dirname(fileURLToPath(import.meta.url));
77

8-
export default
9-
tseslint.config(
10-
{
11-
"ignores":["*.mjs"]
12-
},
13-
tseslint.configs.recommendedTypeChecked,
14-
{
15-
languageOptions: {
16-
parserOptions: {
17-
tsconfigRootDir: __dirname,
18-
project: [path.join(__dirname, "tsconfig.json")],
19-
},
8+
export default tseslint.config(
9+
{
10+
ignores: ["*.mjs"],
11+
},
12+
tseslint.configs.recommendedTypeChecked,
13+
{
14+
languageOptions: {
15+
parserOptions: {
16+
tsconfigRootDir: __dirname,
17+
project: [path.join(__dirname, "tsconfig.json")],
2018
},
2119
},
20+
},
2221

23-
{
24-
plugins: {
25-
prettier: prettier,
26-
},
22+
{
23+
plugins: {
24+
prettier: prettier,
2725
},
26+
},
2827

29-
{
30-
rules: {
31-
// Namespaces are quite useful in AssemblyScript
32-
"@typescript-eslint/no-namespace": "off",
28+
{
29+
rules: {
30+
// Namespaces are quite useful in AssemblyScript
31+
"@typescript-eslint/no-namespace": "off",
3332

34-
// There is actually codegen difference here
35-
"@typescript-eslint/no-array-constructor": "off",
33+
// There is actually codegen difference here
34+
"@typescript-eslint/no-array-constructor": "off",
3635

37-
// Sometimes it can't be avoided to add a @ts-ignore
38-
"@typescript-eslint/ban-ts-comment": "off",
36+
// Sometimes it can't be avoided to add a @ts-ignore
37+
"@typescript-eslint/ban-ts-comment": "off",
3938

40-
// Not all types can be omitted in AS yet
41-
"@typescript-eslint/no-inferrable-types": "off",
39+
// Not all types can be omitted in AS yet
40+
"@typescript-eslint/no-inferrable-types": "off",
4241

43-
// The compiler has its own `Function` class for example
44-
"@typescript-eslint/ban-types": "off",
45-
"@typescript-eslint/no-unsafe-call": "off",
46-
},
47-
}
48-
);
42+
// The compiler has its own `Function` class for example
43+
"@typescript-eslint/ban-types": "off",
44+
"@typescript-eslint/no-unsafe-call": "off",
45+
},
46+
},
47+
);

eslint.config.mjs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { baseConfig } from "@schleifner/eslint-config-base/config.mjs";
2-
export default [{
2+
export default [
3+
{
34
ignores: [
4-
'dist/', // exclude specific folder
5-
'**/*.mjs', // exclude all JavaScript files
5+
"dist/", // exclude specific folder
6+
"**/*.mjs", // exclude all JavaScript files
67
],
78
},
8-
...baseConfig];
9+
...baseConfig,
10+
];
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
export default initInstrumenter;
22

33
interface Instrumenter {
4-
allocateUTF8(str: string): number;
5-
_wasm_instrument(
6-
fileName: number,
7-
targetName: number,
8-
reportFunction: number,
9-
sourceMap: number,
10-
expectInfoOutputFilePath: number,
11-
debugInfoOutputFilePath: number,
12-
includes: number,
13-
excludes: number,
14-
skipLib: boolean
15-
): void;
16-
_free(ptr: number): void;
4+
allocateUTF8(str: string): number;
5+
_wasm_instrument(
6+
fileName: number,
7+
targetName: number,
8+
reportFunction: number,
9+
sourceMap: number,
10+
expectInfoOutputFilePath: number,
11+
debugInfoOutputFilePath: number,
12+
includes: number,
13+
excludes: number,
14+
skipLib: boolean
15+
): void;
16+
_free(ptr: number): void;
1717
}
1818

19-
declare function initInstrumenter(initInstrumenter?: {}): Promise<Instrumenter>;
19+
declare function initInstrumenter(initInstrumenter?: {}): Promise;

jest.config.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
const config = {
32
roots: ["tests/ts"],
43
extensionsToTreatAsEsm: [".ts"],
@@ -11,13 +10,12 @@ const config = {
1110
transform: {
1211
"^.+\\.(ts|tsx)?$": ["ts-jest", { useESM: true }],
1312
},
14-
transformIgnorePatterns:['<rootDir>/third_party'],
13+
transformIgnorePatterns: ["<rootDir>/third_party"],
1514
moduleNameMapper: {
1615
"^(\\.{1,2}/.*)\\.js$": "$1",
1716
},
1817
testPathIgnorePatterns: ["/dist/", "/third_party/", "/node_modules/"],
1918
testTimeout: 10000,
20-
2119
};
2220

2321
export default config;

0 commit comments

Comments
 (0)