-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WeConnect initial commit (React Front End)
- Loading branch information
0 parents
commit 20de7b0
Showing
98 changed files
with
10,658 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"sourceType": "unambiguous", | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react" | ||
], | ||
"plugins": [ | ||
[ | ||
"@babel/plugin-transform-class-properties", | ||
{ | ||
"loose": true | ||
} | ||
], | ||
["@babel/plugin-transform-private-methods", { "loose": true }], | ||
["@babel/plugin-transform-private-property-in-object", { "loose": true }], | ||
[ | ||
"babel-plugin-styled-components", | ||
{ | ||
"displayName": true, | ||
"fileName": false | ||
} | ||
], | ||
"@babel/plugin-transform-runtime", | ||
"@babel/plugin-syntax-class-properties", | ||
"@babel/plugin-syntax-import-meta" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = 80 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = 0 | ||
trim_trailing_whitespace = false | ||
|
||
[COMMIT_EDITMSG] | ||
max_line_length = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src/js/vendor/*.js | ||
src/js/mock-data/ | ||
src/js/dispatcher/Dispatcher.js | ||
srcDeprecated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
"parser": "@babel/eslint-parser", | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
|
||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"es6": true | ||
}, | ||
|
||
"extends": "airbnb", | ||
|
||
"rules": { | ||
"array-bracket-spacing": [1, "never"], | ||
"camelcase": [1], | ||
"class-methods-use-this": 0, // We want to allow helper functions that don't use 'this' in classes | ||
"jsx-a11y/alt-text": 0, | ||
"jsx-a11y/anchor-has-content": 1, | ||
"jsx-a11y/anchor-is-valid": 1, | ||
"jsx-a11y/click-events-have-key-events": 0, | ||
"jsx-a11y/heading-has-content": 1, | ||
"jsx-a11y/iframe-has-title": 1, | ||
"jsx-a11y/label-has-associated-control": 1, | ||
"jsx-a11y/label-has-for": 0, // Deprecated in favor of 'label-has-associated-control' | ||
"jsx-a11y/mouse-events-have-key-events": 1, | ||
"jsx-a11y/no-autofocus": 1, | ||
"jsx-a11y/no-noninteractive-element-interactions": 1, | ||
"jsx-a11y/no-static-element-interactions": 0, | ||
"jsx-quotes": 2, | ||
"linebreak-style": 0, | ||
"max-len": [0, 80, 4], | ||
"no-console": [0], | ||
"no-else-return": [0], | ||
"no-multi-spaces": [0], | ||
"no-multiple-empty-lines": [0], // allow indented comments (like this one) | ||
"no-plusplus": [0], | ||
"no-underscore-dangle": [0], | ||
"object-curly-newline": 0, | ||
"object-curly-spacing": [1, | ||
"always", { | ||
"arraysInObjects": false, | ||
"objectsInObjects": true | ||
} | ||
], | ||
"operator-linebreak": [1, "after"], | ||
"padded-blocks": [1], | ||
"prefer-destructuring": 1, | ||
"quotes": [1, "single", "avoid-escape"], | ||
"radix": 0, // Dec 2018: We always use base 10, so specifying it each time seems excessive | ||
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies | ||
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks | ||
"react/button-has-type": 1, | ||
"react/destructuring-assignment": 0, // Dec 2018: We should do this! But right now we have 3990 warnings/errors if enabled. | ||
"react/forbid-prop-types": 0, // Dec 2018: Should consider someday | ||
"react/indent-prop": 0, | ||
"react/jsx-first-prop-new-line": 0, | ||
"react/jsx-indent-props": 0, | ||
"react/jsx-no-bind": 1, // Dec 2018: Should these be errors? | ||
"react/jsx-props-no-spreading": 1, | ||
"react/no-access-state-in-setstate": 1, | ||
"react/no-array-index-key": 1, | ||
"react/no-children-prop": 1, | ||
"react/no-did-mount-set-state": 0, | ||
"react/no-did-update-set-state": 0, | ||
"react/no-string-refs": 1, | ||
"react/no-unused-prop-types": 1, | ||
"react/no-unused-state": 1, | ||
"react/prefer-stateless-function": 0, | ||
"react/prop-types": 1, | ||
"react/require-default-props": 0, // Dec 2018: Might have value someday | ||
"react/sort-comp": 1, | ||
"space-before-function-paren": [1, {"anonymous": "always", "named": "always"}], | ||
"space-in-parens": [1], | ||
"template-curly-spacing": ["warn", "never"], | ||
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }] | ||
}, | ||
"plugins": [ | ||
"react", | ||
"react-hooks" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### Please describe the issue (What happens? What do you expect?) | ||
|
||
### Steps to reproduce the problem (1, 2, 3...), including links |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### What github.com/wevote/weconnect/issues does this fix? | ||
|
||
### Changes included this pull request? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Node.js CI Build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: ['18.x', '20.x'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
- run: cp src/js/config-template.js src/js/config.js | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
- run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
# This .gitignore file partially built from https://github.com/github/gitignore | ||
# and https://github.com/github/gitignore/blob/master/Node.gitignore | ||
|
||
# Ignore build files | ||
build | ||
build-live | ||
package-lock.json | ||
|
||
# TernJS | ||
################### | ||
.tern-project | ||
|
||
# Logs | ||
################### | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Runtime data | ||
################### | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
################### | ||
lib-cov | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
################### | ||
.grunt | ||
|
||
# node-waf configuration | ||
################### | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
################### | ||
build/Release | ||
|
||
# Dependency directory | ||
################### | ||
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git | ||
node_modules | ||
|
||
# Optional npm cache directory | ||
################### | ||
.npm | ||
|
||
# Optional REPL history | ||
################### | ||
.node_repl_history | ||
|
||
# Compiled source # | ||
################### | ||
venv | ||
*.com | ||
*.class | ||
*.dll | ||
*.exe | ||
*.so | ||
|
||
# PyInstaller # | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
############### | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs # | ||
################## | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports # | ||
################################ | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
|
||
# Translations # | ||
################ | ||
*.mo | ||
*.pot | ||
|
||
# Sphinx documentation # | ||
######################## | ||
docs/_build/ | ||
|
||
# PyBuilder # | ||
############# | ||
target/ | ||
|
||
# Packages # | ||
############ | ||
# it's better to unpack these files and commit the raw source | ||
# git has its own built in compression methods | ||
*.7z | ||
*.dmg | ||
*.iso | ||
*.rar | ||
*.zip | ||
|
||
# OS generated files # | ||
###################### | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.db | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# SublimeText # | ||
############### | ||
# cache files for sublime text | ||
*.tmlanguage.cache | ||
*.tmPreferences.cache | ||
*.stTheme.cache | ||
|
||
# workspace files are user-specific | ||
*.sublime-workspace | ||
|
||
# project files should be checked into the repository, unless a significant | ||
# proportion of contributors will probably not be using SublimeText | ||
# *.sublime-project | ||
|
||
# sftp configuration file # | ||
########################### | ||
sftp-config.json | ||
|
||
# Pycharm # | ||
########### | ||
.idea | ||
|
||
# Vim / emacs # | ||
############### | ||
*.swp | ||
*.swo | ||
|
||
# Compass / Sass # | ||
################## | ||
.sass-cache | ||
|
||
# Heroku Related # | ||
################## | ||
staticfiles | ||
|
||
# Other # | ||
######### | ||
/geo/data/ | ||
/**/migrations/*.py | ||
!/**/migrations/__init__.py | ||
srcCordova | ||
src/cert/*.* | ||
!src/cert/README.txt | ||
src/js/compileDate.js | ||
src/js/config.js | ||
src/js/config-qa.js | ||
src/js/config-www.js | ||
tests/browserstack/browserstack.config.js | ||
src/javascript/google-tag-manager.js | ||
src/javascript/google-tag-manager-qa.js | ||
src/javascript/google-tag-manager-www.js | ||
src/javascript/google-analytics.js | ||
src/javascript/google-analytics-qa.js | ||
src/javascript/google-analytics-www.js | ||
web_app/build/* | ||
*.crt | ||
*.key | ||
.vscode | ||
.gitattributes | ||
/yarn.lock | ||
server.csr | ||
tests/browserstack/wdio.conf.js | ||
tests/browserstack/wdio.conf.template | ||
tests/browserstack*/config/browserstack.config.js | ||
tests/browserstack*/capabilities/mobile.json | ||
tests/browserstack*/screenshots/ | ||
storybook-static/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"preset": "airbnb", | ||
"validateQuoteMarks": null, | ||
"excludeFiles": ["build/**", "node_modules"], | ||
"maximumLineLength": null, | ||
"maxErrors": 200, | ||
"disallowSpacesInFunctionDeclaration": null, | ||
"requirePaddingNewLinesBeforeLineComments": null, | ||
"requirePaddingNewLinesAfterBlocks": null, | ||
"disallowMultipleLineBreaks": null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
init-author-name="We Vote Dev Team" | ||
init-author-email="[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** @type { import('@storybook/react-webpack5').StorybookConfig } */ | ||
const config = { | ||
stories: ['../src/js/common/stories/**/*.mdx', '../src/js/common/stories/**/*.stories.@(js|jsx|ts|tsx)'], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-interactions", | ||
], | ||
framework: { | ||
name: "@storybook/react-webpack5", | ||
options: { | ||
builder: { | ||
useSWC: true, | ||
}, | ||
}, | ||
}, | ||
docs: { | ||
autodocs: "tag", | ||
}, | ||
}; | ||
export default config; |
Oops, something went wrong.