Skip to content

Commit

Permalink
@todos - remove some outdated
Browse files Browse the repository at this point in the history
  • Loading branch information
aretecode committed Apr 22, 2019
1 parent 2c38d93 commit 027eed2
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 33 deletions.
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const resolveApp = relativePath => resolve(appDirectory, relativePath)

/**
* @see https://zeit.co/examples/nextjs/
* @todo @see https://zeit.co/docs/v2/deployments/ignoring-source-paths
* @see https://zeit.co/docs/v2/deployments/ignoring-source-paths
* @see https://github.com/hanford/next-offline/tree/master/examples/now2
*
* @todo add DefinePlugin
Expand Down
1 change: 0 additions & 1 deletion pages/About/AboutPage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* @see https://material.io/design/components/cards.html#actions
* @file @todo move out the `⇔` @@hack
*
* @todo on mobile, could expand to full screen
*/
import * as React from 'react'
Expand Down
3 changes: 0 additions & 3 deletions pages/Portfolio/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ export const StyledTime = styled.time`
/**
* @see https://developers.google.com/web/fundamentals/performance/lazy-loading-guidance/images-and-video/
* @see https://addyosmani.com/blog/lazy-loading/
*
* @todo @@styles probably should align the card image to center
* and add blur mirror effect to sides for consistency
*/
export const StyledCardImage = styled(ObservablePicture).attrs({
loading: 'lazy',
Expand Down
2 changes: 1 addition & 1 deletion pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default class MyApp extends App<{
/**
* @note !!! this does not properly ssr if we render `<App>` (even if we pass in apolloClient) !!!
* @description Run all GraphQL queries
* @todo this is really bad @@perf
* @note this is really bad @@perf
* @description ideally we would combine this into a single tree walking
* to get other data needed in ssr to rehydrate from
* @note this uses old `Context`
Expand Down
2 changes: 0 additions & 2 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* @see https://developers.google.com/web/fundamentals/performance/resource-prioritization#preconnect
* @see https://css-tricks.com/prefetching-preloading-prebrowsing/#article-header-id-3
* @see https://medium.com/clio-calliope/making-google-fonts-faster-aadf3c02a36d
*
* @todo https://stackoverflow.com/questions/51619109/next-js-pwa-service-worker-manifest-json
*/
import * as React from 'react'
import Document, {
Expand Down
7 changes: 3 additions & 4 deletions src/apolloClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* @see https://github.com/bitinn/node-fetch/issues/49
* @see https://github.com/apollographql/apollo-link/issues/83
* @see https://github.com/github/fetch#sending-cookies
* @todo https://www.apollographql.com/docs/react/features/performance.html#cache-redirects
* @see https://www.apollographql.com/docs/react/features/performance.html#cache-redirects
* @see https://github.com/zeit/next.js/blob/master/examples/with-apollo/lib/init-apollo.js
* @todo https://www.apollographql.com/docs/link/links/state < docs are not accurate for apollo-boost with state link
* @note https://www.apollographql.com/docs/link/links/state < docs are not accurate for apollo-boost with state link
*/
import {
ApolloClient,
Expand Down Expand Up @@ -130,7 +130,7 @@ export function createInstance(
const cache = inMemoryCache.restore(initialState)

/**
* @todo currently only used for test env because
* @note currently only used for test env because
* - it's hijacking the http request
* - we switched to the apollo server graphql
*/
Expand All @@ -143,7 +143,6 @@ export function createInstance(
})

/**
* @todo
* @requires https://github.com/apollographql/apollo-client/blob/master/docs/source/recipes/server-side-rendering.md#store-rehydration
* @see https://github.com/apollographql/apollo-client/issues/1419
* @see https://github.com/apollographql/apollo-client/blob/82a846c9591bcff975cc28d3786105b80a49b4ba/src/queries/queryTransform.ts#L30
Expand Down
4 changes: 0 additions & 4 deletions src/features/AmpContext.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
/**
* * @todo need an `AmpContext`
* - tweak which tag is used (_can change with `as=`_)
* - detect with query in req
*
* @todo @@perf https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer
*/
import { createContext } from 'react'
Expand Down
3 changes: 0 additions & 3 deletions src/features/GoogleDocument.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
* @todo typings on `JSX.IntrinsicElements` in globals to extend the module for amp
*/
import * as React from 'react'
import Head from 'next/head'
import { PortfolioContext, PortfolioContextType } from './PortfolioContext'
Expand Down
8 changes: 1 addition & 7 deletions src/features/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import { keep } from '../utils/keep'
/**
* @see https://amp.dev/documentation/components/amp-img
* @see https://amp.dev/documentation/guides-and-tutorials/learn/common_attributes
* @todo ^ add typings
* @todo get image width & height on node side (which is rendered on server only anyway if in amp context)
* could add ^ add typings when needed for every amp component in typings file
* @see https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images#Art_direction
* @see https://stackoverflow.com/questions/12539918/get-the-width-and-height-of-an-image-in-node-js
*/
Expand Down Expand Up @@ -79,8 +78,6 @@ export type ImageProps = (ImagePureProps & ImageAmpProps) & ImageReactProps
/**
* can add `<noscript><img>` inside
* @see https://amp.dev/documentation/examples/components/amp-img/?referrer=ampbyexample.com
* @todo add `srcset` because they don't stretch
* @todo add renderImage for customization with styled-components to receive states?
*/
export class ImageComponentWithoutForwardRef extends React.PureComponent<
ImageProps
Expand All @@ -90,9 +87,6 @@ export class ImageComponentWithoutForwardRef extends React.PureComponent<

render() {
if (this.context.isAmp === false) {
/**
* @todo we may want to remove, but we only need to give this to amp
*/
const {
isIntersecting,
height,
Expand Down
2 changes: 1 addition & 1 deletion src/features/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as React from 'react'
*/
import { LinkProps } from 'react-router-dom'
/**
* @todo @see https://raw.githubusercontent.com/zeit/next.js/canary/packages/next/client/link.js
* @see https://raw.githubusercontent.com/zeit/next.js/canary/packages/next/client/link.js
* ^ does not accept className
* @see https://github.com/zeit/next.js/issues/1942#issuecomment-313925454
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const cache = new Map()

/**
* @see https://github.com/styled-components/styled-components/issues/378
* @todo https://github.com/nfl/react-helmet/issues/216
* @see https://github.com/nfl/react-helmet/issues/216
*/
function renderHelmet(helmetObj: HelmetData) {
return (
Expand Down
3 changes: 2 additions & 1 deletion src/utils/measureImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import { NO_OP } from './EMPTY'

/**
* @see https://www.npmjs.com/package/image-size
* @todo this mis-identifies image types since it gets it from the url instead of response
* @note this mis-identifies image types since it gets it from the url instead of response
* though this does not affect ours
*/
const sizeOf = process.browser ? NO_OP : require('image-size')

Expand Down
6 changes: 2 additions & 4 deletions stylelint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @see http://2.bp.blogspot.com/-41v6n3Vaf5s/UeRN_XJ0keI/AAAAAAAAN2Y/YxIHhddGiaw/s1600/css.gif
* https://stylelint.io/user-guide/faq/#how-do-i-configure-the--pattern-rules-for-common-css-naming-conventions-like-kebab-case
* https://stylelint.io/user-guide/faq/#how-do-i-configure-the--pattern-rules-for-common-css-naming-conventions-like-kebab-case
* http://bradfrost.com/blog/post/atomic-web-design/
*/

Expand Down Expand Up @@ -51,7 +51,6 @@ module.exports = {
// },
// ],

// @TODO
// 'shorthand-property-no-redundant-values': false,
'selector-class-pattern': '^([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
'at-rule-name-case': 'lower',
Expand Down Expand Up @@ -108,9 +107,8 @@ module.exports = {
'function-parentheses-newline-inside': 'always-multi-line',
'function-parentheses-space-inside': 'never-single-line',
'function-whitespace-after': 'always',
'indentation': 2,
indentation: 2,

// @TODO more js style names soon
// 'function-name-case': 'camel',
// 'media-feature-name-case': 'lower',

Expand Down

0 comments on commit 027eed2

Please sign in to comment.