Skip to content

Commit 2d5c61e

Browse files
authored
chore: add explicit member accessibility rule and update dependency versions (#17)
1 parent 8e2c8f0 commit 2d5c61e

File tree

11 files changed

+30
-28
lines changed

11 files changed

+30
-28
lines changed

examples/production/eslint.config.mjs

+8-9
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ import eslint from '@eslint/js'
22
import tseslint from 'typescript-eslint'
33
import globals from 'globals'
44

5-
export default tseslint.config(
6-
{
7-
languageOptions: {
8-
globals: {
9-
...globals.node,
10-
},
5+
export default tseslint.config(eslint.configs.recommended, tseslint.configs.recommended, {
6+
languageOptions: {
7+
globals: {
8+
...globals.node,
119
},
1210
},
13-
eslint.configs.recommended,
14-
tseslint.configs.recommended,
15-
)
11+
rules: {
12+
'@typescript-eslint/explicit-member-accessibility': 'warn',
13+
},
14+
})

examples/production/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
"npm": ">=9.0"
2121
},
2222
"dependencies": {
23-
"@algorandfoundation/algorand-typescript": "^1.0.0-beta.6"
23+
"@algorandfoundation/algorand-typescript": "^1.0.0-beta.16"
2424
},
2525
"devDependencies": {
2626
"@algorandfoundation/algokit-client-generator": "^4.0.6",
27-
"@algorandfoundation/algokit-utils": "^8.0.3",
27+
"@algorandfoundation/algokit-utils": "^8.1.0",
2828
"@algorandfoundation/algokit-utils-debug": "^1.0.3",
29-
"@algorandfoundation/puya-ts": "^1.0.0-beta.10",
29+
"@algorandfoundation/puya-ts": "^1.0.0-beta.23",
3030
"@rollup/plugin-typescript": "^12.1.2",
3131
"@tsconfig/node20": "^20.1.4",
3232
"algosdk": "^3.0.0",
@@ -37,7 +37,7 @@
3737
"typescript-eslint": "^8.19.1",
3838
"prettier": "^3.4.2",
3939
"ts-node-dev": "^2.0.0",
40-
"@algorandfoundation/algorand-typescript-testing": "^1.0.0-beta.8",
40+
"@algorandfoundation/algorand-typescript-testing": "^1.0.0-beta.19",
4141
"vitest": "^2.1.8",
4242
"@vitest/coverage-v8": "^2.1.8",
4343
"typescript": "^5.7.3"

examples/production/smart_contracts/hello_world/contract.algo.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Contract } from '@algorandfoundation/algorand-typescript'
22

33
export class HelloWorld extends Contract {
4-
hello(name: string): string {
4+
public hello(name: string): string {
55
return `${this.getHello()} ${name}`
66
}
77

examples/production/vitest.config.mts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { puyaTsTransformer } from '@algorandfoundation/algorand-typescript-testing/test-transformer'
1+
import { puyaTsTransformer } from '@algorandfoundation/algorand-typescript-testing/vitest-transformer'
22
import typescript from '@rollup/plugin-typescript'
33
import { defineConfig } from 'vitest/config'
44

examples/starter/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
"npm": ">=9.0"
1515
},
1616
"dependencies": {
17-
"@algorandfoundation/algorand-typescript": "^1.0.0-beta.6"
17+
"@algorandfoundation/algorand-typescript": "^1.0.0-beta.16"
1818
},
1919
"devDependencies": {
2020
"@algorandfoundation/algokit-client-generator": "^4.0.6",
21-
"@algorandfoundation/algokit-utils": "^8.0.3",
21+
"@algorandfoundation/algokit-utils": "^8.1.0",
2222
"@algorandfoundation/algokit-utils-debug": "^1.0.3",
23-
"@algorandfoundation/puya-ts": "^1.0.0-beta.10",
23+
"@algorandfoundation/puya-ts": "^1.0.0-beta.23",
2424
"@rollup/plugin-typescript": "^12.1.2",
2525
"@tsconfig/node20": "^20.1.4",
2626
"algosdk": "^3.0.0",

examples/starter/smart_contracts/hello_world/contract.algo.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Contract } from '@algorandfoundation/algorand-typescript'
22

33
export class HelloWorld extends Contract {
4-
hello(name: string): string {
4+
public hello(name: string): string {
55
return `${this.getHello()} ${name}`
66
}
77

template_content/.algokit/generators/create_contract/smart_contracts/{% raw %}{{ contract_name }}{% endraw %}/contract.algo.ts.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Contract } from '@algorandfoundation/algorand-typescript'
22

33
export class {{ contract_name.split('_')|map('capitalize')|join }} extends Contract {
4-
hello(name: string): string {
4+
public hello(name: string): string {
55
return `${this.getHello()} ${name}`
66
}
77

template_content/package.json.jinja

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
"npm": ">=9.0"
2929
},
3030
"dependencies": {
31-
"@algorandfoundation/algorand-typescript": "^1.0.0-beta.6"
31+
"@algorandfoundation/algorand-typescript": "^1.0.0-beta.16"
3232
},
3333
"devDependencies": {
3434
"@algorandfoundation/algokit-client-generator": "^4.0.6",
35-
"@algorandfoundation/algokit-utils": "^8.0.3",
35+
"@algorandfoundation/algokit-utils": "^8.1.0",
3636
"@algorandfoundation/algokit-utils-debug": "^1.0.3",
37-
"@algorandfoundation/puya-ts": "^1.0.0-beta.10",
37+
"@algorandfoundation/puya-ts": "^1.0.0-beta.23",
3838
"@rollup/plugin-typescript": "^12.1.2",
3939
"@tsconfig/node20": "^20.1.4",
4040
"algosdk": "^3.0.0",
@@ -52,7 +52,7 @@
5252
{%- endif %}
5353
"ts-node-dev": "^2.0.0",
5454
{%- if use_vitest %}
55-
"@algorandfoundation/algorand-typescript-testing": "^1.0.0-beta.8",
55+
"@algorandfoundation/algorand-typescript-testing": "^1.0.0-beta.19",
5656
"vitest": "^2.1.8",
5757
"@vitest/coverage-v8": "^2.1.8",
5858
{%- endif %}

template_content/smart_contracts/{{ contract_name }}/contract.algo.ts.jinja

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Contract } from '@algorandfoundation/algorand-typescript'
22

33
export class {{ contract_name.split('_')|map('capitalize')|join }} extends Contract {
4-
hello(name: string): string {
4+
public hello(name: string): string {
55
return `${this.getHello()} ${name}`
66
}
77

template_content/{% if use_linter %}eslint.config.mjs{% endif %}

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ import tseslint from 'typescript-eslint'
33
import globals from 'globals'
44

55
export default tseslint.config(
6+
eslint.configs.recommended,
7+
tseslint.configs.recommended,
68
{
79
languageOptions: {
810
globals: {
911
...globals.node,
1012
},
1113
},
14+
rules: {
15+
'@typescript-eslint/explicit-member-accessibility': 'warn',
16+
},
1217
},
13-
eslint.configs.recommended,
14-
tseslint.configs.recommended,
1518
);

template_content/{% if use_vitest %}vitest.config.mts{% endif %}

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { puyaTsTransformer } from '@algorandfoundation/algorand-typescript-testing/test-transformer'
1+
import { puyaTsTransformer } from '@algorandfoundation/algorand-typescript-testing/vitest-transformer'
22
import typescript from '@rollup/plugin-typescript'
33
import { defineConfig } from 'vitest/config'
44

0 commit comments

Comments
 (0)