Skip to content

wechaty dependency modules deep cleaning #1917

@suntong

Description

@suntong

1. Versions

  • What is your wechaty version?
    Answer: 0.30.23

  • What is your wechaty-puppet-XXX(padchat/puppeteer/) version?
    Answer: wechaty-puppet-puppeteer@0.18.3 / wechaty-puppet-mock@0.16.1

  • What is your node version? (run node --version)
    Answer: v12.9.1

  • What os are you using
    Answer: Ubuntu 18.04.2 LTS

2. Describe the issue

Following up from wechaty/puppet-mock#33,

rm -rf package-lock.json
rm -rf node_modules
npm install

# However, the problem is:

$ npm list > /dev/null
npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/eslint-plugin@1.13.0
npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/eslint-plugin-tslint@1.13.0
npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/parser@1.13.0

I.e.,

  • eslint is missing, but is it necessary as a local package? I have eslint installed as global package already.
  • if it is, then its version is way old.

Moreover, npm-check reports that,

$ npm-check
@chatie/eslint-config      ð  NOTUSED?  Still using @chatie/eslint-config?
                                        Depcheck did not find code similar to require('@chatie/eslint-config') or import from '@chatie/eslint-config'.
                                        Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                        Use --skip-unused to skip this check.
                                        To remove this package: npm uninstall --save-dev @chatie/eslint-config

@chatie/git-scripts        ð  NOTUSED?  Still using @chatie/git-scripts?
                                        Depcheck did not find code similar to require('@chatie/git-scripts') or import from '@chatie/git-scripts'.
                                        Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                        Use --skip-unused to skip this check.
                                        To remove this package: npm uninstall --save-dev @chatie/git-scripts

@chatie/tsconfig           ð  NOTUSED?  Still using @chatie/tsconfig?
                                        Depcheck did not find code similar to require('@chatie/tsconfig') or import from '@chatie/tsconfig'.
                                        Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
                                        Use --skip-unused to skip this check.
                                        To remove this package: npm uninstall --save-dev @chatie/tsconfig

So now the question is, are the following modules really necessary for wechaty?

@chatie/eslint-config
@chatie/git-scripts
@chatie/tsconfig

6. Full Output Logs

Show Logs
$ npm list eslint 
wechaty-getting-started@0.1.19
+-- @chatie/eslint-config@0.8.1
| `-- UNMET PEER DEPENDENCY eslint@6.8.0 
`-- eslint@6.8.0 

npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/eslint-plugin@1.13.0
npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/eslint-plugin-tslint@1.13.0
npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/parser@1.13.0

[bug]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions