You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cloud code climate eslint does not seem to be picking up typescript types from packages for my config. Kind of at wit's end with this on since local code climate works fine. When I have a file with the following code:
I expect to get no errors, but I'm getting a violation of the rule typescript-eslint/no-unsafe-call (shows up in code climate as Unsafe call of an any typed value). I think this means the eslint running on cloud code climate is not finding the types from React for some reason.
When I run eslint locally and code climate locally, they both show no error as expected.
If possible, use our CLI with the debug option to provide additional info, including any stderr produced by the engine.CODECLIMATE_DEBUG=1 codeclimate analyze -e eslint
Local code climate does not have the issue so I'm not sure if this is helpful, but here's the output from running code climate locally:
Local code climate output
➜ codeclimate-typescript-test2 git:(diagnose_ts_issue_2) CODECLIMATE_DEBUG=1 codeclimate analyze -e eslint
Starting analysis
I, [2021-04-01T22:11:11.510648 #1] INFO -- : starting engine eslint
D, [2021-04-01T22:11:36.914651 #1] DEBUG -- : /config.json content: {"enabled"=>true, "channel"=>"eslint-7", "config"=>{"config"=>"./.eslintrc.js", "extensions"=>[".js", ".jsx", ".ts", ".tsx"]}, "checks"=>{"import/extensions"=>{"enabled"=>false}}, "include_paths"=>[".next/", "README.md", "styles/", "components/", "public/", ".gitignore", "package-lock.json", "package.json", ".eslintrc.js", "tsconfig.json", "pages/", ".codeclimate.yml"], "debug"=>"1"}
D, [2021-04-01T22:11:36.928891 #1] DEBUG -- : docker run: ["docker", "run", "--name", "cc-engines-eslint-eslint-7-24547312-c89b-411c-adf4-816493eec76a", "--cap-drop", "all", "--label", "com.codeclimate.label=1765eca0-e4d0-4ac8-a679-76b80cb1f1f6", "--log-driver", "none", "--memory-swap", "-1", "--net", "none", "--rm", "--volume", "/Users/nolankataoka/FormSwift/codeclimate-typescript-test2:/code:ro", "--volume", "/tmp/cc/a40b5139-206e-4b54-9ecc-ae721e5dcabe:/config.json:ro", "--user", "9000:9000", "--memory", "1024000000", "codeclimate/codeclimate-eslint:eslint-7"]
D, [2021-04-01T22:11:50.540542 #1] DEBUG -- : engine stderr: Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration .
D, [2021-04-01T22:11:51.213804 #1] DEBUG -- : engine stdout: {"type":"issue","categories":["Style"],"check_name":"@typescript-eslint/explicit-module-boundary-types","description":"Missing return type on function.","content":{"body":"For more information visit Source: http://eslint.org/docs/rules/\n"},"location":{"path":"pages/_app.js","positions":{"begin":{"line":3,"column":1},"end":{"line":3,"column":1}}},"remediation_points":50000}
D, [2021-04-01T22:11:51.229471 #1] DEBUG -- : engine stdout:
{"type":"issue","categories":["Style"],"check_name":"@typescript-eslint/explicit-module-boundary-types","description":"Object pattern argument should be typed.","content":{"body":"For more information visit Source: http://eslint.org/docs/rules/\n"},"location":{"path":"pages/_app.js","positions":{"begin":{"line":3,"column":16},"end":{"line":3,"column":16}}},"remediation_points":50000}
D, [2021-04-01T22:11:51.234758 #1] DEBUG -- : engine stdout:
{"type":"issue","categories":["Style"],"check_name":"react/prop-types","description":"'Component' is missing in props validation","content":{"body":"For more information visit Source: http://eslint.org/docs/rules/\n"},"location":{"path":"pages/_app.js","positions":{"begin":{"line":3,"column":18},"end":{"line":3,"column":18}}},"remediation_points":50000}
D, [2021-04-01T22:11:51.240352 #1] DEBUG -- : engine stdout:
{"type":"issue","categories":["Style"],"check_name":"react/prop-types","description":"'pageProps' is missing in props validation","content":{"body":"For more information visit Source: http://eslint.org/docs/rules/\n"},"location":{"path":"pages/_app.js","positions":{"begin":{"line":3,"column":29},"end":{"line":3,"column":29}}},"remediation_points":50000}
D, [2021-04-01T22:11:51.245808 #1] DEBUG -- : engine stdout:
{"type":"issue","categories":["Style"],"check_name":"@typescript-eslint/explicit-module-boundary-types","description":"Missing return type on function.","content":{"body":"For more information visit Source: http://eslint.org/docs/rules/\n"},"location":{"path":"pages/api/hello.js","positions":{"begin":{"line":3,"column":16},"end":{"line":3,"column":16}}},"remediation_points":50000}
D, [2021-04-01T22:11:51.252195 #1] DEBUG -- : engine stdout:
{"type":"issue","categories":["Style"],"check_name":"@typescript-eslint/explicit-module-boundary-types","description":"Argument 'req' should be typed.","content":{"body":"For more information visit Source: http://eslint.org/docs/rules/\n"},"location":{"path":"pages/api/hello.js","positions":{"begin":{"line":3,"column":17},"end":{"line":3,"column":17}}},"remediation_points":50000}
D, [2021-04-01T22:11:51.257548 #1] DEBUG -- : engine stdout:
{"type":"issue","categories":["Style"],"check_name":"@typescript-eslint/explicit-module-boundary-types","description":"Argument 'res' should be typed.","content":{"body":"For more information visit Source: http://eslint.org/docs/rules/\n"},"location":{"path":"pages/api/hello.js","positions":{"begin":{"line":3,"column":22},"end":{"line":3,"column":22}}},"remediation_points":50000}
D, [2021-04-01T22:11:51.263641 #1] DEBUG -- : engine stdout:
{"type":"issue","categories":["Style"],"check_name":"@typescript-eslint/no-unsafe-member-access","description":"Unsafe member access .json on an any value.","content":{"body":"For more information visit Source: http://eslint.org/docs/rules/\n"},"location":{"path":"pages/api/hello.js","positions":{"begin":{"line":4,"column":3},"end":{"line":4,"column":3}}},"remediation_points":50000}
D, [2021-04-01T22:11:51.268596 #1] DEBUG -- : engine stdout:
{"type":"issue","categories":["Style"],"check_name":"@typescript-eslint/no-unsafe-call","description":"Unsafe call of an any typed value.","content":{"body":"For more information visit Source: http://eslint.org/docs/rules/\n"},"location":{"path":"pages/api/hello.js","positions":{"begin":{"line":4,"column":3},"end":{"line":4,"column":3}}},"remediation_points":50000}
D, [2021-04-01T22:11:51.275227 #1] DEBUG -- : engine stdout:
{"type":"issue","categories":["Style"],"check_name":"@typescript-eslint/no-unsafe-member-access","description":"Unsafe member access .status on an any value.","content":{"body":"For more information visit Source: http://eslint.org/docs/rules/\n"},"location":{"path":"pages/api/hello.js","positions":{"begin":{"line":4,"column":3},"end":{"line":4,"column":3}}},"remediation_points":50000}
D, [2021-04-01T22:11:51.280892 #1] DEBUG -- : engine stdout:
{"type":"issue","categories":["Style"],"check_name":"@typescript-eslint/no-unsafe-call","description":"Unsafe call of an any typed value.","content":{"body":"For more information visit Source: http://eslint.org/docs/rules/\n"},"location":{"path":"pages/api/hello.js","positions":{"begin":{"line":4,"column":3},"end":{"line":4,"column":3}}},"remediation_points":50000}
D, [2021-04-01T22:11:51.287051 #1] DEBUG -- : engine stdout:
{"type":"issue","categories":["Style"],"check_name":"@typescript-eslint/explicit-module-boundary-types","description":"Missing return type on function.","content":{"body":"For more information visit Source: http://eslint.org/docs/rules/\n"},"location":{"path":"pages/index.js","positions":{"begin":{"line":4,"column":16},"end":{"line":4,"column":16}}},"remediation_points":50000}
D, [2021-04-01T22:11:51.326510 #1] DEBUG -- : engine stderr: Ignoring the following rules that rely on module resolution:
D, [2021-04-01T22:11:51.326641 #1] DEBUG -- : engine stderr: * import/extensionsimport/named
D, [2021-04-01T22:11:51.326705 #1] DEBUG -- : engine stderr: * import/namespace
D, [2021-04-01T22:11:51.326777 #1] DEBUG -- : engine stderr: * import/no-absolute-path
D, [2021-04-01T22:11:51.327335 #1] DEBUG -- : engine stderr: * import/no-cycle
D, [2021-04-01T22:11:51.327452 #1] DEBUG -- : engine stderr: * import/no-duplicates
D, [2021-04-01T22:11:51.327520 #1] DEBUG -- : engine stderr: * import/no-extraneous-dependencies
D, [2021-04-01T22:11:51.327613 #1] DEBUG -- : engine stderr: * import/no-named-as-default
D, [2021-04-01T22:11:51.328224 #1] DEBUG -- : engine stderr: * import/no-named-as-default-member
D, [2021-04-01T22:11:51.328369 #1] DEBUG -- : engine stderr: * import/no-restricted-paths
D, [2021-04-01T22:11:51.328499 #1] DEBUG -- : engine stderr: * import/no-unresolved
D, [2021-04-01T22:11:51.328593 #1] DEBUG -- : engine stderr: * node/no-hide-code-modules
D, [2021-04-01T22:11:51.329138 #1] DEBUG -- : engine stderr: * node/no-missing-require
D, [2021-04-01T22:11:51.329265 #1] DEBUG -- : engine stderr: Ignoring the following settings that rely on module resolution:
D, [2021-04-01T22:11:51.329355 #1] DEBUG -- : engine stderr: * undefined
D, [2021-04-01T22:11:51.329447 #1] DEBUG -- : engine stderr: Skipped modules
D, [2021-04-01T22:11:51.330020 #1] DEBUG -- : engine stderr: * undefined
D, [2021-04-01T22:11:51.493391 #1] DEBUG -- : engine stdout:
I, [2021-04-01T22:11:51.495024 #1] INFO -- : finished engine eslint
Relevant links
I created an example repo starting with defaults provided by Next.js and have been paring down the config files. So far haven't figured out what part of the config is causing this issue: https://github.com/nmkataoka/codeclimate-typescript-test2. You can check the file components/Page.tsx for the same example line with createContext. If anyone has an idea of where to go from here I'd be happy to keep working on this.
4-6 word issue title
The text was updated successfully, but these errors were encountered:
Bug Template
Actual Behavior
Cloud code climate eslint does not seem to be picking up typescript types from packages for my config. Kind of at wit's end with this on since local code climate works fine. When I have a file with the following code:
I expect to get no errors, but I'm getting a violation of the rule
typescript-eslint/no-unsafe-call
(shows up in code climate asUnsafe call of an any typed value
). I think this means the eslint running on cloud code climate is not finding the types from React for some reason.When I run eslint locally and code climate locally, they both show no error as expected.
Expected Behavior
There should not be a rule violation here.
Steps to reproduce
tsconfig.json
.eslintrc.js
package.json
Local code climate does not have the issue so I'm not sure if this is helpful, but here's the output from running code climate locally:
Local code climate output
Relevant links
I created an example repo starting with defaults provided by Next.js and have been paring down the config files. So far haven't figured out what part of the config is causing this issue: https://github.com/nmkataoka/codeclimate-typescript-test2. You can check the file
components/Page.tsx
for the same example line withcreateContext
. If anyone has an idea of where to go from here I'd be happy to keep working on this.The text was updated successfully, but these errors were encountered: