Skip to content

add prettier task for standardized code formatting => easier cross-branch/fork code comparison and merging - #397

Merged
jasonLaster merged 4 commits into
mozilla:masterfrom
GerHobbelt:patch-6
Oct 29, 2019
Merged

add prettier task for standardized code formatting => easier cross-branch/fork code comparison and merging#397
jasonLaster merged 4 commits into
mozilla:masterfrom
GerHobbelt:patch-6

Conversation

@GerHobbelt

Copy link
Copy Markdown
Contributor
  • add prettier task for standardized code formatting => easier cross-branch/fork code comparison and merging.
  • npm run prettier

You can also cherry-pick the essential package.json edit at commit
SHA-1: 87dc0a6
plus the line-width tweak at commit
SHA-1: 39b004d * fiddling a little with prettier line width: 80 --> 120, so we get fewer lines/edits compared to vanilla mainstream.

The rest of the patch is the result of npm run prettier...

Alternatively, the entire thing is squashed in SHA-1: f446e71

  • add prettier task for standardized code formatting => easier cross-branch/fork code comparison and merging.
  • npm run prettier

@coveralls

coveralls commented Jun 18, 2019

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 575

  • 86 of 107(80.37%) changed or added relevant lines in 11 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 88.713%

Changes Missing CoverageCovered LinesChanged/Added Lines%
lib/read-wasm.js010.0%
lib/source-map-generator.js101190.91%
lib/util.js4580.0%
lib/source-map-consumer.js485096.0%
lib/wasm.js62227.27%
Files with Coverage ReductionNew Missed Lines%
lib/util.js179.45%
TotalsCoverage Status
Change from base Build 572:0.02%
Covered Lines:2481
Relevant Lines:2733

💛 - Coveralls

@jasonLaster

Copy link
Copy Markdown

Thanks @GerHobbelt! And so, sorry for the delay.

It looks npm run lint finds a couple of issues with concatenation, which could probably be fixed with string templates.

/Users/jlaster/src/moz/source-map/test/test-source-map-consumer.js
1421:72 error Unexpected string concatenation of literals no-useless-concat
/Users/jlaster/src/moz/source-map/test/test-source-map-generator.js
822:60 error Unexpected string concatenation of literals no-useless-concat
/Users/jlaster/src/moz/source-map/test/util.js
29:71 error Unexpected string concatenation of literals no-useless-concat
109:58 error Unexpected string concatenation of literals no-useless-concat
109:84 error Unexpected string concatenation of literals no-useless-concat
124:56 error Unexpected string concatenation of literals no-useless-concat
124:79 error Unexpected string concatenation of literals no-useless-concat
145:58 error Unexpected string concatenation of literals no-useless-concat
145:84 error Unexpected string concatenation of literals no-useless-concat
160:56 error Unexpected string concatenation of literals no-useless-concat
160:79 error Unexpected string concatenation of literals no-useless-concat
181:58 error Unexpected string concatenation of literals no-useless-concat
181:84 error Unexpected string concatenation of literals no-useless-concat
198:56 error Unexpected string concatenation of literals no-useless-concat
198:79 error Unexpected string concatenation of literals no-useless-concat
213:37 error Unexpected string concatenation of literals no-useless-concat
213:63 error Unexpected string concatenation of literals no-useless-concat
214:35 error Unexpected string concatenation of literals no-useless-concat
214:58 error Unexpected string concatenation of literals no-useless-concat
225:37 error Unexpected string concatenation of literals no-useless-concat
225:63 error Unexpected string concatenation of literals no-useless-concat
226:35 error Unexpected string concatenation of literals no-useless-concat
226:58 error Unexpected string concatenation of literals no-useless-concat

Once this is rebased and green I'll happily merge.

…s-branch/fork code comparison and merging.
- `npm run prettier`
# Conflicts:
#	package.json
…ewer lines/edits compared to vanilla mainstream.
# Conflicts:
#	lib/binary-search.js
#	lib/source-map-consumer-sync.js
#	lib/source-map-generator.js
#	package.json
#	test/test-binary-search.js
#	test/test-source-map-consumer-sync.js
#	test/test-source-map-consumer.js
#	test/test-util.js
@jasonLaster
jasonLasterforce-pushed the patch-6 branch 2 times, most recently from 65114b6 to 5f6ee1aCompareOctober 29, 2019 22:24
@jasonLaster

jasonLaster commented Oct 29, 2019

Copy link
Copy Markdown

I pushed some tweaks that

  1. add eslint prettier integration so that npm run lint catches issues
  2. re-runs npm run lint on the project to catch issues prettier introduced
  3. add npm run lint to the travis.yml

@jasonLaster
jasonLaster merged commit 7a26340 into mozilla:masterOct 29, 2019
Sign up for freeto 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.

3 participants

@GerHobbelt@coveralls@jasonLaster