diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 0000000..5528787 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,17 @@ +StylesPath = styles + +MinAlertLevel = suggestion + +Packages = Google, write-good + +[*.{md}] +# ^ This section applies to only Markdown files. +# +# You can change (or add) file extensions here +# to apply these settings to other file types. +# +# For example, to apply these settings to both +# Markdown and reStructuredText: +# +# [*.{md,rst}] +BasedOnStyles = Vale, Google, write-good diff --git a/styles/Google/AMPM.yml b/styles/Google/AMPM.yml new file mode 100644 index 0000000..37b49ed --- /dev/null +++ b/styles/Google/AMPM.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Use 'AM' or 'PM' (preceded by a space)." +link: "https://developers.google.com/style/word-list" +level: error +nonword: true +tokens: + - '\d{1,2}[AP]M\b' + - '\d{1,2} ?[ap]m\b' + - '\d{1,2} ?[aApP]\.[mM]\.' diff --git a/styles/Google/Acronyms.yml b/styles/Google/Acronyms.yml new file mode 100644 index 0000000..f41af01 --- /dev/null +++ b/styles/Google/Acronyms.yml @@ -0,0 +1,64 @@ +extends: conditional +message: "Spell out '%s', if it's unfamiliar to the audience." +link: 'https://developers.google.com/style/abbreviations' +level: suggestion +ignorecase: false +# Ensures that the existence of 'first' implies the existence of 'second'. +first: '\b([A-Z]{3,5})\b' +second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)' +# ... with the exception of these: +exceptions: + - API + - ASP + - CLI + - CPU + - CSS + - CSV + - DEBUG + - DOM + - DPI + - FAQ + - GCC + - GDB + - GET + - GPU + - GTK + - GUI + - HTML + - HTTP + - HTTPS + - IDE + - JAR + - JSON + - JSX + - LESS + - LLDB + - NET + - NOTE + - NVDA + - OSS + - PATH + - PDF + - PHP + - POST + - RAM + - REPL + - RSA + - SCM + - SCSS + - SDK + - SQL + - SSH + - SSL + - SVG + - TBD + - TCP + - TODO + - URI + - URL + - USB + - UTF + - XML + - XSS + - YAML + - ZIP diff --git a/styles/Google/Colons.yml b/styles/Google/Colons.yml new file mode 100644 index 0000000..4a027c3 --- /dev/null +++ b/styles/Google/Colons.yml @@ -0,0 +1,8 @@ +extends: existence +message: "'%s' should be in lowercase." +link: 'https://developers.google.com/style/colons' +nonword: true +level: warning +scope: sentence +tokens: + - '(?=1.0.0" +} diff --git a/styles/Google/vocab.txt b/styles/Google/vocab.txt new file mode 100644 index 0000000..e69de29 diff --git a/styles/write-good/Cliches.yml b/styles/write-good/Cliches.yml new file mode 100644 index 0000000..c953143 --- /dev/null +++ b/styles/write-good/Cliches.yml @@ -0,0 +1,702 @@ +extends: existence +message: "Try to avoid using clichés like '%s'." +ignorecase: true +level: warning +tokens: + - a chip off the old block + - a clean slate + - a dark and stormy night + - a far cry + - a fine kettle of fish + - a loose cannon + - a penny saved is a penny earned + - a tough row to hoe + - a word to the wise + - ace in the hole + - acid test + - add insult to injury + - against all odds + - air your dirty laundry + - all fun and games + - all in a day's work + - all talk, no action + - all thumbs + - all your eggs in one basket + - all's fair in love and war + - all's well that ends well + - almighty dollar + - American as apple pie + - an axe to grind + - another day, another dollar + - armed to the teeth + - as luck would have it + - as old as time + - as the crow flies + - at loose ends + - at my wits end + - avoid like the plague + - babe in the woods + - back against the wall + - back in the saddle + - back to square one + - back to the drawing board + - bad to the bone + - badge of honor + - bald faced liar + - ballpark figure + - banging your head against a brick wall + - baptism by fire + - barking up the wrong tree + - bat out of hell + - be all and end all + - beat a dead horse + - beat around the bush + - been there, done that + - beggars can't be choosers + - behind the eight ball + - bend over backwards + - benefit of the doubt + - bent out of shape + - best thing since sliced bread + - bet your bottom dollar + - better half + - better late than never + - better mousetrap + - better safe than sorry + - between a rock and a hard place + - beyond the pale + - bide your time + - big as life + - big cheese + - big fish in a small pond + - big man on campus + - bigger they are the harder they fall + - bird in the hand + - bird's eye view + - birds and the bees + - birds of a feather flock together + - bit the hand that feeds you + - bite the bullet + - bite the dust + - bitten off more than he can chew + - black as coal + - black as pitch + - black as the ace of spades + - blast from the past + - bleeding heart + - blessing in disguise + - blind ambition + - blind as a bat + - blind leading the blind + - blood is thicker than water + - blood sweat and tears + - blow off steam + - blow your own horn + - blushing bride + - boils down to + - bolt from the blue + - bone to pick + - bored stiff + - bored to tears + - bottomless pit + - boys will be boys + - bright and early + - brings home the bacon + - broad across the beam + - broken record + - brought back to reality + - bull by the horns + - bull in a china shop + - burn the midnight oil + - burning question + - burning the candle at both ends + - burst your bubble + - bury the hatchet + - busy as a bee + - by hook or by crook + - call a spade a spade + - called onto the carpet + - calm before the storm + - can of worms + - can't cut the mustard + - can't hold a candle to + - case of mistaken identity + - cat got your tongue + - cat's meow + - caught in the crossfire + - caught red-handed + - checkered past + - chomping at the bit + - cleanliness is next to godliness + - clear as a bell + - clear as mud + - close to the vest + - cock and bull story + - cold shoulder + - come hell or high water + - cool as a cucumber + - cool, calm, and collected + - cost a king's ransom + - count your blessings + - crack of dawn + - crash course + - creature comforts + - cross that bridge when you come to it + - crushing blow + - cry like a baby + - cry me a river + - cry over spilt milk + - crystal clear + - curiosity killed the cat + - cut and dried + - cut through the red tape + - cut to the chase + - cute as a bugs ear + - cute as a button + - cute as a puppy + - cuts to the quick + - dark before the dawn + - day in, day out + - dead as a doornail + - devil is in the details + - dime a dozen + - divide and conquer + - dog and pony show + - dog days + - dog eat dog + - dog tired + - don't burn your bridges + - don't count your chickens + - don't look a gift horse in the mouth + - don't rock the boat + - don't step on anyone's toes + - don't take any wooden nickels + - down and out + - down at the heels + - down in the dumps + - down the hatch + - down to earth + - draw the line + - dressed to kill + - dressed to the nines + - drives me up the wall + - dull as dishwater + - dyed in the wool + - eagle eye + - ear to the ground + - early bird catches the worm + - easier said than done + - easy as pie + - eat your heart out + - eat your words + - eleventh hour + - even the playing field + - every dog has its day + - every fiber of my being + - everything but the kitchen sink + - eye for an eye + - face the music + - facts of life + - fair weather friend + - fall by the wayside + - fan the flames + - feast or famine + - feather your nest + - feathered friends + - few and far between + - fifteen minutes of fame + - filthy vermin + - fine kettle of fish + - fish out of water + - fishing for a compliment + - fit as a fiddle + - fit the bill + - fit to be tied + - flash in the pan + - flat as a pancake + - flip your lid + - flog a dead horse + - fly by night + - fly the coop + - follow your heart + - for all intents and purposes + - for the birds + - for what it's worth + - force of nature + - force to be reckoned with + - forgive and forget + - fox in the henhouse + - free and easy + - free as a bird + - fresh as a daisy + - full steam ahead + - fun in the sun + - garbage in, garbage out + - gentle as a lamb + - get a kick out of + - get a leg up + - get down and dirty + - get the lead out + - get to the bottom of + - get your feet wet + - gets my goat + - gilding the lily + - give and take + - go against the grain + - go at it tooth and nail + - go for broke + - go him one better + - go the extra mile + - go with the flow + - goes without saying + - good as gold + - good deed for the day + - good things come to those who wait + - good time was had by all + - good times were had by all + - greased lightning + - greek to me + - green thumb + - green-eyed monster + - grist for the mill + - growing like a weed + - hair of the dog + - hand to mouth + - happy as a clam + - happy as a lark + - hasn't a clue + - have a nice day + - have high hopes + - have the last laugh + - haven't got a row to hoe + - head honcho + - head over heels + - hear a pin drop + - heard it through the grapevine + - heart's content + - heavy as lead + - hem and haw + - high and dry + - high and mighty + - high as a kite + - hit paydirt + - hold your head up high + - hold your horses + - hold your own + - hold your tongue + - honest as the day is long + - horns of a dilemma + - horse of a different color + - hot under the collar + - hour of need + - I beg to differ + - icing on the cake + - if the shoe fits + - if the shoe were on the other foot + - in a jam + - in a jiffy + - in a nutshell + - in a pig's eye + - in a pinch + - in a word + - in hot water + - in the gutter + - in the nick of time + - in the thick of it + - in your dreams + - it ain't over till the fat lady sings + - it goes without saying + - it takes all kinds + - it takes one to know one + - it's a small world + - it's only a matter of time + - ivory tower + - Jack of all trades + - jockey for position + - jog your memory + - joined at the hip + - judge a book by its cover + - jump down your throat + - jump in with both feet + - jump on the bandwagon + - jump the gun + - jump to conclusions + - just a hop, skip, and a jump + - just the ticket + - justice is blind + - keep a stiff upper lip + - keep an eye on + - keep it simple, stupid + - keep the home fires burning + - keep up with the Joneses + - keep your chin up + - keep your fingers crossed + - kick the bucket + - kick up your heels + - kick your feet up + - kid in a candy store + - kill two birds with one stone + - kiss of death + - knock it out of the park + - knock on wood + - knock your socks off + - know him from Adam + - know the ropes + - know the score + - knuckle down + - knuckle sandwich + - knuckle under + - labor of love + - ladder of success + - land on your feet + - lap of luxury + - last but not least + - last hurrah + - last-ditch effort + - law of the jungle + - law of the land + - lay down the law + - leaps and bounds + - let sleeping dogs lie + - let the cat out of the bag + - let the good times roll + - let your hair down + - let's talk turkey + - letter perfect + - lick your wounds + - lies like a rug + - life's a bitch + - life's a grind + - light at the end of the tunnel + - lighter than a feather + - lighter than air + - like clockwork + - like father like son + - like taking candy from a baby + - like there's no tomorrow + - lion's share + - live and learn + - live and let live + - long and short of it + - long lost love + - look before you leap + - look down your nose + - look what the cat dragged in + - looking a gift horse in the mouth + - looks like death warmed over + - loose cannon + - lose your head + - lose your temper + - loud as a horn + - lounge lizard + - loved and lost + - low man on the totem pole + - luck of the draw + - luck of the Irish + - make hay while the sun shines + - make money hand over fist + - make my day + - make the best of a bad situation + - make the best of it + - make your blood boil + - man of few words + - man's best friend + - mark my words + - meaningful dialogue + - missed the boat on that one + - moment in the sun + - moment of glory + - moment of truth + - money to burn + - more power to you + - more than one way to skin a cat + - movers and shakers + - moving experience + - naked as a jaybird + - naked truth + - neat as a pin + - needle in a haystack + - needless to say + - neither here nor there + - never look back + - never say never + - nip and tuck + - nip it in the bud + - no guts, no glory + - no love lost + - no pain, no gain + - no skin off my back + - no stone unturned + - no time like the present + - no use crying over spilled milk + - nose to the grindstone + - not a hope in hell + - not a minute's peace + - not in my backyard + - not playing with a full deck + - not the end of the world + - not written in stone + - nothing to sneeze at + - nothing ventured nothing gained + - now we're cooking + - off the top of my head + - off the wagon + - off the wall + - old hat + - older and wiser + - older than dirt + - older than Methuselah + - on a roll + - on cloud nine + - on pins and needles + - on the bandwagon + - on the money + - on the nose + - on the rocks + - on the spot + - on the tip of my tongue + - on the wagon + - on thin ice + - once bitten, twice shy + - one bad apple doesn't spoil the bushel + - one born every minute + - one brick short + - one foot in the grave + - one in a million + - one red cent + - only game in town + - open a can of worms + - open and shut case + - open the flood gates + - opportunity doesn't knock twice + - out of pocket + - out of sight, out of mind + - out of the frying pan into the fire + - out of the woods + - out on a limb + - over a barrel + - over the hump + - pain and suffering + - pain in the + - panic button + - par for the course + - part and parcel + - party pooper + - pass the buck + - patience is a virtue + - pay through the nose + - penny pincher + - perfect storm + - pig in a poke + - pile it on + - pillar of the community + - pin your hopes on + - pitter patter of little feet + - plain as day + - plain as the nose on your face + - play by the rules + - play your cards right + - playing the field + - playing with fire + - pleased as punch + - plenty of fish in the sea + - point with pride + - poor as a church mouse + - pot calling the kettle black + - pretty as a picture + - pull a fast one + - pull your punches + - pulling your leg + - pure as the driven snow + - put it in a nutshell + - put one over on you + - put the cart before the horse + - put the pedal to the metal + - put your best foot forward + - put your foot down + - quick as a bunny + - quick as a lick + - quick as a wink + - quick as lightning + - quiet as a dormouse + - rags to riches + - raining buckets + - raining cats and dogs + - rank and file + - rat race + - reap what you sow + - red as a beet + - red herring + - reinvent the wheel + - rich and famous + - rings a bell + - ripe old age + - ripped me off + - rise and shine + - road to hell is paved with good intentions + - rob Peter to pay Paul + - roll over in the grave + - rub the wrong way + - ruled the roost + - running in circles + - sad but true + - sadder but wiser + - salt of the earth + - scared stiff + - scared to death + - sealed with a kiss + - second to none + - see eye to eye + - seen the light + - seize the day + - set the record straight + - set the world on fire + - set your teeth on edge + - sharp as a tack + - shoot for the moon + - shoot the breeze + - shot in the dark + - shoulder to the wheel + - sick as a dog + - sigh of relief + - signed, sealed, and delivered + - sink or swim + - six of one, half a dozen of another + - skating on thin ice + - slept like a log + - slinging mud + - slippery as an eel + - slow as molasses + - smart as a whip + - smooth as a baby's bottom + - sneaking suspicion + - snug as a bug in a rug + - sow wild oats + - spare the rod, spoil the child + - speak of the devil + - spilled the beans + - spinning your wheels + - spitting image of + - spoke with relish + - spread like wildfire + - spring to life + - squeaky wheel gets the grease + - stands out like a sore thumb + - start from scratch + - stick in the mud + - still waters run deep + - stitch in time + - stop and smell the roses + - straight as an arrow + - straw that broke the camel's back + - strong as an ox + - stubborn as a mule + - stuff that dreams are made of + - stuffed shirt + - sweating blood + - sweating bullets + - take a load off + - take one for the team + - take the bait + - take the bull by the horns + - take the plunge + - takes one to know one + - takes two to tango + - the more the merrier + - the real deal + - the real McCoy + - the red carpet treatment + - the same old story + - there is no accounting for taste + - thick as a brick + - thick as thieves + - thin as a rail + - think outside of the box + - third time's the charm + - this day and age + - this hurts me worse than it hurts you + - this point in time + - three sheets to the wind + - through thick and thin + - throw in the towel + - tie one on + - tighter than a drum + - time and time again + - time is of the essence + - tip of the iceberg + - tired but happy + - to coin a phrase + - to each his own + - to make a long story short + - to the best of my knowledge + - toe the line + - tongue in cheek + - too good to be true + - too hot to handle + - too numerous to mention + - touch with a ten foot pole + - tough as nails + - trial and error + - trials and tribulations + - tried and true + - trip down memory lane + - twist of fate + - two cents worth + - two peas in a pod + - ugly as sin + - under the counter + - under the gun + - under the same roof + - under the weather + - until the cows come home + - unvarnished truth + - up the creek + - uphill battle + - upper crust + - upset the applecart + - vain attempt + - vain effort + - vanquish the enemy + - vested interest + - waiting for the other shoe to drop + - wakeup call + - warm welcome + - watch your p's and q's + - watch your tongue + - watching the clock + - water under the bridge + - weather the storm + - weed them out + - week of Sundays + - went belly up + - wet behind the ears + - what goes around comes around + - what you see is what you get + - when it rains, it pours + - when push comes to shove + - when the cat's away + - when the going gets tough, the tough get going + - white as a sheet + - whole ball of wax + - whole hog + - whole nine yards + - wild goose chase + - will wonders never cease? + - wisdom of the ages + - wise as an owl + - wolf at the door + - words fail me + - work like a dog + - world weary + - worst nightmare + - worth its weight in gold + - wrong side of the bed + - yanking your chain + - yappy as a dog + - years young + - you are what you eat + - you can run but you can't hide + - you only live once + - you're the boss + - young and foolish + - young and vibrant diff --git a/styles/write-good/E-Prime.yml b/styles/write-good/E-Prime.yml new file mode 100644 index 0000000..074a102 --- /dev/null +++ b/styles/write-good/E-Prime.yml @@ -0,0 +1,32 @@ +extends: existence +message: "Try to avoid using '%s'." +ignorecase: true +level: suggestion +tokens: + - am + - are + - aren't + - be + - been + - being + - he's + - here's + - here's + - how's + - i'm + - is + - isn't + - it's + - she's + - that's + - there's + - they're + - was + - wasn't + - we're + - were + - weren't + - what's + - where's + - who's + - you're diff --git a/styles/write-good/Illusions.yml b/styles/write-good/Illusions.yml new file mode 100644 index 0000000..b4f1321 --- /dev/null +++ b/styles/write-good/Illusions.yml @@ -0,0 +1,11 @@ +extends: repetition +message: "'%s' is repeated!" +level: warning +alpha: true +action: + name: edit + params: + - truncate + - " " +tokens: + - '[^\s]+' diff --git a/styles/write-good/Passive.yml b/styles/write-good/Passive.yml new file mode 100644 index 0000000..f472cb9 --- /dev/null +++ b/styles/write-good/Passive.yml @@ -0,0 +1,183 @@ +extends: existence +message: "'%s' may be passive voice. Use active voice if you can." +ignorecase: true +level: warning +raw: + - \b(am|are|were|being|is|been|was|be)\b\s* +tokens: + - '[\w]+ed' + - awoken + - beat + - become + - been + - begun + - bent + - beset + - bet + - bid + - bidden + - bitten + - bled + - blown + - born + - bought + - bound + - bred + - broadcast + - broken + - brought + - built + - burnt + - burst + - cast + - caught + - chosen + - clung + - come + - cost + - crept + - cut + - dealt + - dived + - done + - drawn + - dreamt + - driven + - drunk + - dug + - eaten + - fallen + - fed + - felt + - fit + - fled + - flown + - flung + - forbidden + - foregone + - forgiven + - forgotten + - forsaken + - fought + - found + - frozen + - given + - gone + - gotten + - ground + - grown + - heard + - held + - hidden + - hit + - hung + - hurt + - kept + - knelt + - knit + - known + - laid + - lain + - leapt + - learnt + - led + - left + - lent + - let + - lighted + - lost + - made + - meant + - met + - misspelt + - mistaken + - mown + - overcome + - overdone + - overtaken + - overthrown + - paid + - pled + - proven + - put + - quit + - read + - rid + - ridden + - risen + - run + - rung + - said + - sat + - sawn + - seen + - sent + - set + - sewn + - shaken + - shaven + - shed + - shod + - shone + - shorn + - shot + - shown + - shrunk + - shut + - slain + - slept + - slid + - slit + - slung + - smitten + - sold + - sought + - sown + - sped + - spent + - spilt + - spit + - split + - spoken + - spread + - sprung + - spun + - stolen + - stood + - stridden + - striven + - struck + - strung + - stuck + - stung + - stunk + - sung + - sunk + - swept + - swollen + - sworn + - swum + - swung + - taken + - taught + - thought + - thrived + - thrown + - thrust + - told + - torn + - trodden + - understood + - upheld + - upset + - wed + - wept + - withheld + - withstood + - woken + - won + - worn + - wound + - woven + - written + - wrung diff --git a/styles/write-good/README.md b/styles/write-good/README.md new file mode 100644 index 0000000..3edcc9b --- /dev/null +++ b/styles/write-good/README.md @@ -0,0 +1,27 @@ +Based on [write-good](https://github.com/btford/write-good). + +> Naive linter for English prose for developers who can't write good and wanna learn to do other stuff good too. + +``` +The MIT License (MIT) + +Copyright (c) 2014 Brian Ford + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +``` diff --git a/styles/write-good/So.yml b/styles/write-good/So.yml new file mode 100644 index 0000000..e57f099 --- /dev/null +++ b/styles/write-good/So.yml @@ -0,0 +1,5 @@ +extends: existence +message: "Don't start a sentence with '%s'." +level: error +raw: + - '(?:[;-]\s)so[\s,]|\bSo[\s,]' diff --git a/styles/write-good/ThereIs.yml b/styles/write-good/ThereIs.yml new file mode 100644 index 0000000..8b82e8f --- /dev/null +++ b/styles/write-good/ThereIs.yml @@ -0,0 +1,6 @@ +extends: existence +message: "Don't start a sentence with '%s'." +ignorecase: false +level: error +raw: + - '(?:[;-]\s)There\s(is|are)|\bThere\s(is|are)\b' diff --git a/styles/write-good/TooWordy.yml b/styles/write-good/TooWordy.yml new file mode 100644 index 0000000..275701b --- /dev/null +++ b/styles/write-good/TooWordy.yml @@ -0,0 +1,221 @@ +extends: existence +message: "'%s' is too wordy." +ignorecase: true +level: warning +tokens: + - a number of + - abundance + - accede to + - accelerate + - accentuate + - accompany + - accomplish + - accorded + - accrue + - acquiesce + - acquire + - additional + - adjacent to + - adjustment + - admissible + - advantageous + - adversely impact + - advise + - aforementioned + - aggregate + - aircraft + - all of + - all things considered + - alleviate + - allocate + - along the lines of + - already existing + - alternatively + - amazing + - ameliorate + - anticipate + - apparent + - appreciable + - as a matter of fact + - as a means of + - as far as I'm concerned + - as of yet + - as to + - as yet + - ascertain + - assistance + - at the present time + - at this time + - attain + - attributable to + - authorize + - because of the fact that + - belated + - benefit from + - bestow + - by means of + - by virtue of + - by virtue of the fact that + - cease + - close proximity + - commence + - comply with + - concerning + - consequently + - consolidate + - constitutes + - demonstrate + - depart + - designate + - discontinue + - due to the fact that + - each and every + - economical + - eliminate + - elucidate + - employ + - endeavor + - enumerate + - equitable + - equivalent + - evaluate + - evidenced + - exclusively + - expedite + - expend + - expiration + - facilitate + - factual evidence + - feasible + - finalize + - first and foremost + - for all intents and purposes + - for the most part + - for the purpose of + - forfeit + - formulate + - have a tendency to + - honest truth + - however + - if and when + - impacted + - implement + - in a manner of speaking + - in a timely manner + - in a very real sense + - in accordance with + - in addition + - in all likelihood + - in an effort to + - in between + - in excess of + - in lieu of + - in light of the fact that + - in many cases + - in my opinion + - in order to + - in regard to + - in some instances + - in terms of + - in the case of + - in the event that + - in the final analysis + - in the nature of + - in the near future + - in the process of + - inception + - incumbent upon + - indicate + - indication + - initiate + - irregardless + - is applicable to + - is authorized to + - is responsible for + - it is + - it is essential + - it seems that + - it was + - magnitude + - maximum + - methodology + - minimize + - minimum + - modify + - monitor + - multiple + - necessitate + - nevertheless + - not certain + - not many + - not often + - not unless + - not unlike + - notwithstanding + - null and void + - numerous + - objective + - obligate + - obtain + - on the contrary + - on the other hand + - one particular + - optimum + - overall + - owing to the fact that + - participate + - particulars + - pass away + - pertaining to + - point in time + - portion + - possess + - preclude + - previously + - prior to + - prioritize + - procure + - proficiency + - provided that + - purchase + - put simply + - readily apparent + - refer back + - regarding + - relocate + - remainder + - remuneration + - requirement + - reside + - residence + - retain + - satisfy + - shall + - should you wish + - similar to + - solicit + - span across + - strategize + - subsequent + - substantial + - successfully complete + - sufficient + - terminate + - the month of + - the point I am trying to make + - therefore + - time period + - took advantage of + - transmit + - transpire + - type of + - until such time as + - utilization + - utilize + - validate + - various different + - what I mean to say is + - whether or not + - with respect to + - with the exception of + - witnessed diff --git a/styles/write-good/Weasel.yml b/styles/write-good/Weasel.yml new file mode 100644 index 0000000..d1d90a7 --- /dev/null +++ b/styles/write-good/Weasel.yml @@ -0,0 +1,29 @@ +extends: existence +message: "'%s' is a weasel word!" +ignorecase: true +level: warning +tokens: + - clearly + - completely + - exceedingly + - excellent + - extremely + - fairly + - huge + - interestingly + - is a number + - largely + - mostly + - obviously + - quite + - relatively + - remarkably + - several + - significantly + - substantially + - surprisingly + - tiny + - usually + - various + - vast + - very diff --git a/styles/write-good/meta.json b/styles/write-good/meta.json new file mode 100644 index 0000000..a115d28 --- /dev/null +++ b/styles/write-good/meta.json @@ -0,0 +1,4 @@ +{ + "feed": "https://github.com/errata-ai/write-good/releases.atom", + "vale_version": ">=1.0.0" +} diff --git a/submissions/images/apikey.gif b/submissions/images/apikey.gif new file mode 100644 index 0000000..3a35c5b Binary files /dev/null and b/submissions/images/apikey.gif differ diff --git a/submissions/images/email_notification.png b/submissions/images/email_notification.png new file mode 100644 index 0000000..7336e09 Binary files /dev/null and b/submissions/images/email_notification.png differ diff --git a/submissions/images/map.png b/submissions/images/map.png new file mode 100644 index 0000000..0f70dad Binary files /dev/null and b/submissions/images/map.png differ diff --git a/submissions/images/workflow_diagram.png b/submissions/images/workflow_diagram.png new file mode 100644 index 0000000..49eb7fb Binary files /dev/null and b/submissions/images/workflow_diagram.png differ diff --git a/submissions/mcwt_queendoline/setup.md b/submissions/mcwt_queendoline/setup.md new file mode 100644 index 0000000..17ddda1 --- /dev/null +++ b/submissions/mcwt_queendoline/setup.md @@ -0,0 +1,105 @@ +# Setup Guide: Multi-Currency Wallet Transfers with Chimoney API + +This guide will walk you through the essential steps to prepare your environment and obtain the necessary credentials before you begin integrating with Chimoney's Multi-Currency Wallet Transfer API. + +## 1. Prerequisites + +Before you start coding, ensure you have the following set up: + +- **A Chimoney developer account**: This is required to access the developer portal and manage your applications. To get access sign up at [sandbox.chimoney.io](https://sandbox.chimoney.io). +- **A new application on Your Chimoney developer dashboard**: This is crucial for generating and accessing your unique API key. +- **Node.js Installed**: We recommend the latest LTS version for running the JavaScript code samples. You can download it from [nodejs.org](https://nodejs.org). +- **An IDE**: We recommend a code editor like VsCode to write and manage your code. + + +## 2. Setup the development environment + +You'll need a tool to make your HTTP requests in JavaScript. In this guide we are using `axios` a popular, a HTTP client that simplifies making API calls from both Node.js and the browser. However, you can use any other HTTP client you are more comfortable with, such as the browser's `fetch` API. + +To install Axios, open your terminal, navigate to your project directory, and run the following command: + + ```bash + npm install axios +``` + +## 3. Get your Chimoney API key + +Your API key authenticates requests and links them to your Chimoney account, serving as a security token.You must include it with every API call you make. To get it, navigate to the [Chimoney developer portal](https://sandbox.chimoney.io/). From your developer dashboard, create a new application, and then generate your API key. Copy the key after it's generated. + +![Getting an API key](../images/apikey.gif) + +## 4. Authenticate API requests +To authenticate your API calls, you need to include your API key in the request headers. Here is a basic setup for your request headers in JavaScript. Remember to replace `YOUR_API_KEY` with the actual key you copied. + +```javascript +const headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'X-API-KEY': 'YOUR_API_KEY' // Replace 'YOUR_API_KEY' with your actual key +}; +``` + +## 5. Make your first API call +Now that you've set up your environment and secured your API key, it's time to make an API request. This step will confirm your setup is working correctly by initiating a multi-currency wallet transfer. + +The core of this request is the `transferDetails` object. This object holds all the information the API needs to process the transfer: the amount to send, the origin and destination currencies, and the recipient's email address. + +Below is a complete code example for making this request. Copy this into a new JavaScript file, the name of the file is totally up to you, (e.g `transfer.js`), and replace the placeholders with your actual API key and a test email address. + +Once you've saved the file, open your terminal, navigate to your project directory, and run the following command. `node server [JavaScript filename]` e.g `node server transfer.js`. + +```javascript +const axios = require('axios'); + +// Request body -- the transfer details + +const transferDetials = { + amountToSend: '50', + originCurrency: 'USD', + destinationCurrency: 'USD', + email: 'queendolineak@gmail.com' //Insert a test email address here +} +// API key and headers +const headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'X-API-KEY': 'YOUR API KEY' +}; + +// POST request +axios.post( + 'https://api-v2-sandbox.chimoney.io/v0.2.4/multicurrency-wallets/transfer', + transferDetails, + { headers } +) +.then(response => { + console.log('Transfer successful:', response.data); +}) +.catch(error => { + console.error('Transfer failed:', error.response?.data || error.message); +}); +``` +Upon a successful request, you should see a response in your terminal similar to the one below. This confirms that your setup is accurate and you can now communicate with the Chimoney API. + +```json +{ + "status": "success", + "message": "Payout to Chimoney wallets completed successfully.", + "data": { + "paymentLink": "https://sandbox.chimoney.io/pay/?issueID=...", + "chimoneys": [ + { + "id": "6jLD9Ynyd6qGLV4zHL9U", + "valueInUSD": "10", + "email": "queendolineak@gmail.com", + "destinationCurrency": "NGN", + "redeemLink": "https://sandbox.chimoney.io/redeem/?chi=..." + } + ] + } +} +``` + +With these steps completed, your environment is ready for more complex integrations and applications. The successful API call confirms your setup is correct and you can now begin exploring other Chimoney services." + +To learn more about the API's full capabilities and to get detailed information on multicurrency wallet transfers and other services, visit the Visit the official [Chimoney reference documentation](https://chimoney.readme.io/reference/post_v0-2-4-multicurrency-wallets-create). \ No newline at end of file diff --git a/submissions/mcwt_queendoline/tutorial.md b/submissions/mcwt_queendoline/tutorial.md new file mode 100644 index 0000000..42307d9 --- /dev/null +++ b/submissions/mcwt_queendoline/tutorial.md @@ -0,0 +1,182 @@ +# Implementing multi-currency wallet transfers with Chimoney API + +With over 180 currencies worldwide, you can’t always control where your recipients live. Chimoney APIs make cross-border payments seamless with a multi-currency wallet that supports transfers in USD, CAD, NGN, and more. + +In this tutorial, shows how to use Chimoney’s **multi-currency wallet transfer endpoint** to make cross-border payments. + +![Multicurrency transfers around the world](/submissions/images/map.png) + + +## Pre-requisites + +Before starting, it's important to understand the different environment that handle requests. The **sandbox environment** is a test space where you can experiment with the API using a demo account. It mimics the production environment but uses dummy data, and doesn’t involve real money. + +Whereas, **production environment** handles live transactions with real funds and it requires a verified Chimoney account, a live API key, and compliance with Chimoney’s security and legal standards. In this tutorial, use the Chimoney [sandbox environment](https://sandbox.chimoney.io/) to ensure a safe integration. + +Ensure that you have these set up to get started: + +- A Chimoney developer account: Sign up [here](https://sandbox.chimoney.io/) if you don't already have one. +- An app on your Chimoney dashboard: This gives you access to your API keys to authenticate your requests. +- An API Key: You need this to authenticate your requests.[Here is how to generate one from your developer dashboard](https://chimoney.readme.io/reference/sandbox-environment). +- Node.js: Install the latest [version](https://nodejs.org/en/download) to run the JavaScript code samples. +- An IDE: Use an IDE such as VsCode. + +After setting these up, you can start consuming the multiwallet transfer endpoint. + + +## API request details + +- **Method**: POST +- **Base URL**: `https://api-v2-sandbox.chimoney.io/v0.2.4/` +- **Endpoint**: `multicurrency-wallets/transfer` + + +## Step 1: Install axios + +Use the Axios library to send requests to the multi-wallet transfer endpoint. This approach keeps the code simple and clean. Open your terminal and run the command below to install Axios. + +```bash +npm install axios +``` +--- +After the installation, proceed to access your API keys from your dashboard. + + +## Step 2: Configure your Authentication + +From your Chimoney developer dashboard, copy your API Keys from the details of the app you created and add it to your request header. + +```javascript +// API key and headers +const headers = { + 'Content-Type': 'application/json', + Accept: 'application/json', + 'X-API-KEY': 'YOUR API KEY' +}; +``` + +--- + +## Step 3: Understanding the request body + +For a successful transfer, the request body needs a few key parameters. It must include the three required parameters and at least one recipient identifier and the other parameters, optional. + +### Required parameters + +The absence of any of these leads in an error: + +- `amountToSend`: The amount of money from the sender. +- `originCurrency`: The ISO currency code of the `amountToSend`. In the **sandbox environment** you only have access to a USD wallet. +- `destinationCurrency`:The currency the recipient receives the money in. Chimoney supports 130+ currencies, e.g NGN. + +### Recipient identification parameters + +You must provide exactly one of these to identify the recipient; +- `receiver` (string): The unique ID of the recipient's existing Chimoney Multi-Currency Wallet. +- `email` (string): The recipient's email address. They'll receive an email to redeem the funds. +- `PhoneNumber` (string): The recipient's phone number, in E.164 format (for example, +2348012345678). + +### Optional parameters + +- `Sender`: The multicurrency account of the sender. If not included, the money is transferred from the parent account instead, the account initially created with Chimoney. +- `Subaccount`: This allows you to send money from a subaccount. +- `Narration`: A short note attached to the transfer so the recipient understands the purpose of the transfer. +- `TurnOffNotification`:A boolean value (true/false) to enable or disable email and other recipient notifications. +- `sendViaInterledger`: If true, the transaction is through the (ILP) Interledger Protocol. This requires the sender and receiver to have valid interledger wallet addresses. Learn how to issue an interledger wallet [here](https://chimoney.readme.io/reference/post_v0-2-4-accounts-issue-wallet-address). + +Now that you understand the request body parameters, let's make a request to send $50 to a recipient’s email address. + +--- + +## Step 4: Send your request + +Create a JavaScript file (e.g., `server.js`), copy the code below and run the following command in your terminal `node server.[your javascript file name]`. + +```javascript +const axios = require('axios'); + +// Request body -- the transfer details + +const transferDetials = { + amountToSend: '50', + originCurrency: 'USD', + destinationCurrency: 'USD', + email: 'queendolineak@gmail.com' +} +// API key and headers +const headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'X-API-KEY': 'YOUR API KEY' +}; + +// POST request +axios.post( + 'https://api-v2-sandbox.chimoney.io/v0.2.4/multicurrency-wallets/transfer', + transferDetails, + { headers } +) +.then(response => { + console.log('Transfer successful:', response.data); +}) +.catch(error => { + console.error('Transfer failed:', error.response?.data || error.message); +}); +``` + +When you run the code, you should see a successful response in your terminal, like the one below, confirming that the transfer is successful. + +```json +{ + "status": "success", + "message": "Payout to Chimoney wallets completed successfully.", + "data": { + "paymentLink": "https://sandbox.chimoney.io/pay/?issueID=...", + "chimoneys": [ + { + "id": "6jLD9Ynyd6qGLV4zHL9U", + "valueInUSD": "10", + "email": "queendolineakpan11@gmail.com", + "destinationCurrency": "NGN", + "redeemLink": "https://sandbox.chimoney.io/redeem/?chi=..." + } + ] + } +} +``` + +> **Note**: For a full response object and response schema refer to the [Chimoney API reference documentation](https://chimoney.readme.io/reference/post_v0-2-4-multicurrency-wallets-transfer). + +In the sample code, we: + +- Created `transferDetails` object to hold necessary details needed for this transfer in the request body. In this case, sending $50 to the recipient with the email address of **queendolineak@gmail.com**. + +- Included the API key in the authorization header to ensure a secure and successful request. + +> **Note:** When building a production ready app, Never hardcode API keys directly into your client-side code or commit them to version control to prevent unauthorized access and potential misuse. + +- Using the `post` method from axios to send the `POST` request to the multicurrency-wallet-transfer endpoint. + + +The recipient also receives an instant email notification, letting them know that the funds are available for redemption. + +![Recipient's Email Notification](/submissions/images/email_notification.png) +--- + +## Common Errors and how to fix them + +If your request fails you may have hit any of the errors below; + +| HTTP CODE | Error | Resolution | +|-----------|------------------|---------------------------------------------------------------------------| +| 400 | Invalid Request | Check that you have included the required fields and recipient Identity. | +| 401 | Invalid API Key | Make sure the API Key is correct, or generate a new one from the portal. | +| 500 | Server Error | Retry the request. If it persists, contact Chimoney support. | + +--- + +## Conclusion + +And it's a wrap, you have successfully consumed the multicurrency-wallet-transfer endpoint from Chimoney, which is crucial for building applications that handle cross-border payments in today's world. + +Visit [the official Chimoney developer documentation](https://chimoney.io/developers-api/) to explore all the services and other endpoints provided by Chimoney that continue to make cross-border remittances a breeze. diff --git a/submissions/mcwt_queendoline/usecase.md b/submissions/mcwt_queendoline/usecase.md new file mode 100644 index 0000000..bd9d786 --- /dev/null +++ b/submissions/mcwt_queendoline/usecase.md @@ -0,0 +1,92 @@ +# Making Cross-Border Money Transfers Easier for Nigerians with Chimoney’s Multi-Currency Wallet + +Living and working abroad as a Nigerian comes with its own set of challenges, from adjusting to a new environment to staying emotionally and financially connected to loved ones at home. + +One thing most Nigerians in the diaspora will agree on is that being able to support family and friends back home brings a deep sense of joy, whether it’s supporting parents, taking care of siblings, handling emergency expenses, or funding a small business in Nigeria. + +> As Tope, a UK-based healthcare assistant, puts it: +> *“The hardest part of being away from family isn’t just missing them, it’s finding a reliable platform that actually makes sending money from the UK to Nigeria stress-free.”* + +With **Chimoney**, users have access to a **multi-currency wallet**, allowing them to hold funds in **USD, NGN, or CAD**, and effortlessly send money to recipients in **over 130 currencies worldwide**. Whether you’re sending **naira to Nigeria**, **pounds to the UK**, or **cedis to Ghana**, Chimoney handles the **exchange**, **transfer**, and **notifies the recipients in seconds**. + +Chimoney’s **API** makes it easy for platforms and developers to plug this functionality into their apps, so businesses and service providers can offer fast, borderless money transfers to their users, no matter where they are in the world. + + + +## Traditional Cross-Border Payment Limitations + +Back in the 90s, sending money to Nigeria was a hassle. People relied on travelers, relatives, or even postcard mail. Fast forward to the early 2000s, **international bank transfers** became common, but they came with high transaction fees and frustrating delays, often taking **5–7 business days** to reach recipients. + +These challenges made it nearly impossible for Nigerians in diaspora to support their families at home. Even today, despite the emergence of several cross-border payment platforms, many still report these frustrations: + +- High cross-border transaction fees +- Unfavorable exchange rates +- Transfer delays and a lack of real-time confirmation + + +## Solving Cross-Border Money Transfers Using Chimoney + +Among its array of powerful API services, the **Multi-Currency Wallet Transfer endpoint** +`POST /v0.2.4/multicurrency-wallets/transfer` offers a modern solution. by offering a multi-currency wallet that empowers users to hold funds in USD, NGN, or CAD and instantly send money to recipients in over 130 currencies worldwide. Compared to traditional remittance services, Chimoney ensures: + +- Transfers: Unlike slow bank wires, Chimoney instantly processes and routes payments, notifying recipients in seconds. + +- Flexible Redemption Options: Recipients in Nigeria can redeem funds in the way that works best for them—via direct bank deposit, airtime, or a gift card. + +- Significantly Lower Fees: Chimoney’s simplifies process bypasses traditional banking intermediaries, resulting in more favorable exchange rates and lower fees. + +- Developer-First Approach: By providing a simple, well-documented API, Chimoney enables businesses and platforms to offer cross-border payments as a core feature of their own applications. + +This endpoint handles all the complexity, from currency conversion to a fast and secure transfer of funds, behind the scenes. + + +## Transfer Workflow via Multicurrency Transfers + +Let’s walk through a typical scenario where someone living abroad, like **Tope**, uses an application integrated with Chimoney’s API to seamlessly send money to a loved one in Nigeria: + +### Step 1: Recipient Data Collection + +Set up the application to allow the user to input and gather the required details to initiate the transaction: + +- Amount to be sent +- Recipient’s identifier: email, phone number, or multicurrency wallet details +- Target currency for the recipient, in this case, **NGN** + +### Step 2: Application Calls Chimoney API + +When the sender clicks **"Send Money"** in the app, the application sends a `POST` request to: +`/multicurrency-wallets/transfer` + +This request includes the prepared data from Step 1 and is **authenticated** using an **API Key** from the developer dashboard. + +### Step 3: Chimoney Processes & Converts Funds + +Upon receiving the request, Chimoney’s API instantly processes: + +- **Currency conversion** from the sender’s currency to the recipient’s (e.g., USD → NGN) +- **Payment routing** to the recipient’s details + +### Step 4: Recipient Gets Notified + +The recipient in Nigeria receives an **instant notification** via **email** or **WhatsApp**, alerting them that funds are available. +They can **redeem** the money via: + +- Direct deposit into a Nigerian bank account +- Airtime +- Gift card + +![Recipient's Email Notification](/submissions/images/email_notification.png) + +### Step 5: Transfer Confirmation + +The Chimoney API sends an immediate success response to the application, confirming the transaction. This allows for real-time tracking and offers transparency and peace of mind for the sender. + +![Transfer Workflow via Multicurrency Transfers](/submissions/images/workflow_diagram.png) + +## The Power of Chimoney’s Multi-Currency Transfers + +Integrating Chimoney’s Multi-Currency Transfer endpoint doesn't just make cross-border payments easy,it transforms how individuals support their families globally and empowers businesses to operate on a global scale. Whether you're sending a monthly allowance or an emergency fund, Chimoney simplifies the entire experience. + +The power of this solution extends beyond the end-user. By integrating the Chimoney API directly into their systems, companies can unlock new business opportunities and create a better user experience for making global payments. These powerful features become a core part of their service offering: + +Whether you're in the **UK**, **US**, or **Canada**, Nigerians abroad can send money or carry out transactions in Nigeria, stress-free and from the comfort of their homes.