fvictorio / solhint-plugin-prettier

A Solhint plugin for checking your contracts style
28 stars 13 forks source link

Compatibility with prettier ^3.0.0 #16

Closed nataouze closed 10 months ago

nataouze commented 10 months ago

Due to functions change, this error occurs:

TypeError: this.prettier.resolveConfig.sync is not a function
    at PrettierChecker.SourceUnit (/Users/nathan/Workspace/animoca/core/ethereum-contracts/node_modules/solhint-plugin-prettier/index.js:45:61)
    at /Users/nathan/Workspace/animoca/core/ethereum-contracts/node_modules/solhint/lib/tree-listener.js:39:12
    at /Users/nathan/Workspace/animoca/core/ethereum-contracts/node_modules/solhint/lib/tree-listener.js:31:76
    at Array.forEach (<anonymous>)
    at SecurityErrorListener.SourceUnit (/Users/nathan/Workspace/animoca/core/ethereum-contracts/node_modules/solhint/lib/tree-listener.js:31:51)
    at Object.visit (/Users/nathan/Workspace/animoca/core/ethereum-contracts/node_modules/@solidity-parser/parser/dist/index.cjs.js:37156:30)
    at processStr (/Users/nathan/Workspace/animoca/core/ethereum-contracts/node_modules/solhint/lib/index.js:49:10)
    at processFile (/Users/nathan/Workspace/animoca/core/ethereum-contracts/node_modules/solhint/lib/index.js:55:18)
    at /Users/nathan/Workspace/animoca/core/ethereum-contracts/node_modules/solhint/lib/index.js:67:33
    at Array.map (<anonymous>)

resolveConfig is now only async, from my understanding, it will need to run via a worker.

cruzdanilo commented 10 months ago

i opened a pr fixing it: #15

fvictorio commented 10 months ago

Released in version 0.1.0.