From 939886af549377e2934d91fec08122c79d92f9f3 Mon Sep 17 00:00:00 2001 From: Greg Rickaby Date: Fri, 5 Feb 2021 08:31:27 -0600 Subject: [PATCH] add link to documentation --- .env.sample | 2 ++ .eslintrc.js | 1 + api/algolia/connector.js | 3 ++- api/apolloConfig.js | 5 ++++- postcss.config.js | 1 + prettier.config.js | 1 + stylelint.config.js | 1 + tailwind.config.js | 1 + 8 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.env.sample b/.env.sample index b303dd7e0..a359217e1 100644 --- a/.env.sample +++ b/.env.sample @@ -1,3 +1,5 @@ +# Learn more about ENV variables at https://github.com/WebDevStudios/nextjs-wordpress-starter/wiki + # Tells next.js we're in development mode VERCEL_ENV="development" diff --git a/.eslintrc.js b/.eslintrc.js index cefa00a0d..5121e1e4d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,3 +1,4 @@ +// https://eslint.org/docs/user-guide/configuring/ module.exports = { parserOptions: { ecmaFeatures: { diff --git a/api/algolia/connector.js b/api/algolia/connector.js index 4eb8f1acb..180a29d4a 100644 --- a/api/algolia/connector.js +++ b/api/algolia/connector.js @@ -1,5 +1,5 @@ -import algoliasearch from 'algoliasearch/lite' import getEnvVar from '@/functions/getEnvVar' +import algoliasearch from 'algoliasearch/lite' // Define env vars. export const algoliaIndexName = getEnvVar('ALGOLIA_INDEX_NAME', true) @@ -8,6 +8,7 @@ export const algoliaAppId = process.env.NEXT_PUBLIC_ALGOLIA_APPLICATION_ID const algoliaClient = algoliasearch(algoliaAppId, algoliaSearchKey) +// https://www.algolia.com/doc/api-client/getting-started/what-is-the-api-client/javascript/?client=javascript export const searchClient = { search(requests) { if (requests.every(({params}) => !params.query)) { diff --git a/api/apolloConfig.js b/api/apolloConfig.js index dacfcd85c..26b9ea073 100644 --- a/api/apolloConfig.js +++ b/api/apolloConfig.js @@ -1,6 +1,6 @@ -import {useMemo} from 'react' import merge from 'deepmerge' import isEqual from 'lodash/isEqual' +import {useMemo} from 'react' import {initializeWpApollo} from './wordpress/connector' // Set global state name. @@ -10,6 +10,9 @@ export const APOLLO_STATE_PROP_NAME = '__APOLLO_STATE__' * Init Apollo and merge with initial state. * * @author WebDevStudios + * + * @see https://www.apollographql.com/docs/react/get-started/ + * * @param {object} apolloClient Apollo client instance. * @param {*} initialState The initial state of things. * @return {object} Apollo client instance. diff --git a/postcss.config.js b/postcss.config.js index 0c622f72c..fa49e90dd 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,3 +1,4 @@ +// https://nextjs.org/docs/advanced-features/customizing-postcss-config#customizing-plugins module.exports = { plugins: { tailwindcss: {}, diff --git a/prettier.config.js b/prettier.config.js index 762c4195a..a7bb0363a 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -1,3 +1,4 @@ +// https://prettier.io/docs/en/configuration.html module.exports = { tabWidth: 2, useTabs: false, diff --git a/stylelint.config.js b/stylelint.config.js index 4d980d403..ba650d78e 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -1,3 +1,4 @@ +// https://stylelint.io/user-guide/configure module.exports = { extends: ['stylelint-config-standard'], rules: { diff --git a/tailwind.config.js b/tailwind.config.js index 67a42f498..d1c4565c8 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,3 +1,4 @@ +// https://tailwindcss.com/docs/installation#create-your-configuration-file module.exports = { purge: { content: [