-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deps): connect shareable linters dva
- Loading branch information
1 parent
712a076
commit 798252c
Showing
26 changed files
with
32,860 additions
and
1,536 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run check-all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,8 @@ | ||
{ | ||
"workbench.colorCustomizations": { | ||
"titleBar.activeForeground": "#fff", | ||
"titleBar.inactiveForeground": "#ffffffcc", | ||
"titleBar.activeBackground": "#FF2C70", | ||
"titleBar.inactiveBackground": "#FF2C70CC" | ||
}, | ||
// These are all my auto-save configs | ||
"editor.formatOnSave": true, | ||
// turn it off for JS and JSX, we will do this via eslint | ||
"[javascript]": { | ||
"editor.formatOnSave": false | ||
}, | ||
"[javascriptreact]": { | ||
"editor.formatOnSave": false | ||
}, | ||
// tell the ESLint plugin to run on save | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true | ||
}, | ||
// Optional BUT IMPORTANT: If you have the prettier extension enabled for other languages like CSS and HTML, turn it off for JS since we are doing it through Eslint already | ||
"prettier.disableLanguages": [ | ||
"javascript", | ||
"javascriptreact" | ||
], | ||
"workbench.colorCustomizations": { | ||
"titleBar.activeForeground": "#fff", | ||
"titleBar.inactiveForeground": "#ffffffcc", | ||
"titleBar.activeBackground": "#FF2C70", | ||
"titleBar.inactiveBackground": "#FF2C70CC" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* Core */ | ||
import React from 'react'; | ||
import PatchEvent, { set, unset } from 'part:@sanity/form-builder/patch-event'; | ||
|
||
/* Instruments */ | ||
import { formatMonet } from '../helpers'; | ||
|
||
export const PriceInput: React.FC<PriceInputProps> = props => { | ||
const { type, value, onChange, inputComponent } = props; | ||
|
||
const handleChange = event => onChange(createPatchFrom(event.target.value)); | ||
|
||
return ( | ||
<div> | ||
<h2> | ||
{type.title} - {value ? formatMonet(value / 100) : ''} | ||
</h2> | ||
<p>{type.description}</p> | ||
<input | ||
ref = { inputComponent } | ||
type = { type.name } | ||
value = { value } | ||
onChange = { handleChange } | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
PriceInput.focus = function () { | ||
this._inputElement.focus(); | ||
}; | ||
|
||
/* Helpers */ | ||
function createPatchFrom(value) { | ||
return PatchEvent.from(value === '' ? unset() : set(Number(value))); | ||
} | ||
|
||
/* Types */ | ||
interface PriceInputProps {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './PriceInputs'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"#": "Used by Sanity to keep track of configuration file checksums, do not delete or modify!", | ||
"@sanity/default-layout": "bb034f391ba508a6ca8cd971967cbedeb131c4d19b17b28a0895f32db5d568ea", | ||
"@sanity/default-login": "6fb6d3800aa71346e1b84d95bbcaa287879456f2922372bb0294e30b968cd37f", | ||
"@sanity/form-builder": "b38478227ba5e22c91981da4b53436df22e48ff25238a55a973ed620be5068aa", | ||
"@sanity/data-aspects": "d199e2c199b3e26cd28b68dc84d7fc01c9186bf5089580f2e2446994d36b3cb6", | ||
"@sanity/google-maps-input": "57ae3a403ce6a070b31ec6fa1f3c8339cafa66661eaddba1d4d5ee3cc2197ec2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"listOptions": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"toolSwitcher": { | ||
"order": [], | ||
"hidden": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"providers": { | ||
"mode": "append", | ||
"redirectOnSingle": false, | ||
"entries": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"images": { | ||
"directUploads": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"apiKey": null, | ||
"defaultZoom": 11, | ||
"defaultLocation": { | ||
"lat": 40.7058254, | ||
"lng": -74.1180863 | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export const formatMonet = Intl.NumberFormat('en-CA', { | ||
style: 'currency', | ||
currency: 'CAD', | ||
}).format; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './formatMoney'; |
Oops, something went wrong.