Skip to content
Merged
24 changes: 22 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,34 @@ module.exports = {
env: {
node: true,
es2021: true,
jest: true, // Add jest environment for test files
},
extends: ['eslint:recommended'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/strict',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
},
rules: {
'no-console': 'warn',
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-unused-vars': 'off', // Turn off base rule as it can report incorrect errors
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
},
ignorePatterns: [
'index.js',
'dist/**/*',
'coverage/**/*',
'test/**/*',
'**/*.test.ts',
'vitest.config.ts',
'vitest.visual.config.ts',
],
};
287 changes: 287 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"zapier-platform-core": "16.3.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^8.28.0",
"@typescript-eslint/parser": "^8.28.0",
"@vitest/coverage-v8": "^3.0.8",
"eslint": "^8.57.1",
"husky": "^9.1.7",
Expand Down
3 changes: 2 additions & 1 deletion src/actions/assign-screen-to-playlist.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ZObject, Bundle } from 'zapier-platform-core';
import utils from '../utils.js';

const assignScreenToPlaylist = {
Expand Down Expand Up @@ -26,7 +27,7 @@ const assignScreenToPlaylist = {
helpText: 'Select the playlist to assign to the screen',
},
],
perform: async (z: any, bundle: any) => {
perform: async (z: ZObject, bundle: Bundle): Promise<object> => {
return await utils.assignPlaylistToScreen(z, bundle, {
screenId: bundle.inputData.screen_id,
playlistId: bundle.inputData.playlist_id,
Expand Down
Loading
Loading