cordova-node-xcode icon indicating copy to clipboard operation
cordova-node-xcode copied to clipboard

Introduce eslint task with semistandard & prettier

Open brody4hire opened this issue 6 years ago • 4 comments

I am already working on this, wanted before we start the new major release (#20).

brody4hire avatar Dec 12 '18 03:12 brody4hire

Can we also add https://github.com/prettier/prettier + https://github.com/prettier/eslint-config-prettier

n1ru4l avatar Dec 12 '18 08:12 n1ru4l

I would definitely favor adding prettier, just updated the title to reflect this idea.

When using eslint we generally like to use eslint-config-semistandard, which is basically standard but with semicolons required. I think a major challenge is to avoid conflicts between semistandard rules and prettier rules.

I found eslint-config-prettier-standard which will hopefully solve this problem for us.

brody4hire avatar Dec 12 '18 13:12 brody4hire

I found [...]

I meant eslint-config-prettier-standard, which does use prettier & prettier / eslint-config-prettier as suggested above, just fixed my comment.

There was some interesting discussion in https://github.com/standard/standard/issues/811 & https://github.com/standard/standard/issues/996.

brody4hire avatar Dec 12 '18 14:12 brody4hire

I just raised WIP PR #39 to introduce eslint & prettier, using prettier-eslint-cli instead of eslint-config-prettier. The issue eslint-config-prettier is that it disables a number of eslint rules from standard in order to maintain compatibility with prettier.

I was able to use prettier-eslint-cli to resolve a number of eslint issues that had been lurking in the code for ages. I hope to get it ready for review and merge in the near future.

brody4hire avatar Dec 13 '18 01:12 brody4hire