Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a535cdf
initial setup - gitignore, readme, react, eslint, prettier, vite, imp…
altoinu Jan 29, 2025
a016c12
HTML layout
altoinu Jan 29, 2025
4dbd1fe
Promise executor functions should not be async
altoinu Jan 29, 2025
16c80cb
CSS
altoinu Jan 29, 2025
e222c27
default values
altoinu Jan 29, 2025
2845990
cleaned useFetch
altoinu Jan 29, 2025
698fd00
FareWidget, loader spinner, context
altoinu Jan 29, 2025
9454a56
load data into select, state to remember selections, onChange handlers
altoinu Jan 29, 2025
7351a1e
Merge branch 'ui_layout' into develop
altoinu Jan 29, 2025
2de31fd
Merge branch 'develop' into data_handling
altoinu Jan 29, 2025
0412671
fare cost prop, and USD format
altoinu Jan 29, 2025
708a341
removed unused comment
altoinu Jan 29, 2025
acba11e
Ride day selection helper text
altoinu Jan 29, 2025
5827e45
pass data to useMemo on parent
altoinu Jan 29, 2025
1883b06
fare calculation using selected options
altoinu Jan 30, 2025
31d1d24
comments, documentation, removed debug code
altoinu Jan 30, 2025
d1c6a44
Merge branch 'data_handling' into develop
altoinu Jan 30, 2025
c04968c
vite config update for supported browsers
altoinu Jan 30, 2025
4c33656
Merge branch 'develop'
altoinu Jan 30, 2025
1321e71
100% width
altoinu Jan 30, 2025
55773c4
accessibility update
altoinu Jan 30, 2025
5aa5833
Merge branch 'accessibility' into develop
altoinu Jan 30, 2025
1369ed2
Merge branch 'develop'
altoinu Jan 30, 2025
5bbc1da
display special message when "Anytime" option is selected
altoinu Jan 30, 2025
dedfa91
Merge branch 'anytime_fare' into develop
altoinu Jan 30, 2025
a841290
Merge branch 'develop'
altoinu Jan 30, 2025
276beb8
organized stuff
altoinu Feb 6, 2025
1c17e7e
Merge branch 'clean_up' into develop
altoinu Feb 6, 2025
45bc310
Merge branch 'develop'
altoinu Feb 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# thinkcompany-code-challenges/septa-fare-calculator

SEPTA Rail Fare Calculator Challenge for Think Company.

For more info: https://github.com/thinkcompany/code-challenges/tree/master/septa-fare-calculator

## Node stuff

- Node.js (v23.5.0) and npm [https://nodejs.org/](https://nodejs.org/)

## Initial set up

```
npm install
```

## To run

```
npm run dev
```

## Lint

```
npm run lint:fix
```
66 changes: 66 additions & 0 deletions septa-fare-calculator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/bower_components
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build
/dist
/docs

# misc, OS files
Thumbs.db
ehthumbs.db
Desktop.ini
.DS_Store
._*
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
logs

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# editors
*~
*.swp
*.tmproj
*.tmproject
*.sublime-*
.idea
.idea/
/.project
.project/
.settings/
.vscode/
.sass-cache

# Yeoman meta-data
.yo-rc.json
1 change: 1 addition & 0 deletions septa-fare-calculator/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
23.5.0
3 changes: 3 additions & 0 deletions septa-fare-calculator/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore artifacts:
build
coverage
24 changes: 24 additions & 0 deletions septa-fare-calculator/.prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const prettierConfig = {
arrowParens: "always",
bracketSpacing: true,
bracketSameLine: false,
endOfLine: "lf",
htmlWhitespaceSensitivity: "css",
insertPragma: false,
jsxSingleQuote: false,
printWidth: 80,
proseWrap: "preserve",
quoteProps: "as-needed",
requirePragma: false,
semi: true,
singleQuote: false,
tabWidth: 2,
trailingComma: "all",
useTabs: false,
// prettier-plugin-sort-imports options
sortingMethod: "alphabetical",
plugins: ["./node_modules/prettier-plugin-sort-imports/dist/index.js"],
};

export default prettierConfig;
// trailingComma: "es5",
File renamed without changes.
18 changes: 18 additions & 0 deletions septa-fare-calculator/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import pluginJs from "@eslint/js";
import eslint from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
import pluginReact from "eslint-plugin-react";
import globals from "globals";

/** @type {import('eslint').Linter.Config[]} */
export default [
{
files: ["**/*.{js,mjs,cjs,jsx}"],
languageOptions: { globals: globals.browser },
},
pluginJs.configs.recommended,
eslint.configs.recommended,
pluginReact.configs.flat.recommended,
pluginReact.configs.flat["jsx-runtime"],
eslintConfigPrettier,
];
3 changes: 2 additions & 1 deletion septa-fare-calculator/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<title>SEPTA Regional Rail Fare Calculator</title>
</head>
<body>

<div id="root"></div>
<script type="module" src="/src/index.jsx"></script>
</body>
</html>
Loading