Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for "jsx": "preserve" config #63

Closed
Igmat opened this issue Nov 28, 2016 · 18 comments
Closed

Support for "jsx": "preserve" config #63

Igmat opened this issue Nov 28, 2016 · 18 comments

Comments

@Igmat
Copy link
Contributor

Igmat commented Nov 28, 2016

After issue #58 I've realized that we have no support for this options in config which leads to errors that user can't understand.
Possible solutions:

  1. Find a way to activate babel-jest transformer from jest config after ts-jest applied.
  2. Inform user that this option is not allowed and use "jsx": "react" instead.
  3. Include babel-jest transformer in our package and run it if "jsx": "preserve" is used.

As for me third solution seems to be the worst.
First of all we have to create tests for this case.

@Igmat Igmat changed the title Support for "jsx": "preserve" config Support for "jsx": "preserve" config Nov 28, 2016
@mike-morr
Copy link

I would prefer #2. Number 1 is a lot of overhead and adds another source of failure and inconsistency. Especially for source mapping.

@basarat
Copy link

basarat commented Dec 28, 2016

2 sounds best to me too 🌹

@JakeGinnivan
Copy link

JakeGinnivan commented Dec 29, 2016

I think it's pretty common, babel transpiles JSX faster than TypeScript does. Also there are a heap of useful JSX plugins for babel. awesome-typescript-loader does similar to option 3 and makes babel an option in it's config.

Also, option 3 is probably easier to control than a config point which can be misconfigured?

btw, this project looks quite promising and will be taking for a spin later tonight :)

@jbrantly
Copy link

FWIW I ran into this and I found the information at jestjs/jest#1466 (comment) to be very helpful. Seems very easy to manually chain babel-jest after a TS transform. I'm with @JakeGinnivan that this is probably pretty common due to the optimizing JSX plugins that Babel has like react-constant-elements and react-inline-elements

@jbrantly
Copy link

jbrantly commented Feb 8, 2017

BTW, I think this issue is bigger than just JSX. There are a lot of other things that Babel can do beyond just JSX (for instance, the actual implementation side of "allowSyntheticDefaultImports"). I tend to use TypeScript for type-checking and Babel for transpilation for this reason.

Additionally, while I was able to easily chain TypeScript and Babel using a custom preprocessor, I can't quite get code coverage working. So in the case of 1 or 3, some additional work might be needed to make sure code coverage still works. And if anyone has any tips on making that work manually that'd be awesome.

@havenchyk
Copy link

that would be nice to reopen this issue

@GeeWee
Copy link
Collaborator

GeeWee commented Jan 2, 2018

This should be possible by using a .babelrc file now I think.

@havenchyk
Copy link

@GeeWee could you please shed some light? how is it possible?

@GeeWee
Copy link
Collaborator

GeeWee commented Jan 5, 2018

Sure, if you set tsconfig to preserve, set the useBabelRc flag to true, and have a .babelrc file in the project(https://github.com/kulshekhar/ts-jest#using-babelrc), you should be able to do additional processing of the files.

@kelly-tock
Copy link

kelly-tock commented Jul 24, 2018

I can't seem to get a react element test to work with ts-jest, and tsconfig: preserve. I reproduced the test using https://github.com/wmonk/create-react-app-typescript, so I know my test is ok.

TypeScript compiler encountered syntax errors while transpiling. Errors: '>' expected.,Unterminated regular expression literal.,',' expected.,')' expected.

I tried setting it to react in jsx, still same message.

my transforms:

    "^.+\\.(js|jsx)$": "<rootDir>/node_modules/babel-jest",
    "^.+\\.(ts|tsx)$": "ts-jest",

any ideas what that message means?

non react tests work like a charm thus far.

@stephenotalora
Copy link

stephenotalora commented Dec 24, 2018

I'm having the same issue non react tests work as expected, however all react tests fail with the same issue. I have tried to set my tsconfig.json to all jsx enum options and I still fail to get jest to run with jsx. 😭 any help on this would be highly appreciated.

it looks like is trying to get into node_modules despite me explicitly setting tsconfig to exclude this directory. BTW I have tried both manual jest.config.js as well as jest.preset set to ts-jest and I always seem to run into the same issue.

Error when jsx is set to react

yarn test
yarn run v1.9.4
$ jest
 FAIL  packages/common/tests/components/Container.test.tsx
  ● Test suite failed to run

    /personal-projects/beluga-apps/node_modules/react-native/Libraries/StyleSheet/StyleSheet.js:18
    import type {
           ^^^^

    SyntaxError: Unexpected identifier

      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:403:17)
      at Object.get StyleSheet [as StyleSheet] (node_modules/react-native/Libraries/react-native/react-native-implementation.js:255:12)
      at Object.<anonymous> (node_modules/styled-components/native/dist/styled-components.native.cjs.js:6478:44)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        2.654s

error when jsx is set to react-native or preserve

 component: enzyme_1.shallow(<Container_1.default {...props}/>)
                                    ^

    SyntaxError: Unexpected token <

input on this would be much appreciated. Thanks!

@dimpu
Copy link

dimpu commented Mar 4, 2021

Any update on this ? I have same issue.

@Ethaan
Copy link

Ethaan commented Mar 18, 2021

NextJS moves preserve when building, and i can't find a way to fix this

@roeniss
Copy link

roeniss commented May 25, 2021

@kulshekhar Can we open this issue again?

As @Ethaan mentioned, when I execute yarn analyze, NextJS forcefully change my jsx settings from react to preserve.

The following mandatory changes were made to your tsconfig.json:

        - jsx was set to preserve (next.js implements its own optimized jsx transform)

and I only succeed Jest tests when that option is set to react as same as @stephenotalora :

❯❯❯ yarn test
yarn run v1.22.10
$ node --experimental-vm-modules node_modules/.bin/jest
(node:17067) ExperimentalWarning: VM Modules is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
 FAIL  tests/home.test.tsx
  ● Test suite failed to run

    Jest encountered an unexpected token

    Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

    Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.

    By default "node_modules" folder is ignored by transformers.

    Here's what you can do:
     • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
     • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
     • If you need a custom transformation specify a "transform" option in your config.
     • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.

    You'll find more details and examples of these config options in the docs:
    https://jestjs.io/docs/configuration
    For information about custom transformations, see:
    https://jestjs.io/docs/code-transformation

    Details:

    /Users/roeniss/workspace/Relay-Homepage/client/tests/home.test.tsx:10
        react_test_renderer_1.default.create(<pages_1.default />);
                                             ^

    SyntaxError: Unexpected token '<'

      at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1479:14)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        3.046 s

when I set jsx option to react, everything is fine.

@ahnpnl
Copy link
Collaborator

ahnpnl commented May 25, 2021

would you pls provide a repo to check the issue?

@roeniss
Copy link

roeniss commented May 25, 2021

@ahnpnl First, I announced that I solved this issue using tsconfig.test.json. original source but as you can imagine I'm not sure if this is a good way to solve it.

BTW this is my code.

@ahnpnl
Copy link
Collaborator

ahnpnl commented May 25, 2021

ts-jest only compiles ts to js based on the tsconfig provided which is equivalent to running tsc.

If not provided via tsconfig option, default ts-jest will fall back to tsconfig.json. Your solution is correct because that is the recommended way to do. You should always have separate tsconfig for normal codes and for Jest codes.

@quanru
Copy link

quanru commented Nov 2, 2021

that would be nice to reopen this issue

