Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Eslint #1

Open
myorb opened this issue Jul 25, 2022 · 0 comments
Open

Fix Eslint #1

myorb opened this issue Jul 25, 2022 · 0 comments

Comments

@myorb
Copy link
Owner

myorb commented Jul 25, 2022

Currently, eslint has some troubles

`% yarn lint
yarn run v1.22.19
$ eslint . --ext .ts

/Users/oleksandrshalaiev/myorb/serverless-v3-openapi/dist/parse.d.ts
2:68 error Don't use {} as a type. {} actually means "any non-nullish value".

  • If you want a type meaning "any object", you probably want Record<string, unknown> instead.
  • If you want a type meaning "any value", you probably want unknown instead.
  • If you want a type meaning "empty object", you probably want Record<string, never> instead @typescript-eslint/ban-types

/Users/oleksandrshalaiev/myorb/serverless-v3-openapi/dist/types.d.ts
8:21 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
34:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
40:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
43:19 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
44:17 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
45:17 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
47:22 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
48:21 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
61:15 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
62:22 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
63:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
67:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
68:21 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
69:13 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
70:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
71:22 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
72:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
73:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

/Users/oleksandrshalaiev/myorb/serverless-v3-openapi/dist/utils.d.ts
1:44 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
1:57 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

/Users/oleksandrshalaiev/myorb/serverless-v3-openapi/src/DefinitionGenerator.ts
14:17 error Require statement not part of import statement @typescript-eslint/no-var-requires
112:26 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
151:70 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
151:88 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
151:109 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
151:128 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
226:91 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
298:74 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
303:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
337:55 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
361:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
366:46 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
366:60 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

/Users/oleksandrshalaiev/myorb/serverless-v3-openapi/src/index.ts
8:19 error Require statement not part of import statement @typescript-eslint/no-var-requires
9:17 error Require statement not part of import statement @typescript-eslint/no-var-requires
13:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
14:15 error Don't use {} as a type. {} actually means "any non-nullish value".

  • If you want a type meaning "any object", you probably want Record<string, unknown> instead.
  • If you want a type meaning "any value", you probably want unknown instead.
  • If you want a type meaning "empty object", you probably want Record<string, never> instead @typescript-eslint/ban-types
    15:29 error Don't use Function as a type. The Function type accepts any function-like value.
    It provides no type safety when calling the function, which can be a common source of bugs.
    It also accepts things like class declarations, which will throw at runtime as they will not be called with new.
    If you are expecting the function to accept certain arguments, you should explicitly define the function shape @typescript-eslint/ban-types
    17:53 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
    133:34 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
    134:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

/Users/oleksandrshalaiev/myorb/serverless-v3-openapi/src/parse.ts
39:12 error Don't use {} as a type. {} actually means "any non-nullish value".

  • If you want a type meaning "any object", you probably want Record<string, unknown> instead.
  • If you want a type meaning "any value", you probably want unknown instead.
  • If you want a type meaning "empty object", you probably want Record<string, never> instead @typescript-eslint/ban-types
    64:80 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

/Users/oleksandrshalaiev/myorb/serverless-v3-openapi/src/types.ts
9:19 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
39:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
51:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
54:17 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
55:15 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
56:15 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
58:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
59:19 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
74:13 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
75:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
76:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
82:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
83:19 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
84:11 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
85:16 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
86:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
87:16 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
88:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

✖ 62 problems (7 errors, 55 warnings)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant