export const fullScreenSelector = createSelector([getFullscreen], (fullscreen) => fullscreen);
export const fullScreenSelector = createSelector(
[getFullscreen],
fullscreen => fullscreen
);
function restoreScript( elem ) {
if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
elem.type = elem.type.slice( 5 );
} else {
elem.removeAttribute( "type" );
}
return elem;
}
Prettier is not a replacement for eslint
module.exports = {
singleQuote: true,
arrowParens: 'always'
};
export default function dialsReducer(state: DialsState = initialState ): DialsState {
if (action.type === DIALS_SET_DIALS) {
return {
...action.payload
}
}
return state
}
export default function dialsReducer(
state: DialsState = initialState
): DialsState {
if (action.type === DIALS_SET_DIALS) {
return {
...action.payload
};
}
return state;
}
export interface ConfigState {
readonly staticAssetsPath: string;
readonly host: string
readonly iblBaseUrl: string,
}
export interface ConfigState {
readonly staticAssetsPath: string;
readonly host: string;
readonly iblBaseUrl: string;
}
| | |
| -------- | ---|
| Service| Node|
| Platform| Cosmos|
| Language| Node|
| | |
| -------- | ------ |
| Service | Node |
| Platform | Cosmos |
| Language | Node |
function mapDispatchToProps(dispatch) {
return {
showDownloadModal: () => dispatch(setModalVisiblity(ModalType.Download, true)),
toggleAdded: () => dispatch(toggleAdded())
};
}
function mapDispatchToProps(dispatch) {
return {
showDownloadModal: () =>
dispatch(setModalVisiblity(ModalType.Download, true)),
toggleAdded: () => dispatch(toggleAdded())
};
}
export const LONG_LIFE_PID_WITH_SUBTITLE = '/iplayer/episode/p00y1h7j/adventure-quest-under-capricorn-5-bush-walkabout';
export const LONG_LIFE_PID_WITH_SUBTITLE =
"/iplayer/episode/p00y1h7j/adventure-quest-under-capricorn-5-bush-walkabout";
const str = `bbc-ipd:download/${episode.id}/${version.id}/${quality}/${downloadKind}/${completeTitleEncoded}/${episode.tleoId}/${titleEncoded}`;
const str = `bbc-ipd:download/${episode.id}/${
version.id
}/${quality}/${downloadKind}/${completeTitleEncoded}/${
episode.tleoId
}/${titleEncoded}`;
yarn add --dev prettier
{
// ..
"scripts": {
// ..
"format": "prettier --write '**/*.{js,json,jsx,md}'",
"format:check": "prettier --check '**/*.{js,json,jsx,md}'"
}
}
// .eslintrc
{
"root": true,
"extends": [
"standard",
"prettier",
"prettier/standard"
]
}