Skip to content

Commit

Permalink
add warn rule for 'any's in client package
Browse files Browse the repository at this point in the history
  • Loading branch information
rikukissa committed Nov 14, 2024
1 parent 0a479af commit da4a0b5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 228 deletions.
1 change: 1 addition & 0 deletions packages/client/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {
},
rules: {
'react-hooks/exhaustive-deps': 'error',
'@typescript-eslint/no-explicit-any': 'warn',
'no-restricted-imports': [
'error',
{
Expand Down
2 changes: 2 additions & 0 deletions packages/client/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ const config: CodegenConfig = {
/*
* DO NOT EDIT! This file is auto-generated by yarn generate-gateway-types - see 'codegen.yml'
*/
/* eslint-disable */
import { PlainDate } from '@client/utils/date-formatting'
`
Expand Down
3 changes: 1 addition & 2 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"open:cov": "yarn test && opener coverage/index.html",
"lint": "yarn lint:css && yarn lint:ts",
"lint:css": "stylelint 'src/**/*.{ts,tsx}'",
"lint:ts": "eslint --fix './src/**/*.{ts,tsx}' --max-warnings=0",
"lint:ts": "eslint --fix './src/**/*.{ts,tsx}' --max-warnings=349",
"test:compilation": "tsc --noEmit",
"extract:translations": "bash extract-translations.sh",
"generate-gateway-types": "NODE_OPTIONS=--dns-result-order=ipv4first graphql-codegen --config codegen.ts && prettier --write src/utils/gateway.ts",
Expand Down Expand Up @@ -162,7 +162,6 @@
"traverse": "^0.6.6",
"ts-node": "^7.0.1",
"typescript": "4.9.5",
"vite-plugin-babel-macros": "^1.0.6",
"vite-plugin-pwa": "^0.20.0",
"vitest": "0.25.5",
"vitest-fetch-mock": "^0.2.1"
Expand Down
2 changes: 2 additions & 0 deletions packages/client/src/utils/gateway-deprecated-do-not-use.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
*/

/* eslint-disable @typescript-eslint/no-explicit-any */

import { GraphQLResolveInfo, GraphQLScalarType } from 'graphql'
/**
* This file is auto-generated by graphql-schema-typescript
Expand Down
2 changes: 2 additions & 0 deletions packages/client/src/utils/gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
/*
* DO NOT EDIT! This file is auto-generated by yarn generate-gateway-types - see 'codegen.yml'
*/

/* eslint-disable */
import { PlainDate } from '@client/utils/date-formatting'

export type Maybe<T> = T | null
Expand Down
Loading

0 comments on commit da4a0b5

Please sign in to comment.