Skip to content

Commit ba48544

Browse files
committed
chore: disallow using any as type
1 parent c5eb9f4 commit ba48544

File tree

3 files changed

+312
-2
lines changed

3 files changed

+312
-2
lines changed

.eslintrc.cjs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,35 @@ module.exports = {
22
env: {
33
node: true,
44
es2021: true,
5+
jest: true, // Add jest environment for test files
56
},
6-
extends: ['eslint:recommended'],
7+
extends: [
8+
'eslint:recommended',
9+
'plugin:@typescript-eslint/recommended',
10+
'plugin:@typescript-eslint/strict',
11+
],
12+
parser: '@typescript-eslint/parser',
13+
plugins: ['@typescript-eslint'],
714
parserOptions: {
815
ecmaVersion: 'latest',
916
sourceType: 'module',
17+
project: './tsconfig.json',
1018
},
1119
rules: {
1220
'no-console': 'warn',
13-
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
21+
'no-unused-vars': 'off', // Turn off base rule as it can report incorrect errors
22+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
23+
'@typescript-eslint/no-explicit-any': 'error',
24+
'@typescript-eslint/explicit-function-return-type': 'error',
25+
'@typescript-eslint/strict-boolean-expressions': 'error',
1426
},
27+
ignorePatterns: [
28+
'index.js',
29+
'dist/**/*',
30+
'coverage/**/*',
31+
'test/**/*',
32+
'**/*.test.ts',
33+
'vitest.config.ts',
34+
'vitest.visual.config.ts',
35+
],
1536
};

package-lock.json

Lines changed: 287 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
"zapier-platform-core": "16.3.0"
3030
},
3131
"devDependencies": {
32+
"@typescript-eslint/eslint-plugin": "^8.28.0",
33+
"@typescript-eslint/parser": "^8.28.0",
3234
"@vitest/coverage-v8": "^3.0.8",
3335
"eslint": "^8.57.1",
3436
"husky": "^9.1.7",

0 commit comments

Comments
 (0)