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

refactor: setup project for TypeScript #7

Merged
merged 12 commits into from Oct 11, 2021
Merged

refactor: setup project for TypeScript #7

merged 12 commits into from Oct 11, 2021

Conversation

lpatiny
Copy link
Member

@lpatiny lpatiny commented Oct 11, 2021

No description provided.

@lpatiny lpatiny requested a review from targos October 11, 2021 05:25
@lpatiny
Copy link
Member Author

lpatiny commented Oct 11, 2021

@targos I tried to follow the documentation but still have one problem:

● Validation Error:

  Preset ts-jest/presets/js-with-ts not found.

  Configuration Documentation:
  https://jestjs.io/docs/configuration

@targos
Copy link
Member

targos commented Oct 11, 2021

ts-jest is missing from your dependencies: https://github.com/cheminfo/generator-cheminfo/blob/main/ts-migration.md#configure-jest

@codecov-commenter
Copy link

codecov-commenter commented Oct 11, 2021

Codecov Report

Merging #7 (9a2d9d3) into master (c5224d9) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master        #7   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            3         3           
=========================================
  Hits             3         3           
Impacted Files Coverage Δ
src/index.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5224d9...9a2d9d3. Read the comment docs.

src/index.js Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
When using this project you will need to use destructuring:
`import {isAnyArray} from 'is-any-array'`
@lpatiny
Copy link
Member Author

lpatiny commented Oct 11, 2021

@targos

I tried to update dependencies:

 codecov                  ^3.8.2  →   ^3.8.3     
 eslint                  ^7.29.0  →   ^8.0.0     
 eslint-config-cheminfo   ^5.2.4  →   ^5.5.0     
 eslint-plugin-import    ^2.23.4  →  ^2.24.2     
 eslint-plugin-jest      ^24.3.6  →  ^25.0.1     
 eslint-plugin-prettier   ^3.4.0  →   ^4.0.0     
 jest                    ^27.0.6  →  ^27.2.5     
 prettier                 ^2.3.2  →   ^2.4.1   

But if I update eslint I get the following error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: is-any-array@1.0.1
npm ERR! Found: eslint@8.0.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^8.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" from eslint-plugin-import@2.24.2

And if I keep the old eslint version (7.x) and update all the other dependencies I obtain:

> is-any-array@1.0.1 eslint
> eslint src

/Users/lpatiny/git/cheminfo/is-any-array/src/__tests__/test.js
  1:1  error  Definition for rule 'jest/no-expect-resolves' was not found      jest/no-expect-resolves
  1:1  error  Definition for rule 'jest/no-truthy-falsy' was not found         jest/no-truthy-falsy
  1:1  error  Definition for rule 'jest/no-try-expect' was not found           jest/no-try-expect
  1:1  error  Definition for rule 'jest/prefer-to-be-null' was not found       jest/prefer-to-be-null
  1:1  error  Definition for rule 'jest/prefer-to-be-undefined' was not found  jest/prefer-to-be-undefined
  1:1  error  Definition for rule 'jest/valid-describe' was not found          jest/valid-describe

@lpatiny
Copy link
Member Author

lpatiny commented Oct 11, 2021

I'm also wondering if we should not remove this dependency as well: "eslint-config-cheminfo": "^5.5.0",

@targos
Copy link
Member

targos commented Oct 11, 2021

Eslint 8 just went out this weekend, I'm not surprised that our plugins don't support it yet.
You should remove the three eslint-plugin-... dependencies, codecov, and eslint-config-cheminfo.

@targos
Copy link
Member

targos commented Oct 11, 2021

You should also remove cheminfo-build and npm-run-all

@targos targos merged commit 21e47a0 into master Oct 11, 2021
@targos targos deleted the setup-typescript branch October 11, 2021 07:04
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

Successfully merging this pull request may close these issues.

None yet

3 participants