rocketnova added a commit to navapbc/template-infra that referenced this issue Jun 7, 2022
rocketnova added a commit to navapbc/template-infra that referenced this issue Jun 16, 2022
…xt.js (#9)

Create a separate tsconfig file to specify jsx mode.

Next.js requires the typescript jsx mode to be `preserve`, but ts-jest
needs it to be a flavor of `react`. See:

- https://www.typescriptlang.org/docs/handbook/jsx.html
- https://kulshekhar.github.io/ts-jest/docs/getting-started/options/tsconfig
- kulshekhar/ts-jest#63 (comment)
- vercel/next.js#19155 (reply in thread)
karinamzalez pushed a commit to navapbc/wic-mt-demo-project-eligibility-screener that referenced this issue Jul 28, 2022
* Initial commit.

* Create initial folder structure (#1)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* WMDP-26 Set Up PR Template (#2)

Changes
added a .github folder which should store all github related processes (e.g. github actions, and templates)
added PR template
Context for reviewers
We want to establish a consistent pull request template that we’ll use.

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add eslintrc.js

* add stories dir and examples

* .eslint.js: prettier updates to eslint file

* add storybook dependencies

* Fix pull request template conflict (#8)

- Fixed the filename case conflict between `.github/PULL_REQUEST_TEMPLATE.md` and `.github/pull_request_template.md`
- Updated the pull request template to be slightly more generic

* Karina/wmdp 61 initial nextjs setup (#4)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* Karina/wmdp 35 setup test suite (#5)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README: add tsconfig documentation

* README: add test script documentation

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Karina/wmdp 33 linter typechecker (#6)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update package.json

add scripts to package.json

* run prettier

* add checkJs to tsconfig, remove duplicate code from js files

* add typescript parser and implement type information with linting

* eslintrc: add prettier recommended plugin

* preettierrc: add trailing comma check, remove redundant code

* README: add auto-generated modified note

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* re-add localesubpaths to next.config.js

* tsconfig.json: remove inline comment

* README: add docimentation for eslint and tsconfig

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README - add documentation for test

* README: add tsconfig documentation

* README: add test script documentation

* README: add documentation for dependencies

* yarn.lock

* Update app/__mocks__/styleMock.js

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* fix eslint errors

* WIP

* Create a separate tsconfig file to specify jsx mode for ts-jest vs next.js (#9)

Create a separate tsconfig file to specify jsx mode.

Next.js requires the typescript jsx mode to be `preserve`, but ts-jest
needs it to be a flavor of `react`. See:

- https://www.typescriptlang.org/docs/handbook/jsx.html
- https://kulshekhar.github.io/ts-jest/docs/getting-started/options/tsconfig
- kulshekhar/ts-jest#63 (comment)
- vercel/next.js#19155 (reply in thread)

* add home page story and uswds dependency

* update dependencies

* add uswds

* support sass in storybook

* fix eslint errors (#10)

* fix eslint errors

* update prettier and linting rules so that they're compatible

* add new eslint rule to README

* WIP - debugging uswds storybook with Rocket

* add storybook static to git ignore

* Remove storybook-static.

* Dockerize the application.

* Create LICENSE.md using Apache 2.0 (#13)

* Dockerize the application (#12)

* WIP.

* Both next.js and storybook working.

* USWDS 3.x instructions require uswds-compile. Can't use next.js or storybook sass without more unknown glue.

* Clean up unnecessary WIP stuff.

* Refactor to use same naming convention for all uswds assets. Add comments.

* Update dockerization to better support local development.

* Remove extraneous yarn command.

* Run formatter.

* Write some brief documentation.

* Fix typo.

* setup CI for NextJS template app (#16)

* Let prettier format project files.

* Run prettier via yarn format.

* Let prettier format project files (#17)

* yarn: add next.intl

* add messages directory with english and spanish json messages pages

* .storybook/preview: set up next-intl with storybook

* next.config: update next local config for itnernationalization

* app.tsx: add next-intl local/messages provider for internationalization

* tests: add nextintlprovider to jest tests, update snapshots

* update gulp

* create src directories -- move src folders

* add tests and stories for Layout and Index

* add scss loading for storybook

* run linter and prettier

* run prettier

* run prettier and lint

* update yarn.lock

* add prettier alphabetize imports -- add storybook-static to prettier ignore

* show compile warnigns

* remove space

* add container background

* WIP: successfully leveraging built-in nextjs sass compiling.

* Working storybook + nextjs + sass + uswds build.

- Drops support for [CSS
  modules](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css)
- Drops requirement for Gulp and USWDS compile
- Requires postcss and postcss-loader, which storybook says should be
  deprecated

* wip

* delete deprecated flies, add yarn.lock

* add welcome and eligibility page

* update ci.yml (#19)

* Run prettier.

* Update packages.

* Simplify docker. Update README. Use postinstalll script.

* Fix postinstall command.

* Tell prettier to ignore USWDS static assets.

* Disable nextjs telemetry.

* refactor

* jest

* test wip

* Add -p flag to creating public dir so mkdir doesn't error.

* Change comment style so we don't get unnecessary indents.

* Refactor which files storybook recognizes as stories.

* Use storybook lazy compilation.

* Remove no longer needed gulpfile.

* Unpin package versions; use at least instead.

* Remove no longer needed css import.

* add stories

* run prettier, no trailing comma

* correct linting errors

* Remove storybook lazy compilation. Not working.

* Remove non-essential storybook dependencies.

* Don't bind mount node_modules.

* delete depracated code

* host fonts locally for easier sb and jest setup and wider browser support

* support tsconfig module imports in jest and sb

* Switch base image to alpine.

* Run yarn format.

* Update README about node_modules in docker.

* setup next-i18next in project, jest, and sb -- todo: get sb globe to render

* Run formatter.

* Streamline docker build even more.

* Remove no longer installed storybook addons.

* Remove storybook-addon-i18next.

* Run formatter.

* Try storybook-i18n addon. Not quite right.

* Match eslint rule for space before parens to rule as described in README.

* Match prettier and eslint for trailing commas.

* Use the storybook-react-i18next addon for internationalization in storybook.

* Remove wip test of fs package.

* Restore homepage to previous state.

* Document i18n config.

* add storybook-static to git ignore

* add import order to prettier

* add src/ - move pages to src

* app- update import

* public: update translations

* _app.tsx: add Layout to app

* add components dir and Layout component

* index: update deprecated index layout

* update template styles

* update index story

* apply title class to template title

* update tests and stories

* run prettier - add prettier-plugin-sort-imports

* run eslint - add JSX global to linter

* fix translation

* yarn format and delete dead code

* run lint

* Copy over application-template-nextjs at ca2cc15.

Install and configure storybook, sass, and USWDS 3.0 [#15](navapbc/template-application-nextjs#15)

- Install and configure storybook
- Create the first story
- Install and configure [USWDS 3.0](https://designsystem.digital.gov/) as the design system
- Modify `Dockerfile` and `docker-compose.yml` to support USWDS and storybook
- Gitignore storybook, uswds assets, and compiled css
- Prettier ignore uswds assets
- Use postinstall hook to copy uswds static assets
- Stop using CSS modules
- Update some package dependencies
- Switch Docker base image to use alpine for increased speed

* Copy over application-template-nextjs at cd06ba6.

Setup i18n for next.js, jest, and storybook [#24](navapbc/template-application-nextjs#24)

- Install and configure [next-i18next](https://github.com/i18next/next-i18next) for Next.js internationalization
- Move next.js i18n config out of `next.config.js` and into `next-i18next.config.js`
- Modify `pages/_app.tsx` and `pages/index.tsx` to support i18n
- Move jest i18n config into `/tests/jest-i18n.ts`
- Install and configure [storybook-react-i18next](https://storybook.js.org/addons/storybook-react-i18next) for storybook internationalization
- Add support for `<em>` tags in react-i18next in both next.js and storybook.

Extras:
- Remove `space-before-function-paren` eslint rule
- Update eslint to follow prettier's rules
- Rename `test` dir to `tests` (plural)

* Copy over application-template-nextjs at cfe7c3d.

Adds a src dir, layout component, alphabetizes imports [#26](navapbc/template-application-nextjs#26)

- adds `src/` directory for project's webpack compilable JS and JSON files (this update is supported out of the box by [NextJS](https://nextjs.org/docs/advanced-features/src-directory) and pfml also uses this folder structure)
   - moves `api/`, `pages/` and `messages/` directories to `src/`
   - creates `components` directory and adds template `Layout` component

Extras:
- sets up prettier alphabetize imports
- adds storybook-static to prettier ignore
- sets $theme-show-compile-warnings to true for uswds

* Copy over application-template-nextjs at 0a349fa.

Enable dependabot version updates and codeql security scanning as CI jobs [#29](navapbc/template-application-nextjs#29)

- Enable and configure [dependabot version updates](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)
- Enable and configure [codeql security scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)

Note: These features were already enabled in this repo, so this commit
is just bringing in stylistic updates to make the two repos identical.

* Copy over application-template-nextjs at f59d2ac.

 Add layout styles missing from PR #26.
[#37](navapbc/template-application-nextjs#37)

* fix tests

* update tests

* wip

* fix tests

* run lint and format

* address rocket's comments

* update yarn.lock

* update eslint.json

* update eslintrc

* fix bug

Co-authored-by: Rocket ! <rocketnova@users.noreply.github.com>
Co-authored-by: Alsia Plybeah <alsia@navapbc.com>
Co-authored-by: Shawn VanderJagt <91338100+shawnvanderjagt@users.noreply.github.com>
karinamzalez pushed a commit to navapbc/wic-mt-demo-project-eligibility-screener that referenced this issue Jul 28, 2022
* Initial commit.

* Create initial folder structure (#1)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* WMDP-26 Set Up PR Template (#2)

Changes
added a .github folder which should store all github related processes (e.g. github actions, and templates)
added PR template
Context for reviewers
We want to establish a consistent pull request template that we’ll use.

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add eslintrc.js

* add stories dir and examples

* .eslint.js: prettier updates to eslint file

* add storybook dependencies

* Fix pull request template conflict (#8)

- Fixed the filename case conflict between `.github/PULL_REQUEST_TEMPLATE.md` and `.github/pull_request_template.md`
- Updated the pull request template to be slightly more generic

* Karina/wmdp 61 initial nextjs setup (#4)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* Karina/wmdp 35 setup test suite (#5)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README: add tsconfig documentation

* README: add test script documentation

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Karina/wmdp 33 linter typechecker (#6)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update package.json

add scripts to package.json

* run prettier

* add checkJs to tsconfig, remove duplicate code from js files

* add typescript parser and implement type information with linting

* eslintrc: add prettier recommended plugin

* preettierrc: add trailing comma check, remove redundant code

* README: add auto-generated modified note

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* re-add localesubpaths to next.config.js

* tsconfig.json: remove inline comment

* README: add docimentation for eslint and tsconfig

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README - add documentation for test

* README: add tsconfig documentation

* README: add test script documentation

* README: add documentation for dependencies

* yarn.lock

* Update app/__mocks__/styleMock.js

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* fix eslint errors

* WIP

* Create a separate tsconfig file to specify jsx mode for ts-jest vs next.js (#9)

Create a separate tsconfig file to specify jsx mode.

Next.js requires the typescript jsx mode to be `preserve`, but ts-jest
needs it to be a flavor of `react`. See:

- https://www.typescriptlang.org/docs/handbook/jsx.html
- https://kulshekhar.github.io/ts-jest/docs/getting-started/options/tsconfig
- kulshekhar/ts-jest#63 (comment)
- vercel/next.js#19155 (reply in thread)

* add home page story and uswds dependency

* update dependencies

* add uswds

* support sass in storybook

* fix eslint errors (#10)

* fix eslint errors

* update prettier and linting rules so that they're compatible

* add new eslint rule to README

* WIP - debugging uswds storybook with Rocket

* add storybook static to git ignore

* Remove storybook-static.

* Dockerize the application.

* Create LICENSE.md using Apache 2.0 (#13)

* Dockerize the application (#12)

* WIP.

* Both next.js and storybook working.

* USWDS 3.x instructions require uswds-compile. Can't use next.js or storybook sass without more unknown glue.

* Clean up unnecessary WIP stuff.

* Refactor to use same naming convention for all uswds assets. Add comments.

* Update dockerization to better support local development.

* Remove extraneous yarn command.

* Run formatter.

* Write some brief documentation.

* Fix typo.

* setup CI for NextJS template app (#16)

* Let prettier format project files.

* Run prettier via yarn format.

* Let prettier format project files (#17)

* yarn: add next.intl

* add messages directory with english and spanish json messages pages

* .storybook/preview: set up next-intl with storybook

* next.config: update next local config for itnernationalization

* app.tsx: add next-intl local/messages provider for internationalization

* tests: add nextintlprovider to jest tests, update snapshots

* update gulp

* create src directories -- move src folders

* add tests and stories for Layout and Index

* add scss loading for storybook

* run linter and prettier

* run prettier

* run prettier and lint

* update yarn.lock

* add prettier alphabetize imports -- add storybook-static to prettier ignore

* show compile warnigns

* remove space

* add container background

* WIP: successfully leveraging built-in nextjs sass compiling.

* Working storybook + nextjs + sass + uswds build.

- Drops support for [CSS
  modules](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css)
- Drops requirement for Gulp and USWDS compile
- Requires postcss and postcss-loader, which storybook says should be
  deprecated

* wip

* delete deprecated flies, add yarn.lock

* add welcome and eligibility page

* update ci.yml (#19)

* Run prettier.

* Update packages.

* Simplify docker. Update README. Use postinstalll script.

* Fix postinstall command.

* Tell prettier to ignore USWDS static assets.

* Disable nextjs telemetry.

* refactor

* jest

* test wip

* Add -p flag to creating public dir so mkdir doesn't error.

* Change comment style so we don't get unnecessary indents.

* Refactor which files storybook recognizes as stories.

* Use storybook lazy compilation.

* Remove no longer needed gulpfile.

* Unpin package versions; use at least instead.

* Remove no longer needed css import.

* add stories

* run prettier, no trailing comma

* correct linting errors

* Remove storybook lazy compilation. Not working.

* Remove non-essential storybook dependencies.

* Don't bind mount node_modules.

* delete depracated code

* host fonts locally for easier sb and jest setup and wider browser support

* support tsconfig module imports in jest and sb

* Switch base image to alpine.

* Run yarn format.

* Update README about node_modules in docker.

* setup next-i18next in project, jest, and sb -- todo: get sb globe to render

* Run formatter.

* Streamline docker build even more.

* Remove no longer installed storybook addons.

* Remove storybook-addon-i18next.

* Run formatter.

* Try storybook-i18n addon. Not quite right.

* Match eslint rule for space before parens to rule as described in README.

* Match prettier and eslint for trailing commas.

* Use the storybook-react-i18next addon for internationalization in storybook.

* Remove wip test of fs package.

* Restore homepage to previous state.

* Document i18n config.

* add storybook-static to git ignore

* add import order to prettier

* add src/ - move pages to src

* app- update import

* public: update translations

* _app.tsx: add Layout to app

* add components dir and Layout component

* index: update deprecated index layout

* update template styles

* update index story

* apply title class to template title

* update tests and stories

* run prettier - add prettier-plugin-sort-imports

* run eslint - add JSX global to linter

* fix translation

* yarn format and delete dead code

* run lint

* Copy over application-template-nextjs at ca2cc15.

Install and configure storybook, sass, and USWDS 3.0 [#15](navapbc/template-application-nextjs#15)

- Install and configure storybook
- Create the first story
- Install and configure [USWDS 3.0](https://designsystem.digital.gov/) as the design system
- Modify `Dockerfile` and `docker-compose.yml` to support USWDS and storybook
- Gitignore storybook, uswds assets, and compiled css
- Prettier ignore uswds assets
- Use postinstall hook to copy uswds static assets
- Stop using CSS modules
- Update some package dependencies
- Switch Docker base image to use alpine for increased speed

* Copy over application-template-nextjs at cd06ba6.

Setup i18n for next.js, jest, and storybook [#24](navapbc/template-application-nextjs#24)

- Install and configure [next-i18next](https://github.com/i18next/next-i18next) for Next.js internationalization
- Move next.js i18n config out of `next.config.js` and into `next-i18next.config.js`
- Modify `pages/_app.tsx` and `pages/index.tsx` to support i18n
- Move jest i18n config into `/tests/jest-i18n.ts`
- Install and configure [storybook-react-i18next](https://storybook.js.org/addons/storybook-react-i18next) for storybook internationalization
- Add support for `<em>` tags in react-i18next in both next.js and storybook.

Extras:
- Remove `space-before-function-paren` eslint rule
- Update eslint to follow prettier's rules
- Rename `test` dir to `tests` (plural)

* Copy over application-template-nextjs at cfe7c3d.

Adds a src dir, layout component, alphabetizes imports [#26](navapbc/template-application-nextjs#26)

- adds `src/` directory for project's webpack compilable JS and JSON files (this update is supported out of the box by [NextJS](https://nextjs.org/docs/advanced-features/src-directory) and pfml also uses this folder structure)
   - moves `api/`, `pages/` and `messages/` directories to `src/`
   - creates `components` directory and adds template `Layout` component

Extras:
- sets up prettier alphabetize imports
- adds storybook-static to prettier ignore
- sets $theme-show-compile-warnings to true for uswds

* Copy over application-template-nextjs at 0a349fa.

Enable dependabot version updates and codeql security scanning as CI jobs [#29](navapbc/template-application-nextjs#29)

- Enable and configure [dependabot version updates](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)
- Enable and configure [codeql security scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)

Note: These features were already enabled in this repo, so this commit
is just bringing in stylistic updates to make the two repos identical.

* en/common.json: add contact questions

* add contact page

* remove dead code

* contact: add contact page basic styling and copy

* create TextInput component -- add tests and storybook for contact page and textinput component

* Copy over application-template-nextjs at f59d2ac.

 Add layout styles missing from PR #26.
[#37](navapbc/template-application-nextjs#37)

* fix tests

* update tests

* wip

* fix tests

* run lint and format

* address rocket's comments

* update yarn.lock

* update eslint.json

* update eslintrc

* update textinput types for build

* run prettier

* add number-format

* fix bug

* yarn format

Co-authored-by: Rocket ! <rocketnova@users.noreply.github.com>
Co-authored-by: Alsia Plybeah <alsia@navapbc.com>
Co-authored-by: Shawn VanderJagt <91338100+shawnvanderjagt@users.noreply.github.com>
karinamzalez pushed a commit to navapbc/wic-mt-demo-project-eligibility-screener that referenced this issue Aug 18, 2022
* en: update copy for header and index page

* Layout: update header to match new design

* remove depracated font imports

* Karina/wmdp 109 welcome pages (#27)

* Initial commit.

* Create initial folder structure (#1)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* WMDP-26 Set Up PR Template (#2)

Changes
added a .github folder which should store all github related processes (e.g. github actions, and templates)
added PR template
Context for reviewers
We want to establish a consistent pull request template that we’ll use.

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add eslintrc.js

* add stories dir and examples

* .eslint.js: prettier updates to eslint file

* add storybook dependencies

* Fix pull request template conflict (#8)

- Fixed the filename case conflict between `.github/PULL_REQUEST_TEMPLATE.md` and `.github/pull_request_template.md`
- Updated the pull request template to be slightly more generic

* Karina/wmdp 61 initial nextjs setup (#4)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* Karina/wmdp 35 setup test suite (#5)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README: add tsconfig documentation

* README: add test script documentation

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Karina/wmdp 33 linter typechecker (#6)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update package.json

add scripts to package.json

* run prettier

* add checkJs to tsconfig, remove duplicate code from js files

* add typescript parser and implement type information with linting

* eslintrc: add prettier recommended plugin

* preettierrc: add trailing comma check, remove redundant code

* README: add auto-generated modified note

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* re-add localesubpaths to next.config.js

* tsconfig.json: remove inline comment

* README: add docimentation for eslint and tsconfig

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README - add documentation for test

* README: add tsconfig documentation

* README: add test script documentation

* README: add documentation for dependencies

* yarn.lock

* Update app/__mocks__/styleMock.js

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* fix eslint errors

* WIP

* Create a separate tsconfig file to specify jsx mode for ts-jest vs next.js (#9)

Create a separate tsconfig file to specify jsx mode.

Next.js requires the typescript jsx mode to be `preserve`, but ts-jest
needs it to be a flavor of `react`. See:

- https://www.typescriptlang.org/docs/handbook/jsx.html
- https://kulshekhar.github.io/ts-jest/docs/getting-started/options/tsconfig
- kulshekhar/ts-jest#63 (comment)
- vercel/next.js#19155 (reply in thread)

* add home page story and uswds dependency

* update dependencies

* add uswds

* support sass in storybook

* fix eslint errors (#10)

* fix eslint errors

* update prettier and linting rules so that they're compatible

* add new eslint rule to README

* WIP - debugging uswds storybook with Rocket

* add storybook static to git ignore

* Remove storybook-static.

* Dockerize the application.

* Create LICENSE.md using Apache 2.0 (#13)

* Dockerize the application (#12)

* WIP.

* Both next.js and storybook working.

* USWDS 3.x instructions require uswds-compile. Can't use next.js or storybook sass without more unknown glue.

* Clean up unnecessary WIP stuff.

* Refactor to use same naming convention for all uswds assets. Add comments.

* Update dockerization to better support local development.

* Remove extraneous yarn command.

* Run formatter.

* Write some brief documentation.

* Fix typo.

* setup CI for NextJS template app (#16)

* Let prettier format project files.

* Run prettier via yarn format.

* Let prettier format project files (#17)

* yarn: add next.intl

* add messages directory with english and spanish json messages pages

* .storybook/preview: set up next-intl with storybook

* next.config: update next local config for itnernationalization

* app.tsx: add next-intl local/messages provider for internationalization

* tests: add nextintlprovider to jest tests, update snapshots

* update gulp

* create src directories -- move src folders

* add tests and stories for Layout and Index

* add scss loading for storybook

* run linter and prettier

* run prettier

* run prettier and lint

* update yarn.lock

* add prettier alphabetize imports -- add storybook-static to prettier ignore

* show compile warnigns

* remove space

* add container background

* WIP: successfully leveraging built-in nextjs sass compiling.

* Working storybook + nextjs + sass + uswds build.

- Drops support for [CSS
  modules](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css)
- Drops requirement for Gulp and USWDS compile
- Requires postcss and postcss-loader, which storybook says should be
  deprecated

* wip

* delete deprecated flies, add yarn.lock

* add welcome and eligibility page

* update ci.yml (#19)

* Run prettier.

* Update packages.

* Simplify docker. Update README. Use postinstalll script.

* Fix postinstall command.

* Tell prettier to ignore USWDS static assets.

* Disable nextjs telemetry.

* refactor

* jest

* test wip

* Add -p flag to creating public dir so mkdir doesn't error.

* Change comment style so we don't get unnecessary indents.

* Refactor which files storybook recognizes as stories.

* Use storybook lazy compilation.

* Remove no longer needed gulpfile.

* Unpin package versions; use at least instead.

* Remove no longer needed css import.

* add stories

* run prettier, no trailing comma

* correct linting errors

* Remove storybook lazy compilation. Not working.

* Remove non-essential storybook dependencies.

* Don't bind mount node_modules.

* delete depracated code

* host fonts locally for easier sb and jest setup and wider browser support

* support tsconfig module imports in jest and sb

* Switch base image to alpine.

* Run yarn format.

* Update README about node_modules in docker.

* setup next-i18next in project, jest, and sb -- todo: get sb globe to render

* Run formatter.

* Streamline docker build even more.

* Remove no longer installed storybook addons.

* Remove storybook-addon-i18next.

* Run formatter.

* Try storybook-i18n addon. Not quite right.

* Match eslint rule for space before parens to rule as described in README.

* Match prettier and eslint for trailing commas.

* Use the storybook-react-i18next addon for internationalization in storybook.

* Remove wip test of fs package.

* Restore homepage to previous state.

* Document i18n config.

* add storybook-static to git ignore

* add import order to prettier

* add src/ - move pages to src

* app- update import

* public: update translations

* _app.tsx: add Layout to app

* add components dir and Layout component

* index: update deprecated index layout

* update template styles

* update index story

* apply title class to template title

* update tests and stories

* run prettier - add prettier-plugin-sort-imports

* run eslint - add JSX global to linter

* fix translation

* yarn format and delete dead code

* run lint

* Copy over application-template-nextjs at ca2cc15.

Install and configure storybook, sass, and USWDS 3.0 [#15](navapbc/template-application-nextjs#15)

- Install and configure storybook
- Create the first story
- Install and configure [USWDS 3.0](https://designsystem.digital.gov/) as the design system
- Modify `Dockerfile` and `docker-compose.yml` to support USWDS and storybook
- Gitignore storybook, uswds assets, and compiled css
- Prettier ignore uswds assets
- Use postinstall hook to copy uswds static assets
- Stop using CSS modules
- Update some package dependencies
- Switch Docker base image to use alpine for increased speed

* Copy over application-template-nextjs at cd06ba6.

Setup i18n for next.js, jest, and storybook [#24](navapbc/template-application-nextjs#24)

- Install and configure [next-i18next](https://github.com/i18next/next-i18next) for Next.js internationalization
- Move next.js i18n config out of `next.config.js` and into `next-i18next.config.js`
- Modify `pages/_app.tsx` and `pages/index.tsx` to support i18n
- Move jest i18n config into `/tests/jest-i18n.ts`
- Install and configure [storybook-react-i18next](https://storybook.js.org/addons/storybook-react-i18next) for storybook internationalization
- Add support for `<em>` tags in react-i18next in both next.js and storybook.

Extras:
- Remove `space-before-function-paren` eslint rule
- Update eslint to follow prettier's rules
- Rename `test` dir to `tests` (plural)

* Copy over application-template-nextjs at cfe7c3d.

Adds a src dir, layout component, alphabetizes imports [#26](navapbc/template-application-nextjs#26)

- adds `src/` directory for project's webpack compilable JS and JSON files (this update is supported out of the box by [NextJS](https://nextjs.org/docs/advanced-features/src-directory) and pfml also uses this folder structure)
   - moves `api/`, `pages/` and `messages/` directories to `src/`
   - creates `components` directory and adds template `Layout` component

Extras:
- sets up prettier alphabetize imports
- adds storybook-static to prettier ignore
- sets $theme-show-compile-warnings to true for uswds

* Copy over application-template-nextjs at 0a349fa.

Enable dependabot version updates and codeql security scanning as CI jobs [#29](navapbc/template-application-nextjs#29)

- Enable and configure [dependabot version updates](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)
- Enable and configure [codeql security scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)

Note: These features were already enabled in this repo, so this commit
is just bringing in stylistic updates to make the two repos identical.

* Copy over application-template-nextjs at f59d2ac.

 Add layout styles missing from PR #26.
[#37](navapbc/template-application-nextjs#37)

* fix tests

* update tests

* wip

* fix tests

* run lint and format

* address rocket's comments

* update yarn.lock

* update eslint.json

* update eslintrc

* fix bug

Co-authored-by: Rocket ! <rocketnova@users.noreply.github.com>
Co-authored-by: Alsia Plybeah <alsia@navapbc.com>
Co-authored-by: Shawn VanderJagt <91338100+shawnvanderjagt@users.noreply.github.com>

* Karina/wmdp 116 contact info (#32)

* Initial commit.

* Create initial folder structure (#1)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* WMDP-26 Set Up PR Template (#2)

Changes
added a .github folder which should store all github related processes (e.g. github actions, and templates)
added PR template
Context for reviewers
We want to establish a consistent pull request template that we’ll use.

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add eslintrc.js

* add stories dir and examples

* .eslint.js: prettier updates to eslint file

* add storybook dependencies

* Fix pull request template conflict (#8)

- Fixed the filename case conflict between `.github/PULL_REQUEST_TEMPLATE.md` and `.github/pull_request_template.md`
- Updated the pull request template to be slightly more generic

* Karina/wmdp 61 initial nextjs setup (#4)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* Karina/wmdp 35 setup test suite (#5)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README: add tsconfig documentation

* README: add test script documentation

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Karina/wmdp 33 linter typechecker (#6)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update package.json

add scripts to package.json

* run prettier

* add checkJs to tsconfig, remove duplicate code from js files

* add typescript parser and implement type information with linting

* eslintrc: add prettier recommended plugin

* preettierrc: add trailing comma check, remove redundant code

* README: add auto-generated modified note

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* re-add localesubpaths to next.config.js

* tsconfig.json: remove inline comment

* README: add docimentation for eslint and tsconfig

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README - add documentation for test

* README: add tsconfig documentation

* README: add test script documentation

* README: add documentation for dependencies

* yarn.lock

* Update app/__mocks__/styleMock.js

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* fix eslint errors

* WIP

* Create a separate tsconfig file to specify jsx mode for ts-jest vs next.js (#9)

Create a separate tsconfig file to specify jsx mode.

Next.js requires the typescript jsx mode to be `preserve`, but ts-jest
needs it to be a flavor of `react`. See:

- https://www.typescriptlang.org/docs/handbook/jsx.html
- https://kulshekhar.github.io/ts-jest/docs/getting-started/options/tsconfig
- kulshekhar/ts-jest#63 (comment)
- vercel/next.js#19155 (reply in thread)

* add home page story and uswds dependency

* update dependencies

* add uswds

* support sass in storybook

* fix eslint errors (#10)

* fix eslint errors

* update prettier and linting rules so that they're compatible

* add new eslint rule to README

* WIP - debugging uswds storybook with Rocket

* add storybook static to git ignore

* Remove storybook-static.

* Dockerize the application.

* Create LICENSE.md using Apache 2.0 (#13)

* Dockerize the application (#12)

* WIP.

* Both next.js and storybook working.

* USWDS 3.x instructions require uswds-compile. Can't use next.js or storybook sass without more unknown glue.

* Clean up unnecessary WIP stuff.

* Refactor to use same naming convention for all uswds assets. Add comments.

* Update dockerization to better support local development.

* Remove extraneous yarn command.

* Run formatter.

* Write some brief documentation.

* Fix typo.

* setup CI for NextJS template app (#16)

* Let prettier format project files.

* Run prettier via yarn format.

* Let prettier format project files (#17)

* yarn: add next.intl

* add messages directory with english and spanish json messages pages

* .storybook/preview: set up next-intl with storybook

* next.config: update next local config for itnernationalization

* app.tsx: add next-intl local/messages provider for internationalization

* tests: add nextintlprovider to jest tests, update snapshots

* update gulp

* create src directories -- move src folders

* add tests and stories for Layout and Index

* add scss loading for storybook

* run linter and prettier

* run prettier

* run prettier and lint

* update yarn.lock

* add prettier alphabetize imports -- add storybook-static to prettier ignore

* show compile warnigns

* remove space

* add container background

* WIP: successfully leveraging built-in nextjs sass compiling.

* Working storybook + nextjs + sass + uswds build.

- Drops support for [CSS
  modules](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css)
- Drops requirement for Gulp and USWDS compile
- Requires postcss and postcss-loader, which storybook says should be
  deprecated

* wip

* delete deprecated flies, add yarn.lock

* add welcome and eligibility page

* update ci.yml (#19)

* Run prettier.

* Update packages.

* Simplify docker. Update README. Use postinstalll script.

* Fix postinstall command.

* Tell prettier to ignore USWDS static assets.

* Disable nextjs telemetry.

* refactor

* jest

* test wip

* Add -p flag to creating public dir so mkdir doesn't error.

* Change comment style so we don't get unnecessary indents.

* Refactor which files storybook recognizes as stories.

* Use storybook lazy compilation.

* Remove no longer needed gulpfile.

* Unpin package versions; use at least instead.

* Remove no longer needed css import.

* add stories

* run prettier, no trailing comma

* correct linting errors

* Remove storybook lazy compilation. Not working.

* Remove non-essential storybook dependencies.

* Don't bind mount node_modules.

* delete depracated code

* host fonts locally for easier sb and jest setup and wider browser support

* support tsconfig module imports in jest and sb

* Switch base image to alpine.

* Run yarn format.

* Update README about node_modules in docker.

* setup next-i18next in project, jest, and sb -- todo: get sb globe to render

* Run formatter.

* Streamline docker build even more.

* Remove no longer installed storybook addons.

* Remove storybook-addon-i18next.

* Run formatter.

* Try storybook-i18n addon. Not quite right.

* Match eslint rule for space before parens to rule as described in README.

* Match prettier and eslint for trailing commas.

* Use the storybook-react-i18next addon for internationalization in storybook.

* Remove wip test of fs package.

* Restore homepage to previous state.

* Document i18n config.

* add storybook-static to git ignore

* add import order to prettier

* add src/ - move pages to src

* app- update import

* public: update translations

* _app.tsx: add Layout to app

* add components dir and Layout component

* index: update deprecated index layout

* update template styles

* update index story

* apply title class to template title

* update tests and stories

* run prettier - add prettier-plugin-sort-imports

* run eslint - add JSX global to linter

* fix translation

* yarn format and delete dead code

* run lint

* Copy over application-template-nextjs at ca2cc15.

Install and configure storybook, sass, and USWDS 3.0 [#15](navapbc/template-application-nextjs#15)

- Install and configure storybook
- Create the first story
- Install and configure [USWDS 3.0](https://designsystem.digital.gov/) as the design system
- Modify `Dockerfile` and `docker-compose.yml` to support USWDS and storybook
- Gitignore storybook, uswds assets, and compiled css
- Prettier ignore uswds assets
- Use postinstall hook to copy uswds static assets
- Stop using CSS modules
- Update some package dependencies
- Switch Docker base image to use alpine for increased speed

* Copy over application-template-nextjs at cd06ba6.

Setup i18n for next.js, jest, and storybook [#24](navapbc/template-application-nextjs#24)

- Install and configure [next-i18next](https://github.com/i18next/next-i18next) for Next.js internationalization
- Move next.js i18n config out of `next.config.js` and into `next-i18next.config.js`
- Modify `pages/_app.tsx` and `pages/index.tsx` to support i18n
- Move jest i18n config into `/tests/jest-i18n.ts`
- Install and configure [storybook-react-i18next](https://storybook.js.org/addons/storybook-react-i18next) for storybook internationalization
- Add support for `<em>` tags in react-i18next in both next.js and storybook.

Extras:
- Remove `space-before-function-paren` eslint rule
- Update eslint to follow prettier's rules
- Rename `test` dir to `tests` (plural)

* Copy over application-template-nextjs at cfe7c3d.

Adds a src dir, layout component, alphabetizes imports [#26](navapbc/template-application-nextjs#26)

- adds `src/` directory for project's webpack compilable JS and JSON files (this update is supported out of the box by [NextJS](https://nextjs.org/docs/advanced-features/src-directory) and pfml also uses this folder structure)
   - moves `api/`, `pages/` and `messages/` directories to `src/`
   - creates `components` directory and adds template `Layout` component

Extras:
- sets up prettier alphabetize imports
- adds storybook-static to prettier ignore
- sets $theme-show-compile-warnings to true for uswds

* Copy over application-template-nextjs at 0a349fa.

Enable dependabot version updates and codeql security scanning as CI jobs [#29](navapbc/template-application-nextjs#29)

- Enable and configure [dependabot version updates](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)
- Enable and configure [codeql security scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)

Note: These features were already enabled in this repo, so this commit
is just bringing in stylistic updates to make the two repos identical.

* en/common.json: add contact questions

* add contact page

* remove dead code

* contact: add contact page basic styling and copy

* create TextInput component -- add tests and storybook for contact page and textinput component

* Copy over application-template-nextjs at f59d2ac.

 Add layout styles missing from PR #26.
[#37](navapbc/template-application-nextjs#37)

* fix tests

* update tests

* wip

* fix tests

* run lint and format

* address rocket's comments

* update yarn.lock

* update eslint.json

* update eslintrc

* update textinput types for build

* run prettier

* add number-format

* fix bug

* yarn format

Co-authored-by: Rocket ! <rocketnova@users.noreply.github.com>
Co-authored-by: Alsia Plybeah <alsia@navapbc.com>
Co-authored-by: Shawn VanderJagt <91338100+shawnvanderjagt@users.noreply.github.com>

* Configure chromatic to support UAT (#41)

- Install chromatic as a dev dependency
- Configure chromatic as a CI job
- Configure chromatic to be run during local development

* Setup precommit hook (#42)

- Install husky as a dev dependency
- Configure husky to run linting and tests as a git precommit hook
- Have prettier ignore `app/coverage` files
- Rename `ts:check` to `ts-check` to match other script naming conventions

* Update dependencies. Closes #39, #40, #43, #44, #45. (#46)

* update tests

* add accordion storybook test

* Karina/wmdp 119 alternate benefits (#63)

* add jest tests for conditional alternate page routing from eligibility page

* add alternate jest test

* update styles

Co-authored-by: Rocket ! <rocketnova@users.noreply.github.com>
Co-authored-by: Alsia Plybeah <alsia@navapbc.com>
Co-authored-by: Shawn VanderJagt <91338100+shawnvanderjagt@users.noreply.github.com>
karinamzalez pushed a commit to navapbc/wic-mt-demo-project-eligibility-screener that referenced this issue Aug 23, 2022
* Initial commit.

* Create initial folder structure (#1)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* WMDP-26 Set Up PR Template (#2)

Changes
added a .github folder which should store all github related processes (e.g. github actions, and templates)
added PR template
Context for reviewers
We want to establish a consistent pull request template that we’ll use.

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add eslintrc.js

* add stories dir and examples

* .eslint.js: prettier updates to eslint file

* add storybook dependencies

* Fix pull request template conflict (#8)

- Fixed the filename case conflict between `.github/PULL_REQUEST_TEMPLATE.md` and `.github/pull_request_template.md`
- Updated the pull request template to be slightly more generic

* Karina/wmdp 61 initial nextjs setup (#4)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* Karina/wmdp 35 setup test suite (#5)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README: add tsconfig documentation

* README: add test script documentation

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Karina/wmdp 33 linter typechecker (#6)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update package.json

add scripts to package.json

* run prettier

* add checkJs to tsconfig, remove duplicate code from js files

* add typescript parser and implement type information with linting

* eslintrc: add prettier recommended plugin

* preettierrc: add trailing comma check, remove redundant code

* README: add auto-generated modified note

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* re-add localesubpaths to next.config.js

* tsconfig.json: remove inline comment

* README: add docimentation for eslint and tsconfig

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README - add documentation for test

* README: add tsconfig documentation

* README: add test script documentation

* README: add documentation for dependencies

* yarn.lock

* Update app/__mocks__/styleMock.js

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* fix eslint errors

* WIP

* Create a separate tsconfig file to specify jsx mode for ts-jest vs next.js (#9)

Create a separate tsconfig file to specify jsx mode.

Next.js requires the typescript jsx mode to be `preserve`, but ts-jest
needs it to be a flavor of `react`. See:

- https://www.typescriptlang.org/docs/handbook/jsx.html
- https://kulshekhar.github.io/ts-jest/docs/getting-started/options/tsconfig
- kulshekhar/ts-jest#63 (comment)
- vercel/next.js#19155 (reply in thread)

* add home page story and uswds dependency

* update dependencies

* add uswds

* support sass in storybook

* fix eslint errors (#10)

* fix eslint errors

* update prettier and linting rules so that they're compatible

* add new eslint rule to README

* WIP - debugging uswds storybook with Rocket

* add storybook static to git ignore

* Remove storybook-static.

* Dockerize the application.

* Create LICENSE.md using Apache 2.0 (#13)

* Dockerize the application (#12)

* WIP.

* Both next.js and storybook working.

* USWDS 3.x instructions require uswds-compile. Can't use next.js or storybook sass without more unknown glue.

* Clean up unnecessary WIP stuff.

* Refactor to use same naming convention for all uswds assets. Add comments.

* Update dockerization to better support local development.

* Remove extraneous yarn command.

* Run formatter.

* Write some brief documentation.

* Fix typo.

* setup CI for NextJS template app (#16)

* Let prettier format project files.

* Run prettier via yarn format.

* Let prettier format project files (#17)

* yarn: add next.intl

* add messages directory with english and spanish json messages pages

* .storybook/preview: set up next-intl with storybook

* next.config: update next local config for itnernationalization

* app.tsx: add next-intl local/messages provider for internationalization

* tests: add nextintlprovider to jest tests, update snapshots

* update gulp

* create src directories -- move src folders

* add tests and stories for Layout and Index

* add scss loading for storybook

* run linter and prettier

* run prettier

* run prettier and lint

* update yarn.lock

* add prettier alphabetize imports -- add storybook-static to prettier ignore

* show compile warnigns

* remove space

* add container background

* WIP: successfully leveraging built-in nextjs sass compiling.

* Working storybook + nextjs + sass + uswds build.

- Drops support for [CSS
  modules](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css)
- Drops requirement for Gulp and USWDS compile
- Requires postcss and postcss-loader, which storybook says should be
  deprecated

* wip

* delete deprecated flies, add yarn.lock

* add welcome and eligibility page

* update ci.yml (#19)

* Run prettier.

* Update packages.

* Simplify docker. Update README. Use postinstalll script.

* Fix postinstall command.

* Tell prettier to ignore USWDS static assets.

* Disable nextjs telemetry.

* refactor

* jest

* test wip

* Add -p flag to creating public dir so mkdir doesn't error.

* Change comment style so we don't get unnecessary indents.

* Refactor which files storybook recognizes as stories.

* Use storybook lazy compilation.

* Remove no longer needed gulpfile.

* Unpin package versions; use at least instead.

* Remove no longer needed css import.

* add stories

* run prettier, no trailing comma

* correct linting errors

* Remove storybook lazy compilation. Not working.

* Remove non-essential storybook dependencies.

* Don't bind mount node_modules.

* delete depracated code

* host fonts locally for easier sb and jest setup and wider browser support

* support tsconfig module imports in jest and sb

* Switch base image to alpine.

* Run yarn format.

* Update README about node_modules in docker.

* setup next-i18next in project, jest, and sb -- todo: get sb globe to render

* Run formatter.

* Streamline docker build even more.

* Remove no longer installed storybook addons.

* Remove storybook-addon-i18next.

* Run formatter.

* Try storybook-i18n addon. Not quite right.

* Match eslint rule for space before parens to rule as described in README.

* Match prettier and eslint for trailing commas.

* Use the storybook-react-i18next addon for internationalization in storybook.

* Remove wip test of fs package.

* Restore homepage to previous state.

* Document i18n config.

* add storybook-static to git ignore

* add import order to prettier

* add src/ - move pages to src

* app- update import

* public: update translations

* _app.tsx: add Layout to app

* add components dir and Layout component

* index: update deprecated index layout

* update template styles

* update index story

* apply title class to template title

* update tests and stories

* run prettier - add prettier-plugin-sort-imports

* run eslint - add JSX global to linter

* fix translation

* yarn format and delete dead code

* run lint

* Copy over application-template-nextjs at ca2cc15.

Install and configure storybook, sass, and USWDS 3.0 [#15](navapbc/template-application-nextjs#15)

- Install and configure storybook
- Create the first story
- Install and configure [USWDS 3.0](https://designsystem.digital.gov/) as the design system
- Modify `Dockerfile` and `docker-compose.yml` to support USWDS and storybook
- Gitignore storybook, uswds assets, and compiled css
- Prettier ignore uswds assets
- Use postinstall hook to copy uswds static assets
- Stop using CSS modules
- Update some package dependencies
- Switch Docker base image to use alpine for increased speed

* Copy over application-template-nextjs at cd06ba6.

Setup i18n for next.js, jest, and storybook [#24](navapbc/template-application-nextjs#24)

- Install and configure [next-i18next](https://github.com/i18next/next-i18next) for Next.js internationalization
- Move next.js i18n config out of `next.config.js` and into `next-i18next.config.js`
- Modify `pages/_app.tsx` and `pages/index.tsx` to support i18n
- Move jest i18n config into `/tests/jest-i18n.ts`
- Install and configure [storybook-react-i18next](https://storybook.js.org/addons/storybook-react-i18next) for storybook internationalization
- Add support for `<em>` tags in react-i18next in both next.js and storybook.

Extras:
- Remove `space-before-function-paren` eslint rule
- Update eslint to follow prettier's rules
- Rename `test` dir to `tests` (plural)

* Copy over application-template-nextjs at cfe7c3d.

Adds a src dir, layout component, alphabetizes imports [#26](navapbc/template-application-nextjs#26)

- adds `src/` directory for project's webpack compilable JS and JSON files (this update is supported out of the box by [NextJS](https://nextjs.org/docs/advanced-features/src-directory) and pfml also uses this folder structure)
   - moves `api/`, `pages/` and `messages/` directories to `src/`
   - creates `components` directory and adds template `Layout` component

Extras:
- sets up prettier alphabetize imports
- adds storybook-static to prettier ignore
- sets $theme-show-compile-warnings to true for uswds

* Copy over application-template-nextjs at 0a349fa.

Enable dependabot version updates and codeql security scanning as CI jobs [#29](navapbc/template-application-nextjs#29)

- Enable and configure [dependabot version updates](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)
- Enable and configure [codeql security scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)

Note: These features were already enabled in this repo, so this commit
is just bringing in stylistic updates to make the two repos identical.

* en/common.json: add contact questions

* add contact page

* remove dead code

* contact: add contact page basic styling and copy

* create TextInput component -- add tests and storybook for contact page and textinput component

* Copy over application-template-nextjs at f59d2ac.

 Add layout styles missing from PR #26.
[#37](navapbc/template-application-nextjs#37)

* fix tests

* update tests

* wip

* fix tests

* run lint and format

* address rocket's comments

* update yarn.lock

* update eslint.json

* update eslintrc

* update textinput types for build

* run prettier

* add number-format

* fix bug

* pages: add clinic page, update contact page to route to clinic page

* add clinic.json to public directory

* add search.svg: magnifying glass for uswds search button

* tsconfig: add public module import

* update keys

* wip

* public: add clinic page copy

* ButtonLink: add disabled prop

* pages: handle clinic selection and disable button if clinic isn't selected

* unselect if research is reset

* add income page

* add jest tests

* add stories

* update income table styling

* Update app/jest.config.js

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/public/locales/en/common.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/public/locales/en/common.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/src/components/Dropdown.tsx

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Karina/wmdp 162 update styles (#62)

* en: update copy for header and index page

* Layout: update header to match new design

* remove depracated font imports

* Karina/wmdp 109 welcome pages (#27)

* Initial commit.

* Create initial folder structure (#1)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* WMDP-26 Set Up PR Template (#2)

Changes
added a .github folder which should store all github related processes (e.g. github actions, and templates)
added PR template
Context for reviewers
We want to establish a consistent pull request template that we’ll use.

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add eslintrc.js

* add stories dir and examples

* .eslint.js: prettier updates to eslint file

* add storybook dependencies

* Fix pull request template conflict (#8)

- Fixed the filename case conflict between `.github/PULL_REQUEST_TEMPLATE.md` and `.github/pull_request_template.md`
- Updated the pull request template to be slightly more generic

* Karina/wmdp 61 initial nextjs setup (#4)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* Karina/wmdp 35 setup test suite (#5)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README: add tsconfig documentation

* README: add test script documentation

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Karina/wmdp 33 linter typechecker (#6)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update package.json

add scripts to package.json

* run prettier

* add checkJs to tsconfig, remove duplicate code from js files

* add typescript parser and implement type information with linting

* eslintrc: add prettier recommended plugin

* preettierrc: add trailing comma check, remove redundant code

* README: add auto-generated modified note

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* re-add localesubpaths to next.config.js

* tsconfig.json: remove inline comment

* README: add docimentation for eslint and tsconfig

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README - add documentation for test

* README: add tsconfig documentation

* README: add test script documentation

* README: add documentation for dependencies

* yarn.lock

* Update app/__mocks__/styleMock.js

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* fix eslint errors

* WIP

* Create a separate tsconfig file to specify jsx mode for ts-jest vs next.js (#9)

Create a separate tsconfig file to specify jsx mode.

Next.js requires the typescript jsx mode to be `preserve`, but ts-jest
needs it to be a flavor of `react`. See:

- https://www.typescriptlang.org/docs/handbook/jsx.html
- https://kulshekhar.github.io/ts-jest/docs/getting-started/options/tsconfig
- kulshekhar/ts-jest#63 (comment)
- vercel/next.js#19155 (reply in thread)

* add home page story and uswds dependency

* update dependencies

* add uswds

* support sass in storybook

* fix eslint errors (#10)

* fix eslint errors

* update prettier and linting rules so that they're compatible

* add new eslint rule to README

* WIP - debugging uswds storybook with Rocket

* add storybook static to git ignore

* Remove storybook-static.

* Dockerize the application.

* Create LICENSE.md using Apache 2.0 (#13)

* Dockerize the application (#12)

* WIP.

* Both next.js and storybook working.

* USWDS 3.x instructions require uswds-compile. Can't use next.js or storybook sass without more unknown glue.

* Clean up unnecessary WIP stuff.

* Refactor to use same naming convention for all uswds assets. Add comments.

* Update dockerization to better support local development.

* Remove extraneous yarn command.

* Run formatter.

* Write some brief documentation.

* Fix typo.

* setup CI for NextJS template app (#16)

* Let prettier format project files.

* Run prettier via yarn format.

* Let prettier format project files (#17)

* yarn: add next.intl

* add messages directory with english and spanish json messages pages

* .storybook/preview: set up next-intl with storybook

* next.config: update next local config for itnernationalization

* app.tsx: add next-intl local/messages provider for internationalization

* tests: add nextintlprovider to jest tests, update snapshots

* update gulp

* create src directories -- move src folders

* add tests and stories for Layout and Index

* add scss loading for storybook

* run linter and prettier

* run prettier

* run prettier and lint

* update yarn.lock

* add prettier alphabetize imports -- add storybook-static to prettier ignore

* show compile warnigns

* remove space

* add container background

* WIP: successfully leveraging built-in nextjs sass compiling.

* Working storybook + nextjs + sass + uswds build.

- Drops support for [CSS
  modules](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css)
- Drops requirement for Gulp and USWDS compile
- Requires postcss and postcss-loader, which storybook says should be
  deprecated

* wip

* delete deprecated flies, add yarn.lock

* add welcome and eligibility page

* update ci.yml (#19)

* Run prettier.

* Update packages.

* Simplify docker. Update README. Use postinstalll script.

* Fix postinstall command.

* Tell prettier to ignore USWDS static assets.

* Disable nextjs telemetry.

* refactor

* jest

* test wip

* Add -p flag to creating public dir so mkdir doesn't error.

* Change comment style so we don't get unnecessary indents.

* Refactor which files storybook recognizes as stories.

* Use storybook lazy compilation.

* Remove no longer needed gulpfile.

* Unpin package versions; use at least instead.

* Remove no longer needed css import.

* add stories

* run prettier, no trailing comma

* correct linting errors

* Remove storybook lazy compilation. Not working.

* Remove non-essential storybook dependencies.

* Don't bind mount node_modules.

* delete depracated code

* host fonts locally for easier sb and jest setup and wider browser support

* support tsconfig module imports in jest and sb

* Switch base image to alpine.

* Run yarn format.

* Update README about node_modules in docker.

* setup next-i18next in project, jest, and sb -- todo: get sb globe to render

* Run formatter.

* Streamline docker build even more.

* Remove no longer installed storybook addons.

* Remove storybook-addon-i18next.

* Run formatter.

* Try storybook-i18n addon. Not quite right.

* Match eslint rule for space before parens to rule as described in README.

* Match prettier and eslint for trailing commas.

* Use the storybook-react-i18next addon for internationalization in storybook.

* Remove wip test of fs package.

* Restore homepage to previous state.

* Document i18n config.

* add storybook-static to git ignore

* add import order to prettier

* add src/ - move pages to src

* app- update import

* public: update translations

* _app.tsx: add Layout to app

* add components dir and Layout component

* index: update deprecated index layout

* update template styles

* update index story

* apply title class to template title

* update tests and stories

* run prettier - add prettier-plugin-sort-imports

* run eslint - add JSX global to linter

* fix translation

* yarn format and delete dead code

* run lint

* Copy over application-template-nextjs at ca2cc15.

Install and configure storybook, sass, and USWDS 3.0 [#15](navapbc/template-application-nextjs#15)

- Install and configure storybook
- Create the first story
- Install and configure [USWDS 3.0](https://designsystem.digital.gov/) as the design system
- Modify `Dockerfile` and `docker-compose.yml` to support USWDS and storybook
- Gitignore storybook, uswds assets, and compiled css
- Prettier ignore uswds assets
- Use postinstall hook to copy uswds static assets
- Stop using CSS modules
- Update some package dependencies
- Switch Docker base image to use alpine for increased speed

* Copy over application-template-nextjs at cd06ba6.

Setup i18n for next.js, jest, and storybook [#24](navapbc/template-application-nextjs#24)

- Install and configure [next-i18next](https://github.com/i18next/next-i18next) for Next.js internationalization
- Move next.js i18n config out of `next.config.js` and into `next-i18next.config.js`
- Modify `pages/_app.tsx` and `pages/index.tsx` to support i18n
- Move jest i18n config into `/tests/jest-i18n.ts`
- Install and configure [storybook-react-i18next](https://storybook.js.org/addons/storybook-react-i18next) for storybook internationalization
- Add support for `<em>` tags in react-i18next in both next.js and storybook.

Extras:
- Remove `space-before-function-paren` eslint rule
- Update eslint to follow prettier's rules
- Rename `test` dir to `tests` (plural)

* Copy over application-template-nextjs at cfe7c3d.

Adds a src dir, layout component, alphabetizes imports [#26](navapbc/template-application-nextjs#26)

- adds `src/` directory for project's webpack compilable JS and JSON files (this update is supported out of the box by [NextJS](https://nextjs.org/docs/advanced-features/src-directory) and pfml also uses this folder structure)
   - moves `api/`, `pages/` and `messages/` directories to `src/`
   - creates `components` directory and adds template `Layout` component

Extras:
- sets up prettier alphabetize imports
- adds storybook-static to prettier ignore
- sets $theme-show-compile-warnings to true for uswds

* Copy over application-template-nextjs at 0a349fa.

Enable dependabot version updates and codeql security scanning as CI jobs [#29](navapbc/template-application-nextjs#29)

- Enable and configure [dependabot version updates](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)
- Enable and configure [codeql security scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)

Note: These features were already enabled in this repo, so this commit
is just bringing in stylistic updates to make the two repos identical.

* Copy over application-template-nextjs at f59d2ac.

 Add layout styles missing from PR #26.
[#37](navapbc/template-application-nextjs#37)

* fix tests

* update tests

* wip

* fix tests

* run lint and format

* address rocket's comments

* update yarn.lock

* update eslint.json

* update eslintrc

* fix bug

Co-authored-by: Rocket ! <rocketnova@users.noreply.github.com>
Co-authored-by: Alsia Plybeah <alsia@navapbc.com>
Co-authored-by: Shawn VanderJagt <91338100+shawnvanderjagt@users.noreply.github.com>

* Karina/wmdp 116 contact info (#32)

* Initial commit.

* Create initial folder structure (#1)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* WMDP-26 Set Up PR Template (#2)

Changes
added a .github folder which should store all github related processes (e.g. github actions, and templates)
added PR template
Context for reviewers
We want to establish a consistent pull request template that we’ll use.

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add eslintrc.js

* add stories dir and examples

* .eslint.js: prettier updates to eslint file

* add storybook dependencies

* Fix pull request template conflict (#8)

- Fixed the filename case conflict between `.github/PULL_REQUEST_TEMPLATE.md` and `.github/pull_request_template.md`
- Updated the pull request template to be slightly more generic

* Karina/wmdp 61 initial nextjs setup (#4)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* Karina/wmdp 35 setup test suite (#5)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README: add tsconfig documentation

* README: add test script documentation

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Karina/wmdp 33 linter typechecker (#6)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update package.json

add scripts to package.json

* run prettier

* add checkJs to tsconfig, remove duplicate code from js files

* add typescript parser and implement type information with linting

* eslintrc: add prettier recommended plugin

* preettierrc: add trailing comma check, remove redundant code

* README: add auto-generated modified note

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* re-add localesubpaths to next.config.js

* tsconfig.json: remove inline comment

* README: add docimentation for eslint and tsconfig

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README - add documentation for test

* README: add tsconfig documentation

* README: add test script documentation

* README: add documentation for dependencies

* yarn.lock

* Update app/__mocks__/styleMock.js

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* fix eslint errors

* WIP

* Create a separate tsconfig file to specify jsx mode for ts-jest vs next.js (#9)

Create a separate tsconfig file to specify jsx mode.

Next.js requires the typescript jsx mode to be `preserve`, but ts-jest
needs it to be a flavor of `react`. See:

- https://www.typescriptlang.org/docs/handbook/jsx.html
- https://kulshekhar.github.io/ts-jest/docs/getting-started/options/tsconfig
- kulshekhar/ts-jest#63 (comment)
- vercel/next.js#19155 (reply in thread)

* add home page story and uswds dependency

* update dependencies

* add uswds

* support sass in storybook

* fix eslint errors (#10)

* fix eslint errors

* update prettier and linting rules so that they're compatible

* add new eslint rule to README

* WIP - debugging uswds storybook with Rocket

* add storybook static to git ignore

* Remove storybook-static.

* Dockerize the application.

* Create LICENSE.md using Apache 2.0 (#13)

* Dockerize the application (#12)

* WIP.

* Both next.js and storybook working.

* USWDS 3.x instructions require uswds-compile. Can't use next.js or storybook sass without more unknown glue.

* Clean up unnecessary WIP stuff.

* Refactor to use same naming convention for all uswds assets. Add comments.

* Update dockerization to better support local development.

* Remove extraneous yarn command.

* Run formatter.

* Write some brief documentation.

* Fix typo.

* setup CI for NextJS template app (#16)

* Let prettier format project files.

* Run prettier via yarn format.

* Let prettier format project files (#17)

* yarn: add next.intl

* add messages directory with english and spanish json messages pages

* .storybook/preview: set up next-intl with storybook

* next.config: update next local config for itnernationalization

* app.tsx: add next-intl local/messages provider for internationalization

* tests: add nextintlprovider to jest tests, update snapshots

* update gulp

* create src directories -- move src folders

* add tests and stories for Layout and Index

* add scss loading for storybook

* run linter and prettier

* run prettier

* run prettier and lint

* update yarn.lock

* add prettier alphabetize imports -- add storybook-static to prettier ignore

* show compile warnigns

* remove space

* add container background

* WIP: successfully leveraging built-in nextjs sass compiling.

* Working storybook + nextjs + sass + uswds build.

- Drops support for [CSS
  modules](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css)
- Drops requirement for Gulp and USWDS compile
- Requires postcss and postcss-loader, which storybook says should be
  deprecated

* wip

* delete deprecated flies, add yarn.lock

* add welcome and eligibility page

* update ci.yml (#19)

* Run prettier.

* Update packages.

* Simplify docker. Update README. Use postinstalll script.

* Fix postinstall command.

* Tell prettier to ignore USWDS static assets.

* Disable nextjs telemetry.

* refactor

* jest

* test wip

* Add -p flag to creating public dir so mkdir doesn't error.

* Change comment style so we don't get unnecessary indents.

* Refactor which files storybook recognizes as stories.

* Use storybook lazy compilation.

* Remove no longer needed gulpfile.

* Unpin package versions; use at least instead.

* Remove no longer needed css import.

* add stories

* run prettier, no trailing comma

* correct linting errors

* Remove storybook lazy compilation. Not working.

* Remove non-essential storybook dependencies.

* Don't bind mount node_modules.

* delete depracated code

* host fonts locally for easier sb and jest setup and wider browser support

* support tsconfig module imports in jest and sb

* Switch base image to alpine.

* Run yarn format.

* Update README about node_modules in docker.

* setup next-i18next in project, jest, and sb -- todo: get sb globe to render

* Run formatter.

* Streamline docker build even more.

* Remove no longer installed storybook addons.

* Remove storybook-addon-i18next.

* Run formatter.

* Try storybook-i18n addon. Not quite right.

* Match eslint rule for space before parens to rule as described in README.

* Match prettier and eslint for trailing commas.

* Use the storybook-react-i18next addon for internationalization in storybook.

* Remove wip test of fs package.

* Restore homepage to previous state.

* Document i18n config.

* add storybook-static to git ignore

* add import order to prettier

* add src/ - move pages to src

* app- update import

* public: update translations

* _app.tsx: add Layout to app

* add components dir and Layout component

* index: update deprecated index layout

* update template styles

* update index story

* apply title class to template title

* update tests and stories

* run prettier - add prettier-plugin-sort-imports

* run eslint - add JSX global to linter

* fix translation

* yarn format and delete dead code

* run lint

* Copy over application-template-nextjs at ca2cc15.

Install and configure storybook, sass, and USWDS 3.0 [#15](navapbc/template-application-nextjs#15)

- Install and configure storybook
- Create the first story
- Install and configure [USWDS 3.0](https://designsystem.digital.gov/) as the design system
- Modify `Dockerfile` and `docker-compose.yml` to support USWDS and storybook
- Gitignore storybook, uswds assets, and compiled css
- Prettier ignore uswds assets
- Use postinstall hook to copy uswds static assets
- Stop using CSS modules
- Update some package dependencies
- Switch Docker base image to use alpine for increased speed

* Copy over application-template-nextjs at cd06ba6.

Setup i18n for next.js, jest, and storybook [#24](navapbc/template-application-nextjs#24)

- Install and configure [next-i18next](https://github.com/i18next/next-i18next) for Next.js internationalization
- Move next.js i18n config out of `next.config.js` and into `next-i18next.config.js`
- Modify `pages/_app.tsx` and `pages/index.tsx` to support i18n
- Move jest i18n config into `/tests/jest-i18n.ts`
- Install and configure [storybook-react-i18next](https://storybook.js.org/addons/storybook-react-i18next) for storybook internationalization
- Add support for `<em>` tags in react-i18next in both next.js and storybook.

Extras:
- Remove `space-before-function-paren` eslint rule
- Update eslint to follow prettier's rules
- Rename `test` dir to `tests` (plural)

* Copy over application-template-nextjs at cfe7c3d.

Adds a src dir, layout component, alphabetizes imports [#26](navapbc/template-application-nextjs#26)

- adds `src/` directory for project's webpack compilable JS and JSON files (this update is supported out of the box by [NextJS](https://nextjs.org/docs/advanced-features/src-directory) and pfml also uses this folder structure)
   - moves `api/`, `pages/` and `messages/` directories to `src/`
   - creates `components` directory and adds template `Layout` component

Extras:
- sets up prettier alphabetize imports
- adds storybook-static to prettier ignore
- sets $theme-show-compile-warnings to true for uswds

* Copy over application-template-nextjs at 0a349fa.

Enable dependabot version updates and codeql security scanning as CI jobs [#29](navapbc/template-application-nextjs#29)

- Enable and configure [dependabot version updates](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)
- Enable and configure [codeql security scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)

Note: These features were already enabled in this repo, so this commit
is just bringing in stylistic updates to make the two repos identical.

* en/common.json: add contact questions

* add contact page

* remove dead code

* contact: add contact page basic styling and copy

* create TextInput component -- add tests and storybook for contact page and textinput component

* Copy over application-template-nextjs at f59d2ac.

 Add layout styles missing from PR #26.
[#37](navapbc/template-application-nextjs#37)

* fix tests

* update tests

* wip

* fix tests

* run lint and format

* address rocket's comments

* update yarn.lock

* update eslint.json

* update eslintrc

* update textinput types for build

* run prettier

* add number-format

* fix bug

* yarn format

Co-authored-by: Rocket ! <rocketnova@users.noreply.github.com>
Co-authored-by: Alsia Plybeah <alsia@navapbc.com>
Co-authored-by: Shawn VanderJagt <91338100+shawnvanderjagt@users.noreply.github.com>

* Configure chromatic to support UAT (#41)

- Install chromatic as a dev dependency
- Configure chromatic as a CI job
- Configure chromatic to be run during local development

* Setup precommit hook (#42)

- Install husky as a dev dependency
- Configure husky to run linting and tests as a git precommit hook
- Have prettier ignore `app/coverage` files
- Rename `ts:check` to `ts-check` to match other script naming conventions

* Update dependencies. Closes #39, #40, #43, #44, #45. (#46)

* update tests

* add accordion storybook test

* Karina/wmdp 119 alternate benefits (#63)

* add jest tests for conditional alternate page routing from eligibility page

* add alternate jest test

* update styles

Co-authored-by: Rocket ! <rocketnova@users.noreply.github.com>
Co-authored-by: Alsia Plybeah <alsia@navapbc.com>
Co-authored-by: Shawn VanderJagt <91338100+shawnvanderjagt@users.noreply.github.com>

* Update app/jest.config.js

Co-authored-by: Tomas Apodaca <thomas.apodaca@gsa.gov>

* Update app/src/components/ButtonLink.tsx

Co-authored-by: Tomas Apodaca <thomas.apodaca@gsa.gov>

Co-authored-by: Rocket ! <rocketnova@users.noreply.github.com>
Co-authored-by: Alsia Plybeah <alsia@navapbc.com>
Co-authored-by: Shawn VanderJagt <91338100+shawnvanderjagt@users.noreply.github.com>
Co-authored-by: Tomas Apodaca <thomas.apodaca@gsa.gov>
karinamzalez pushed a commit to navapbc/wic-mt-demo-project-eligibility-screener that referenced this issue Sep 16, 2022
* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* WMDP-26 Set Up PR Template (#2)

Changes
added a .github folder which should store all github related processes (e.g. github actions, and templates)
added PR template
Context for reviewers
We want to establish a consistent pull request template that we’ll use.

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add eslintrc.js

* add stories dir and examples

* .eslint.js: prettier updates to eslint file

* add storybook dependencies

* Fix pull request template conflict (#8)

- Fixed the filename case conflict between `.github/PULL_REQUEST_TEMPLATE.md` and `.github/pull_request_template.md`
- Updated the pull request template to be slightly more generic

* Karina/wmdp 61 initial nextjs setup (#4)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* Karina/wmdp 35 setup test suite (#5)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README: add tsconfig documentation

* README: add test script documentation

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Karina/wmdp 33 linter typechecker (#6)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update package.json

add scripts to package.json

* run prettier

* add checkJs to tsconfig, remove duplicate code from js files

* add typescript parser and implement type information with linting

* eslintrc: add prettier recommended plugin

* preettierrc: add trailing comma check, remove redundant code

* README: add auto-generated modified note

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* re-add localesubpaths to next.config.js

* tsconfig.json: remove inline comment

* README: add docimentation for eslint and tsconfig

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README - add documentation for test

* README: add tsconfig documentation

* README: add test script documentation

* README: add documentation for dependencies

* yarn.lock

* Update app/__mocks__/styleMock.js

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* fix eslint errors

* WIP

* Create a separate tsconfig file to specify jsx mode for ts-jest vs next.js (#9)

Create a separate tsconfig file to specify jsx mode.

Next.js requires the typescript jsx mode to be `preserve`, but ts-jest
needs it to be a flavor of `react`. See:

- https://www.typescriptlang.org/docs/handbook/jsx.html
- https://kulshekhar.github.io/ts-jest/docs/getting-started/options/tsconfig
- kulshekhar/ts-jest#63 (comment)
- vercel/next.js#19155 (reply in thread)

* add home page story and uswds dependency

* update dependencies

* add uswds

* support sass in storybook

* fix eslint errors (#10)

* fix eslint errors

* update prettier and linting rules so that they're compatible

* add new eslint rule to README

* WIP - debugging uswds storybook with Rocket

* add storybook static to git ignore

* Remove storybook-static.

* Dockerize the application.

* Create LICENSE.md using Apache 2.0 (#13)

* Dockerize the application (#12)

* WIP.

* Both next.js and storybook working.

* USWDS 3.x instructions require uswds-compile. Can't use next.js or storybook sass without more unknown glue.

* Clean up unnecessary WIP stuff.

* Refactor to use same naming convention for all uswds assets. Add comments.

* Update dockerization to better support local development.

* Remove extraneous yarn command.

* Run formatter.

* Write some brief documentation.

* Fix typo.

* setup CI for NextJS template app (#16)

* Let prettier format project files.

* Run prettier via yarn format.

* Let prettier format project files (#17)

* yarn: add next.intl

* add messages directory with english and spanish json messages pages

* .storybook/preview: set up next-intl with storybook

* next.config: update next local config for itnernationalization

* app.tsx: add next-intl local/messages provider for internationalization

* tests: add nextintlprovider to jest tests, update snapshots

* update gulp

* create src directories -- move src folders

* add tests and stories for Layout and Index

* add scss loading for storybook

* run linter and prettier

* run prettier

* run prettier and lint

* update yarn.lock

* add prettier alphabetize imports -- add storybook-static to prettier ignore

* show compile warnigns

* remove space

* add container background

* WIP: successfully leveraging built-in nextjs sass compiling.

* Working storybook + nextjs + sass + uswds build.

- Drops support for [CSS
  modules](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css)
- Drops requirement for Gulp and USWDS compile
- Requires postcss and postcss-loader, which storybook says should be
  deprecated

* wip

* delete deprecated flies, add yarn.lock

* add welcome and eligibility page

* update ci.yml (#19)

* Run prettier.

* Update packages.

* Simplify docker. Update README. Use postinstalll script.

* Fix postinstall command.

* Tell prettier to ignore USWDS static assets.

* Disable nextjs telemetry.

* refactor

* jest

* test wip

* Add -p flag to creating public dir so mkdir doesn't error.

* Change comment style so we don't get unnecessary indents.

* Refactor which files storybook recognizes as stories.

* Use storybook lazy compilation.

* Remove no longer needed gulpfile.

* Unpin package versions; use at least instead.

* Remove no longer needed css import.

* add stories

* run prettier, no trailing comma

* correct linting errors

* Remove storybook lazy compilation. Not working.

* Remove non-essential storybook dependencies.

* Don't bind mount node_modules.

* delete depracated code

* host fonts locally for easier sb and jest setup and wider browser support

* support tsconfig module imports in jest and sb

* Switch base image to alpine.

* Run yarn format.

* Update README about node_modules in docker.

* setup next-i18next in project, jest, and sb -- todo: get sb globe to render

* Run formatter.

* Streamline docker build even more.

* Remove no longer installed storybook addons.

* Remove storybook-addon-i18next.

* Run formatter.

* Try storybook-i18n addon. Not quite right.

* Match eslint rule for space before parens to rule as described in README.

* Match prettier and eslint for trailing commas.

* Use the storybook-react-i18next addon for internationalization in storybook.

* Remove wip test of fs package.

* Restore homepage to previous state.

* Document i18n config.

* add storybook-static to git ignore

* add import order to prettier

* add src/ - move pages to src

* app- update import

* public: update translations

* _app.tsx: add Layout to app

* add components dir and Layout component

* index: update deprecated index layout

* update template styles

* update index story

* apply title class to template title

* update tests and stories

* run prettier - add prettier-plugin-sort-imports

* run eslint - add JSX global to linter

* fix translation

* yarn format and delete dead code

* run lint

* Copy over application-template-nextjs at ca2cc15.

Install and configure storybook, sass, and USWDS 3.0 [#15](navapbc/template-application-nextjs#15)

- Install and configure storybook
- Create the first story
- Install and configure [USWDS 3.0](https://designsystem.digital.gov/) as the design system
- Modify `Dockerfile` and `docker-compose.yml` to support USWDS and storybook
- Gitignore storybook, uswds assets, and compiled css
- Prettier ignore uswds assets
- Use postinstall hook to copy uswds static assets
- Stop using CSS modules
- Update some package dependencies
- Switch Docker base image to use alpine for increased speed

* Copy over application-template-nextjs at cd06ba6.

Setup i18n for next.js, jest, and storybook [#24](navapbc/template-application-nextjs#24)

- Install and configure [next-i18next](https://github.com/i18next/next-i18next) for Next.js internationalization
- Move next.js i18n config out of `next.config.js` and into `next-i18next.config.js`
- Modify `pages/_app.tsx` and `pages/index.tsx` to support i18n
- Move jest i18n config into `/tests/jest-i18n.ts`
- Install and configure [storybook-react-i18next](https://storybook.js.org/addons/storybook-react-i18next) for storybook internationalization
- Add support for `<em>` tags in react-i18next in both next.js and storybook.

Extras:
- Remove `space-before-function-paren` eslint rule
- Update eslint to follow prettier's rules
- Rename `test` dir to `tests` (plural)

* Copy over application-template-nextjs at cfe7c3d.

Adds a src dir, layout component, alphabetizes imports [#26](navapbc/template-application-nextjs#26)

- adds `src/` directory for project's webpack compilable JS and JSON files (this update is supported out of the box by [NextJS](https://nextjs.org/docs/advanced-features/src-directory) and pfml also uses this folder structure)
   - moves `api/`, `pages/` and `messages/` directories to `src/`
   - creates `components` directory and adds template `Layout` component

Extras:
- sets up prettier alphabetize imports
- adds storybook-static to prettier ignore
- sets $theme-show-compile-warnings to true for uswds

* Copy over application-template-nextjs at 0a349fa.

Enable dependabot version updates and codeql security scanning as CI jobs [#29](navapbc/template-application-nextjs#29)

- Enable and configure [dependabot version updates](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)
- Enable and configure [codeql security scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)

Note: These features were already enabled in this repo, so this commit
is just bringing in stylistic updates to make the two repos identical.

* en/common.json: add contact questions

* add contact page

* remove dead code

* contact: add contact page basic styling and copy

* create TextInput component -- add tests and storybook for contact page and textinput component

* Copy over application-template-nextjs at f59d2ac.

 Add layout styles missing from PR #26.
[#37](navapbc/template-application-nextjs#37)

* fix tests

* update tests

* wip

* fix tests

* run lint and format

* address rocket's comments

* update yarn.lock

* update eslint.json

* update eslintrc

* update textinput types for build

* run prettier

* add number-format

* fix bug

* en: update copy for header and index page

* Layout: update header to match new design

* remove depracated font imports

* pages: add clinic page, update contact page to route to clinic page

* add clinic.json to public directory

* add search.svg: magnifying glass for uswds search button

* tsconfig: add public module import

* update keys

* wip

* public: add clinic page copy

* ButtonLink: add disabled prop

* pages: handle clinic selection and disable button if clinic isn't selected

* unselect if research is reset

* add income page

* add jest tests

* add stories

* update income table styling

* Update app/jest.config.js

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/public/locales/en/common.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/public/locales/en/common.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/src/components/Dropdown.tsx

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* update tests

* add accordion storybook test

* add jest tests for conditional alternate page routing from eligibility page

* add alternate jest test

* update styles

* add review page

* run prettier and lint

* update tests

* Update app/src/pages/clinic.tsx

Co-authored-by: Tomas Apodaca <thomas.apodaca@gsa.gov>

* Update app/src/pages/clinic.tsx

Co-authored-by: Tomas Apodaca <thomas.apodaca@gsa.gov>

* add numberOfClinicsToReturn

* add numberOfClinicsToReturn

* add Table component and summary page

* wip

* wip

* wip

* wip

* wip

* add localStorage hook to persist data across refresh - add conditional continue button to contact page

* eligibility: add conditional review routing

* wip

* clinic: address type bug

* add Alert story

* add summary and review story

* dangerouslyset inner html of alert

* update tests

* prepoluate selected clinic from review page

* add Table story

* eligibility: add NOTE to useEffect

* eligibility: remove numbering

* package.json undo json format check change

* address merge conflicts with main

* remove dead code

* update snapshot

Co-authored-by: Alsia Plybeah <alsia@navapbc.com>
Co-authored-by: Rocket <rocketnova@users.noreply.github.com>
Co-authored-by: Shawn VanderJagt <91338100+shawnvanderjagt@users.noreply.github.com>
Co-authored-by: Tomas Apodaca <thomas.apodaca@gsa.gov>
karinamzalez pushed a commit to navapbc/wic-mt-demo-project-eligibility-screener that referenced this issue Sep 16, 2022
* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* WMDP-26 Set Up PR Template (#2)

Changes
added a .github folder which should store all github related processes (e.g. github actions, and templates)
added PR template
Context for reviewers
We want to establish a consistent pull request template that we’ll use.

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add eslintrc.js

* add stories dir and examples

* .eslint.js: prettier updates to eslint file

* add storybook dependencies

* Fix pull request template conflict (#8)

- Fixed the filename case conflict between `.github/PULL_REQUEST_TEMPLATE.md` and `.github/pull_request_template.md`
- Updated the pull request template to be slightly more generic

* Karina/wmdp 61 initial nextjs setup (#4)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* Karina/wmdp 35 setup test suite (#5)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README: add tsconfig documentation

* README: add test script documentation

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Karina/wmdp 33 linter typechecker (#6)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update package.json

add scripts to package.json

* run prettier

* add checkJs to tsconfig, remove duplicate code from js files

* add typescript parser and implement type information with linting

* eslintrc: add prettier recommended plugin

* preettierrc: add trailing comma check, remove redundant code

* README: add auto-generated modified note

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* re-add localesubpaths to next.config.js

* tsconfig.json: remove inline comment

* README: add docimentation for eslint and tsconfig

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README - add documentation for test

* README: add tsconfig documentation

* README: add test script documentation

* README: add documentation for dependencies

* yarn.lock

* Update app/__mocks__/styleMock.js

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* fix eslint errors

* WIP

* Create a separate tsconfig file to specify jsx mode for ts-jest vs next.js (#9)

Create a separate tsconfig file to specify jsx mode.

Next.js requires the typescript jsx mode to be `preserve`, but ts-jest
needs it to be a flavor of `react`. See:

- https://www.typescriptlang.org/docs/handbook/jsx.html
- https://kulshekhar.github.io/ts-jest/docs/getting-started/options/tsconfig
- kulshekhar/ts-jest#63 (comment)
- vercel/next.js#19155 (reply in thread)

* add home page story and uswds dependency

* update dependencies

* add uswds

* support sass in storybook

* fix eslint errors (#10)

* fix eslint errors

* update prettier and linting rules so that they're compatible

* add new eslint rule to README

* WIP - debugging uswds storybook with Rocket

* add storybook static to git ignore

* Remove storybook-static.

* Dockerize the application.

* Create LICENSE.md using Apache 2.0 (#13)

* Dockerize the application (#12)

* WIP.

* Both next.js and storybook working.

* USWDS 3.x instructions require uswds-compile. Can't use next.js or storybook sass without more unknown glue.

* Clean up unnecessary WIP stuff.

* Refactor to use same naming convention for all uswds assets. Add comments.

* Update dockerization to better support local development.

* Remove extraneous yarn command.

* Run formatter.

* Write some brief documentation.

* Fix typo.

* setup CI for NextJS template app (#16)

* Let prettier format project files.

* Run prettier via yarn format.

* Let prettier format project files (#17)

* yarn: add next.intl

* add messages directory with english and spanish json messages pages

* .storybook/preview: set up next-intl with storybook

* next.config: update next local config for itnernationalization

* app.tsx: add next-intl local/messages provider for internationalization

* tests: add nextintlprovider to jest tests, update snapshots

* update gulp

* create src directories -- move src folders

* add tests and stories for Layout and Index

* add scss loading for storybook

* run linter and prettier

* run prettier

* run prettier and lint

* update yarn.lock

* add prettier alphabetize imports -- add storybook-static to prettier ignore

* show compile warnigns

* remove space

* add container background

* WIP: successfully leveraging built-in nextjs sass compiling.

* Working storybook + nextjs + sass + uswds build.

- Drops support for [CSS
  modules](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css)
- Drops requirement for Gulp and USWDS compile
- Requires postcss and postcss-loader, which storybook says should be
  deprecated

* wip

* delete deprecated flies, add yarn.lock

* add welcome and eligibility page

* update ci.yml (#19)

* Run prettier.

* Update packages.

* Simplify docker. Update README. Use postinstalll script.

* Fix postinstall command.

* Tell prettier to ignore USWDS static assets.

* Disable nextjs telemetry.

* refactor

* jest

* test wip

* Add -p flag to creating public dir so mkdir doesn't error.

* Change comment style so we don't get unnecessary indents.

* Refactor which files storybook recognizes as stories.

* Use storybook lazy compilation.

* Remove no longer needed gulpfile.

* Unpin package versions; use at least instead.

* Remove no longer needed css import.

* add stories

* run prettier, no trailing comma

* correct linting errors

* Remove storybook lazy compilation. Not working.

* Remove non-essential storybook dependencies.

* Don't bind mount node_modules.

* delete depracated code

* host fonts locally for easier sb and jest setup and wider browser support

* support tsconfig module imports in jest and sb

* Switch base image to alpine.

* Run yarn format.

* Update README about node_modules in docker.

* setup next-i18next in project, jest, and sb -- todo: get sb globe to render

* Run formatter.

* Streamline docker build even more.

* Remove no longer installed storybook addons.

* Remove storybook-addon-i18next.

* Run formatter.

* Try storybook-i18n addon. Not quite right.

* Match eslint rule for space before parens to rule as described in README.

* Match prettier and eslint for trailing commas.

* Use the storybook-react-i18next addon for internationalization in storybook.

* Remove wip test of fs package.

* Restore homepage to previous state.

* Document i18n config.

* add storybook-static to git ignore

* add import order to prettier

* add src/ - move pages to src

* app- update import

* public: update translations

* _app.tsx: add Layout to app

* add components dir and Layout component

* index: update deprecated index layout

* update template styles

* update index story

* apply title class to template title

* update tests and stories

* run prettier - add prettier-plugin-sort-imports

* run eslint - add JSX global to linter

* fix translation

* yarn format and delete dead code

* run lint

* Copy over application-template-nextjs at ca2cc15.

Install and configure storybook, sass, and USWDS 3.0 [#15](navapbc/template-application-nextjs#15)

- Install and configure storybook
- Create the first story
- Install and configure [USWDS 3.0](https://designsystem.digital.gov/) as the design system
- Modify `Dockerfile` and `docker-compose.yml` to support USWDS and storybook
- Gitignore storybook, uswds assets, and compiled css
- Prettier ignore uswds assets
- Use postinstall hook to copy uswds static assets
- Stop using CSS modules
- Update some package dependencies
- Switch Docker base image to use alpine for increased speed

* Copy over application-template-nextjs at cd06ba6.

Setup i18n for next.js, jest, and storybook [#24](navapbc/template-application-nextjs#24)

- Install and configure [next-i18next](https://github.com/i18next/next-i18next) for Next.js internationalization
- Move next.js i18n config out of `next.config.js` and into `next-i18next.config.js`
- Modify `pages/_app.tsx` and `pages/index.tsx` to support i18n
- Move jest i18n config into `/tests/jest-i18n.ts`
- Install and configure [storybook-react-i18next](https://storybook.js.org/addons/storybook-react-i18next) for storybook internationalization
- Add support for `<em>` tags in react-i18next in both next.js and storybook.

Extras:
- Remove `space-before-function-paren` eslint rule
- Update eslint to follow prettier's rules
- Rename `test` dir to `tests` (plural)

* Copy over application-template-nextjs at cfe7c3d.

Adds a src dir, layout component, alphabetizes imports [#26](navapbc/template-application-nextjs#26)

- adds `src/` directory for project's webpack compilable JS and JSON files (this update is supported out of the box by [NextJS](https://nextjs.org/docs/advanced-features/src-directory) and pfml also uses this folder structure)
   - moves `api/`, `pages/` and `messages/` directories to `src/`
   - creates `components` directory and adds template `Layout` component

Extras:
- sets up prettier alphabetize imports
- adds storybook-static to prettier ignore
- sets $theme-show-compile-warnings to true for uswds

* Copy over application-template-nextjs at 0a349fa.

Enable dependabot version updates and codeql security scanning as CI jobs [#29](navapbc/template-application-nextjs#29)

- Enable and configure [dependabot version updates](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)
- Enable and configure [codeql security scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)

Note: These features were already enabled in this repo, so this commit
is just bringing in stylistic updates to make the two repos identical.

* en/common.json: add contact questions

* add contact page

* remove dead code

* contact: add contact page basic styling and copy

* create TextInput component -- add tests and storybook for contact page and textinput component

* Copy over application-template-nextjs at f59d2ac.

 Add layout styles missing from PR #26.
[#37](navapbc/template-application-nextjs#37)

* fix tests

* update tests

* wip

* fix tests

* run lint and format

* address rocket's comments

* update yarn.lock

* update eslint.json

* update eslintrc

* update textinput types for build

* run prettier

* add number-format

* fix bug

* en: update copy for header and index page

* Layout: update header to match new design

* remove depracated font imports

* pages: add clinic page, update contact page to route to clinic page

* add clinic.json to public directory

* add search.svg: magnifying glass for uswds search button

* tsconfig: add public module import

* update keys

* wip

* public: add clinic page copy

* ButtonLink: add disabled prop

* pages: handle clinic selection and disable button if clinic isn't selected

* unselect if research is reset

* add income page

* add jest tests

* add stories

* update income table styling

* Update app/jest.config.js

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/public/locales/en/common.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/public/locales/en/common.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/src/components/Dropdown.tsx

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* update tests

* add accordion storybook test

* add jest tests for conditional alternate page routing from eligibility page

* add alternate jest test

* update styles

* add review page

* run prettier and lint

* update tests

* Update app/src/pages/clinic.tsx

Co-authored-by: Tomas Apodaca <thomas.apodaca@gsa.gov>

* Update app/src/pages/clinic.tsx

Co-authored-by: Tomas Apodaca <thomas.apodaca@gsa.gov>

* add numberOfClinicsToReturn

* add numberOfClinicsToReturn

* add Table component and summary page

* wip

* wip

* wip

* wip

* wip

* add localStorage hook to persist data across refresh - add conditional continue button to contact page

* eligibility: add conditional review routing

* wip

* clinic: address type bug

* add Alert story

* add summary and review story

* dangerouslyset inner html of alert

* update tests

* prepoluate selected clinic from review page

* Eligibility: add 'have you had WIC before' question and radio

* Overview tables: add before qiestion and answers to review and summary

* fix broken eligibility test

* add fdpir to state

* add fdpir to state

* remove numbers from eligibility

Co-authored-by: Alsia Plybeah <alsia@navapbc.com>
Co-authored-by: Rocket <rocketnova@users.noreply.github.com>
Co-authored-by: Shawn VanderJagt <91338100+shawnvanderjagt@users.noreply.github.com>
Co-authored-by: Tomas Apodaca <thomas.apodaca@gsa.gov>
karinamzalez pushed a commit to navapbc/wic-mt-demo-project-eligibility-screener that referenced this issue Sep 27, 2022
* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* WMDP-26 Set Up PR Template (#2)

Changes
added a .github folder which should store all github related processes (e.g. github actions, and templates)
added PR template
Context for reviewers
We want to establish a consistent pull request template that we’ll use.

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add eslintrc.js

* add stories dir and examples

* .eslint.js: prettier updates to eslint file

* add storybook dependencies

* Fix pull request template conflict (#8)

- Fixed the filename case conflict between `.github/PULL_REQUEST_TEMPLATE.md` and `.github/pull_request_template.md`
- Updated the pull request template to be slightly more generic

* Karina/wmdp 61 initial nextjs setup (#4)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* Karina/wmdp 35 setup test suite (#5)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README: add tsconfig documentation

* README: add test script documentation

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Karina/wmdp 33 linter typechecker (#6)

* yarn create next-app --typescript

* clean up auto-generated pages, public and styles

* next.config.js: setup i18n locale for internationalization

* next.config.js: add code comment re: internationalization

* add html tags for VO

* Update app/styles/Home.module.css

update stickcy nav

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* tsconfig: target es6

* add babelec

* add __mocks__ with mock styles for testing

* -test: add first jest test and snapshot test for Home page
- add jest.setup.js to require jest-dom

* - add jest.config.js
- package.json: add react testing library, babel and jest dependencies
- add first test
- update jsx
- yarn.lock updated with new packages

* .eslintrc.json: extend nava eslint config

* package.json: add eslint-config-nava

* add ts check to all js files

* add dev note regarding incremental type checking

* add TS-specific eslint

* update read me with development typecheck and linting tips

* update read me with development typecheck and linting tips

* add and setup prettier

* Update app/.babelrc

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update package.json

add scripts to package.json

* run prettier

* add checkJs to tsconfig, remove duplicate code from js files

* add typescript parser and implement type information with linting

* eslintrc: add prettier recommended plugin

* preettierrc: add trailing comma check, remove redundant code

* README: add auto-generated modified note

* Update app/README.md

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* add testRegex and testPathIgnorePatterns

* re-add localesubpaths to next.config.js

* tsconfig.json: remove inline comment

* README: add docimentation for eslint and tsconfig

* setup jest-axe

* add new lines add end of files

* jest.config.js: add inline comments

* README - add documentation for test

* README: add tsconfig documentation

* README: add test script documentation

* README: add documentation for dependencies

* yarn.lock

* Update app/__mocks__/styleMock.js

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* fix eslint errors

* WIP

* Create a separate tsconfig file to specify jsx mode for ts-jest vs next.js (#9)

Create a separate tsconfig file to specify jsx mode.

Next.js requires the typescript jsx mode to be `preserve`, but ts-jest
needs it to be a flavor of `react`. See:

- https://www.typescriptlang.org/docs/handbook/jsx.html
- https://kulshekhar.github.io/ts-jest/docs/getting-started/options/tsconfig
- kulshekhar/ts-jest#63 (comment)
- vercel/next.js#19155 (reply in thread)

* add home page story and uswds dependency

* update dependencies

* add uswds

* support sass in storybook

* fix eslint errors (#10)

* fix eslint errors

* update prettier and linting rules so that they're compatible

* add new eslint rule to README

* WIP - debugging uswds storybook with Rocket

* add storybook static to git ignore

* Remove storybook-static.

* Dockerize the application.

* Create LICENSE.md using Apache 2.0 (#13)

* Dockerize the application (#12)

* WIP.

* Both next.js and storybook working.

* USWDS 3.x instructions require uswds-compile. Can't use next.js or storybook sass without more unknown glue.

* Clean up unnecessary WIP stuff.

* Refactor to use same naming convention for all uswds assets. Add comments.

* Update dockerization to better support local development.

* Remove extraneous yarn command.

* Run formatter.

* Write some brief documentation.

* Fix typo.

* setup CI for NextJS template app (#16)

* Let prettier format project files.

* Run prettier via yarn format.

* Let prettier format project files (#17)

* yarn: add next.intl

* add messages directory with english and spanish json messages pages

* .storybook/preview: set up next-intl with storybook

* next.config: update next local config for itnernationalization

* app.tsx: add next-intl local/messages provider for internationalization

* tests: add nextintlprovider to jest tests, update snapshots

* update gulp

* create src directories -- move src folders

* add tests and stories for Layout and Index

* add scss loading for storybook

* run linter and prettier

* run prettier

* run prettier and lint

* update yarn.lock

* add prettier alphabetize imports -- add storybook-static to prettier ignore

* show compile warnigns

* remove space

* add container background

* WIP: successfully leveraging built-in nextjs sass compiling.

* Working storybook + nextjs + sass + uswds build.

- Drops support for [CSS
  modules](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css)
- Drops requirement for Gulp and USWDS compile
- Requires postcss and postcss-loader, which storybook says should be
  deprecated

* wip

* delete deprecated flies, add yarn.lock

* add welcome and eligibility page

* update ci.yml (#19)

* Run prettier.

* Update packages.

* Simplify docker. Update README. Use postinstalll script.

* Fix postinstall command.

* Tell prettier to ignore USWDS static assets.

* Disable nextjs telemetry.

* refactor

* jest

* test wip

* Add -p flag to creating public dir so mkdir doesn't error.

* Change comment style so we don't get unnecessary indents.

* Refactor which files storybook recognizes as stories.

* Use storybook lazy compilation.

* Remove no longer needed gulpfile.

* Unpin package versions; use at least instead.

* Remove no longer needed css import.

* add stories

* run prettier, no trailing comma

* correct linting errors

* Remove storybook lazy compilation. Not working.

* Remove non-essential storybook dependencies.

* Don't bind mount node_modules.

* delete depracated code

* host fonts locally for easier sb and jest setup and wider browser support

* support tsconfig module imports in jest and sb

* Switch base image to alpine.

* Run yarn format.

* Update README about node_modules in docker.

* setup next-i18next in project, jest, and sb -- todo: get sb globe to render

* Run formatter.

* Streamline docker build even more.

* Remove no longer installed storybook addons.

* Remove storybook-addon-i18next.

* Run formatter.

* Try storybook-i18n addon. Not quite right.

* Match eslint rule for space before parens to rule as described in README.

* Match prettier and eslint for trailing commas.

* Use the storybook-react-i18next addon for internationalization in storybook.

* Remove wip test of fs package.

* Restore homepage to previous state.

* Document i18n config.

* add storybook-static to git ignore

* add import order to prettier

* add src/ - move pages to src

* app- update import

* public: update translations

* _app.tsx: add Layout to app

* add components dir and Layout component

* index: update deprecated index layout

* update template styles

* update index story

* apply title class to template title

* update tests and stories

* run prettier - add prettier-plugin-sort-imports

* run eslint - add JSX global to linter

* fix translation

* yarn format and delete dead code

* run lint

* Copy over application-template-nextjs at ca2cc15.

Install and configure storybook, sass, and USWDS 3.0 [#15](navapbc/template-application-nextjs#15)

- Install and configure storybook
- Create the first story
- Install and configure [USWDS 3.0](https://designsystem.digital.gov/) as the design system
- Modify `Dockerfile` and `docker-compose.yml` to support USWDS and storybook
- Gitignore storybook, uswds assets, and compiled css
- Prettier ignore uswds assets
- Use postinstall hook to copy uswds static assets
- Stop using CSS modules
- Update some package dependencies
- Switch Docker base image to use alpine for increased speed

* Copy over application-template-nextjs at cd06ba6.

Setup i18n for next.js, jest, and storybook [#24](navapbc/template-application-nextjs#24)

- Install and configure [next-i18next](https://github.com/i18next/next-i18next) for Next.js internationalization
- Move next.js i18n config out of `next.config.js` and into `next-i18next.config.js`
- Modify `pages/_app.tsx` and `pages/index.tsx` to support i18n
- Move jest i18n config into `/tests/jest-i18n.ts`
- Install and configure [storybook-react-i18next](https://storybook.js.org/addons/storybook-react-i18next) for storybook internationalization
- Add support for `<em>` tags in react-i18next in both next.js and storybook.

Extras:
- Remove `space-before-function-paren` eslint rule
- Update eslint to follow prettier's rules
- Rename `test` dir to `tests` (plural)

* Copy over application-template-nextjs at cfe7c3d.

Adds a src dir, layout component, alphabetizes imports [#26](navapbc/template-application-nextjs#26)

- adds `src/` directory for project's webpack compilable JS and JSON files (this update is supported out of the box by [NextJS](https://nextjs.org/docs/advanced-features/src-directory) and pfml also uses this folder structure)
   - moves `api/`, `pages/` and `messages/` directories to `src/`
   - creates `components` directory and adds template `Layout` component

Extras:
- sets up prettier alphabetize imports
- adds storybook-static to prettier ignore
- sets $theme-show-compile-warnings to true for uswds

* Copy over application-template-nextjs at 0a349fa.

Enable dependabot version updates and codeql security scanning as CI jobs [#29](navapbc/template-application-nextjs#29)

- Enable and configure [dependabot version updates](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)
- Enable and configure [codeql security scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)

Note: These features were already enabled in this repo, so this commit
is just bringing in stylistic updates to make the two repos identical.

* en/common.json: add contact questions

* add contact page

* remove dead code

* contact: add contact page basic styling and copy

* create TextInput component -- add tests and storybook for contact page and textinput component

* Copy over application-template-nextjs at f59d2ac.

 Add layout styles missing from PR #26.
[#37](navapbc/template-application-nextjs#37)

* fix tests

* update tests

* wip

* fix tests

* run lint and format

* address rocket's comments

* update yarn.lock

* update eslint.json

* update eslintrc

* update textinput types for build

* run prettier

* add number-format

* fix bug

* en: update copy for header and index page

* Layout: update header to match new design

* remove depracated font imports

* pages: add clinic page, update contact page to route to clinic page

* add clinic.json to public directory

* add search.svg: magnifying glass for uswds search button

* tsconfig: add public module import

* update keys

* wip

* public: add clinic page copy

* ButtonLink: add disabled prop

* pages: handle clinic selection and disable button if clinic isn't selected

* unselect if research is reset

* add income page

* add jest tests

* add stories

* update income table styling

* Update app/jest.config.js

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/package.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/public/locales/en/common.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/public/locales/en/common.json

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* Update app/src/components/Dropdown.tsx

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* update tests

* add accordion storybook test

* add jest tests for conditional alternate page routing from eligibility page

* add alternate jest test

* update styles

* add review page

* run prettier and lint

* update tests

* Update app/src/pages/clinic.tsx

Co-authored-by: Tomas Apodaca <thomas.apodaca@gsa.gov>

* Update app/src/pages/clinic.tsx

Co-authored-by: Tomas Apodaca <thomas.apodaca@gsa.gov>

* add numberOfClinicsToReturn

* add numberOfClinicsToReturn

* add Table component and summary page

* wip

* wip

* wip

* wip

* wip

* add localStorage hook to persist data across refresh - add conditional continue button to contact page

* eligibility: add conditional review routing

* wip

* clinic: address type bug

* add Alert story

* add summary and review story

* dangerouslyset inner html of alert

* update tests

* prepoluate selected clinic from review page

* Eligibility: add 'have you had WIC before' question and radio

* Overview tables: add before qiestion and answers to review and summary

* fix broken eligibility test

* address type issue

* format

* add minimum phone length

* remove dead code

* remove dead code

* contact: remove dead width code

* Karina/wmdp 182 restrict user flow (#101)

* remove dead code

* contact: getServersideProps- WIP rerouting

* contact, clinic, income and review: restrict user access to these pages based off of previousRoute

* contact, clinic, income and review: restrict user access to these pages based off of previousRoute

* remove dead code

* address getserversideprops type error

* yarn format

* update snaps

* Update app/src/pages/clinic.tsx

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

* yarn format

Co-authored-by: Rocket <rocketnova@users.noreply.github.com>

Co-authored-by: Alsia Plybeah <alsia@navapbc.com>
Co-authored-by: Rocket <rocketnova@users.noreply.github.com>
Co-authored-by: Shawn VanderJagt <91338100+shawnvanderjagt@users.noreply.github.com>
Co-authored-by: Tomas Apodaca <thomas.apodaca@gsa.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests