Closed whphhg closed 5 years ago
Thanks, I'll investigate
This should be fixed in 7.0.3, could you check?
I'm getting the same response.
If you want to try yourself, you can git clone https://github.com/openvcash/vcash-electron
and update your devDep to 7.0.3
and npm run format
.
I've since switched to the method used in the issue referenced above for the time being (using eslint & prettier directly).
@whphhg I don't experience warnings you mention:
vcash-electron node_modules/.bin/prettier-standard --version
7.0.3
vcash-electron node_modules/.bin/prettier-standard 'src/**/*.js'
54 files were unchanged
I think you're getting these warnings because of && standard
at the end of format script:
"format": "prettier-standard 'src/**/*.js' && standard"
standard is for linting, not formatting, so it's reasonable you're getting extra messages (it's because prettier-standard is not able to automatically fix all rules standard uses, only fixable ones. for example it cannot automatically fix "is defined but never used." errors).
I understand the above (difference between the two use-cases). Sorry for a poor issue description. I think we're on the same page regarding what each packages does.
I'll try to better describe the issue.
When using prettier-standard@6.0.0
there are no errors / warnings reported by standard
. As soon as I upgrade to prettier-standard@7.0.x
and format the src/
directory, standard
reports the warnings for files that were formatted.
Furthermore, if I save (ctrl-s, nothing else) any of the files that were not formatted by prettier-standard@7.0.x
in the src/components/
or src/stores
then standard
reports the defined but never used / not defined
warnings for those files as well.
You can format (or just save) file by file (src/components/
, src/stores/
or any other file which uses decorators) and see the warnings show up in standard
output (npm run lint
).
To be clear, everything is defined and used (no linting warnings should be reported), but for some reason after upgrading to prettier-standard@7.0.x
, standard
stops respecting decorators and reports the warnings above.
Ok so I'm getting the same error when I install prettier-standard, standard itself starts throwing the above errors that class properties are not defined.
yarn list standard:
└─ standard@10.0.3
yarn list eslint:
├─ eslint@4.17.0
└─ standard@10.0.3
└─ eslint@3.19.0
yarn list prettier-standard:
└─ prettier-standard@8.0.0
yarn list babel-eslint:
├─ babel-eslint@7.2.3
└─ prettier-standard@8.0.0
└─ babel-eslint@8.2.1
without prettier standard we have just one version of eslint and babel-eslint. also getting the error without prettier-standard if babel-eslint's version is ^8.0.0. So there is something fishy happening where installing prettier-standard makes standard's babel-eslint version to be ^8.0.0
This should be fixed for prettier-standard@9
I ran into some minor issues after updating from
6.0.0
to7.0.1
.Peer dependencies are not satisfied for these two packages anymore because of
eslint@4.7.2
.All decorators get reported as
defined but never used
, and functions using decorators are reported asis not defined
.The ones above reference these imports.