diff --git a/packages/sdk/.eslintrc.js b/packages/sdk/.eslintrc.js index ffe1188..40c582f 100644 --- a/packages/sdk/.eslintrc.js +++ b/packages/sdk/.eslintrc.js @@ -1,30 +1,30 @@ module.exports = { - parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint'], - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - ], + parser: "@typescript-eslint/parser", + plugins: ["@typescript-eslint"], + extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"], env: { node: true, jest: true, }, rules: { // Allow empty interfaces - '@typescript-eslint/no-empty-interface': 'off', - + "@typescript-eslint/no-empty-interface": "off", + // Allow any type where necessary - '@typescript-eslint/no-explicit-any': 'off', - + "@typescript-eslint/no-explicit-any": "off", + // Warn about unused variables instead of error - '@typescript-eslint/no-unused-vars': ['warn', { - 'argsIgnorePattern': '^_', - 'varsIgnorePattern': '^_', - 'ignoreRestSiblings': true - }], - + "@typescript-eslint/no-unused-vars": [ + "warn", + { + argsIgnorePattern: "^_", + varsIgnorePattern: "^_", + ignoreRestSiblings: true, + }, + ], + // Allow empty object type - '@typescript-eslint/no-empty-object-type': 'off' + "@typescript-eslint/no-empty-object-type": "off", }, - ignorePatterns: ['dist/*', 'node_modules/*'] -}; \ No newline at end of file + ignorePatterns: ["dist/*", "node_modules/*"], +}; diff --git a/packages/sdk/src/classes/metadata.ts b/packages/sdk/src/classes/metadata.ts index 7f435b0..dbfa4f1 100644 --- a/packages/sdk/src/classes/metadata.ts +++ b/packages/sdk/src/classes/metadata.ts @@ -22,4 +22,4 @@ export class Metadata { return new Metadata("", "", "", "", ""); } } -} \ No newline at end of file +} diff --git a/packages/sdk/src/classes/socials.ts b/packages/sdk/src/classes/socials.ts index 294b8eb..e79ab00 100644 --- a/packages/sdk/src/classes/socials.ts +++ b/packages/sdk/src/classes/socials.ts @@ -22,4 +22,4 @@ export class Socials { return new Socials("", "", "", "", ""); } } -} \ No newline at end of file +} diff --git a/packages/sdk/src/index.ts b/packages/sdk/src/index.ts index e60a59d..9c69962 100644 --- a/packages/sdk/src/index.ts +++ b/packages/sdk/src/index.ts @@ -3,4 +3,4 @@ export * from "./provider"; export * from "./bindings"; export * from "./manifests"; export * from "./modules"; -export * from "./classes"; \ No newline at end of file +export * from "./classes"; diff --git a/packages/sdk/src/modules/registry/achievement.ts b/packages/sdk/src/modules/registry/achievement.ts index 1cb8179..9a79ba3 100644 --- a/packages/sdk/src/modules/registry/achievement.ts +++ b/packages/sdk/src/modules/registry/achievement.ts @@ -127,6 +127,5 @@ export const Achievement = { { name: "whitelist_achievement", entrypoint: "whitelist_achievement", description: "Whitelist an achievement." }, { name: "blacklist_achievement", entrypoint: "blacklist_achievement", description: "Blacklist an achievement." }, { name: "remove_achievement", entrypoint: "remove_achievement", description: "Remove an achievement." }, - ] + ], }; - diff --git a/packages/sdk/src/modules/registry/game.ts b/packages/sdk/src/modules/registry/game.ts index 7b3920b..e62393d 100644 --- a/packages/sdk/src/modules/registry/game.ts +++ b/packages/sdk/src/modules/registry/game.ts @@ -155,5 +155,5 @@ export const Game = { { name: "whitelist_game", entrypoint: "whitelist_game", description: "Whitelist a game." }, { name: "blacklist_game", entrypoint: "blacklist_game", description: "Blacklist a game." }, { name: "remove_game", entrypoint: "remove_game", description: "Remove a game." }, - ] + ], }; diff --git a/packages/sdk/src/modules/social/alliance.ts b/packages/sdk/src/modules/social/alliance.ts index 321f9e1..d01aeb5 100644 --- a/packages/sdk/src/modules/social/alliance.ts +++ b/packages/sdk/src/modules/social/alliance.ts @@ -129,6 +129,5 @@ export const Alliance = { { name: "request_alliance", entrypoint: "request_alliance", description: "Request to join an alliance." }, { name: "cancel_alliance", entrypoint: "cancel_alliance", description: "Cancel a request to join an alliance." }, { name: "leave_alliance", entrypoint: "leave_alliance", description: "Leave an alliance." }, - ] + ], }; - diff --git a/packages/sdk/src/modules/social/follow.ts b/packages/sdk/src/modules/social/follow.ts index 27bf9b9..ad49f60 100644 --- a/packages/sdk/src/modules/social/follow.ts +++ b/packages/sdk/src/modules/social/follow.ts @@ -113,5 +113,5 @@ export const Follow = { methods: () => [ { name: "follow", entrypoint: "follow", description: "Follow another player." }, { name: "unfollow", entrypoint: "unfollow", description: "Unfollow a player." }, - ] + ], }; diff --git a/packages/sdk/src/modules/social/guild.ts b/packages/sdk/src/modules/social/guild.ts index 6696ab0..3e7bb0c 100644 --- a/packages/sdk/src/modules/social/guild.ts +++ b/packages/sdk/src/modules/social/guild.ts @@ -128,6 +128,5 @@ export const Guild = { { name: "demote_member", entrypoint: "demote_member", description: "Demote an officer to member." }, { name: "hire_member", entrypoint: "hire_member", description: "Hire a member to the guild." }, { name: "fire_member", entrypoint: "fire_member", description: "Fire a member from the guild." }, - ] + ], }; - diff --git a/packages/sdk/src/modules/social/index.ts b/packages/sdk/src/modules/social/index.ts index 564d24f..da05799 100644 --- a/packages/sdk/src/modules/social/index.ts +++ b/packages/sdk/src/modules/social/index.ts @@ -36,7 +36,13 @@ export const Social = { [Social.address]: { name: "Social", description: "Social contract to manage your social activities", - methods: [...Pin.methods(), ...Follow.methods(), ...Member.methods(), ...Guild.methods(), ...Alliance.methods()], + methods: [ + ...Pin.methods(), + ...Follow.methods(), + ...Member.methods(), + ...Guild.methods(), + ...Alliance.methods(), + ], }, }, }; diff --git a/packages/sdk/src/modules/social/member.ts b/packages/sdk/src/modules/social/member.ts index 8e168a8..25a4ec2 100644 --- a/packages/sdk/src/modules/social/member.ts +++ b/packages/sdk/src/modules/social/member.ts @@ -113,6 +113,5 @@ export const Member = { }; }, - methods: () => [] + methods: () => [], }; - diff --git a/packages/sdk/src/modules/social/pin.ts b/packages/sdk/src/modules/social/pin.ts index 65e09eb..1886a60 100644 --- a/packages/sdk/src/modules/social/pin.ts +++ b/packages/sdk/src/modules/social/pin.ts @@ -113,5 +113,5 @@ export const Pin = { methods: () => [ { name: "pin", entrypoint: "pin", description: "Pin an achievement." }, { name: "unpin", entrypoint: "unpin", description: "Unpin an achievement." }, - ] + ], }; diff --git a/packages/sdk/src/policies/index.ts b/packages/sdk/src/policies/index.ts index 035b395..b436db8 100644 --- a/packages/sdk/src/policies/index.ts +++ b/packages/sdk/src/policies/index.ts @@ -20,8 +20,16 @@ export const policies = { { name: "update_achievement", entrypoint: "update_achievement", description: "Update an achievement." }, { name: "publish_achievement", entrypoint: "publish_achievement", description: "Publish an achievement." }, { name: "hide_achievement", entrypoint: "hide_achievement", description: "Hide an achievement." }, - { name: "whitelist_achievement", entrypoint: "whitelist_achievement", description: "Whitelist an achievement." }, - { name: "blacklist_achievement", entrypoint: "blacklist_achievement", description: "Blacklist an achievement." }, + { + name: "whitelist_achievement", + entrypoint: "whitelist_achievement", + description: "Whitelist an achievement.", + }, + { + name: "blacklist_achievement", + entrypoint: "blacklist_achievement", + description: "Blacklist an achievement.", + }, { name: "remove_achievement", entrypoint: "remove_achievement", description: "Remove an achievement." }, ], }, @@ -48,7 +56,11 @@ export const policies = { { name: "hire_guild", entrypoint: "hire_guild", description: "Hire a guild in the alliance." }, { name: "fire_guild", entrypoint: "fire_guild", description: "Fire a guild from the alliance." }, { name: "request_alliance", entrypoint: "request_alliance", description: "Request to join an alliance." }, - { name: "cancel_alliance", entrypoint: "cancel_alliance", description: "Cancel a request to join an alliance." }, + { + name: "cancel_alliance", + entrypoint: "cancel_alliance", + description: "Cancel a request to join an alliance.", + }, { name: "leave_alliance", entrypoint: "leave_alliance", description: "Leave an alliance." }, { name: "create_guild", entrypoint: "create_guild", description: "Create a guild." }, { name: "open_guild", entrypoint: "open_guild", description: "Open a guild." }, @@ -70,4 +82,4 @@ export const policies = { [constants.StarknetChainId.SN_MAIN]: { contracts: {}, }, -}; \ No newline at end of file +}; diff --git a/packages/sdk/tsconfig.eslint.json b/packages/sdk/tsconfig.eslint.json index 918a722..83dbdaf 100644 --- a/packages/sdk/tsconfig.eslint.json +++ b/packages/sdk/tsconfig.eslint.json @@ -1,19 +1,9 @@ { "extends": "./tsconfig.json", - "include": [ - "src/**/*.ts", - "src/**/*.tsx", - "test/**/*.ts", - "test/**/*.tsx", - "*.js", - "*.ts" - ], - "exclude": [ - "node_modules", - "dist" - ], + "include": ["src/**/*.ts", "src/**/*.tsx", "test/**/*.ts", "test/**/*.tsx", "*.js", "*.ts"], + "exclude": ["node_modules", "dist"], "compilerOptions": { "noEmit": true, "resolveJsonModule": true } -} \ No newline at end of file +}