Skip to content

Commit 5a74fa6

Browse files
authored
Merge pull request #3277 from wevote/develop
Bringing over all changes from develop since 2016.
2 parents 85b80ff + e9e4d7c commit 5a74fa6

File tree

1,100 files changed

+132111
-29391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,100 files changed

+132111
-29391
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
src/js/vendor/*.js
2-
src/js/mock-data/
2+
src/js/mock-data/
3+
src/js/dispatcher/Dispatcher.js

.eslintrc

Lines changed: 56 additions & 188 deletions
Original file line numberDiff line numberDiff line change
@@ -1,212 +1,80 @@
11
{
22
"parser": "babel-eslint",
3+
"parserOptions": {
4+
"sourceType": "module"
5+
},
36

47
"env": {
58
"browser": true,
69
"node": true,
710
"es6": true
811
},
912

10-
"ecmaFeatures": {
11-
"arrowFunctions": true,
12-
"binaryLiterals": true,
13-
"blockBindings": true,
14-
"classes": false,
15-
"defaultParams": true,
16-
"destructuring": true,
17-
"forOf": true,
18-
"generators": true,
19-
"modules": true,
20-
"objectLiteralComputedProperties": true,
21-
"objectLiteralDuplicateProperties": true,
22-
"objectLiteralShorthandMethods": true,
23-
"objectLiteralShorthandProperties": true,
24-
"octalLiterals": true,
25-
"regexUFlag": true,
26-
"regexYFlag": true,
27-
"spread": true,
28-
"superInFunctions": false,
29-
"templateStrings": true,
30-
"unicodeCodePointEscapes": true,
31-
"globalReturn": true,
32-
"jsx": true
33-
},
13+
"extends": "airbnb",
3414

3515
"rules": {
36-
"block-scoped-var": [0],
37-
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
38-
"camelcase": [0],
39-
"comma-dangle": [0],
40-
"comma-spacing": [1],
41-
"comma-style": [2, "last"],
42-
"complexity": [0, 11],
43-
"consistent-return": [1],
44-
"consistent-this": [0, "that"],
45-
"curly": [0, "multi-line"],
46-
"default-case": [1],
47-
"dot-notation": [2, {"allowKeywords": true}],
48-
"eol-last": [1],
49-
"eqeqeq": [1],
50-
"func-names": [0],
51-
"func-style": [0, "declaration"],
52-
"generator-star-spacing": [2, "after"],
53-
"guard-for-in": [0],
54-
"handle-callback-err": [0],
55-
"key-spacing": [1, {"beforeColon": false, "afterColon": true}],
56-
"quotes": [1, "double", "avoid-escape"],
57-
"max-depth": [0, 4],
16+
"array-bracket-spacing": [1, "never"],
17+
"camelcase": [1],
18+
"class-methods-use-this": 0, // We want to allow helper functions that don't use 'this' in classes
19+
"jsx-a11y/alt-text": 0,
20+
"jsx-a11y/anchor-has-content": 1,
21+
"jsx-a11y/anchor-is-valid": 1,
22+
"jsx-a11y/click-events-have-key-events": 0,
23+
"jsx-a11y/heading-has-content": 1,
24+
"jsx-a11y/iframe-has-title": 1,
25+
"jsx-a11y/label-has-associated-control": 1,
26+
"jsx-a11y/label-has-for": 0, // Deprecated in favor of 'label-has-associated-control'
27+
"jsx-a11y/mouse-events-have-key-events": 1,
28+
"jsx-a11y/no-autofocus": 1,
29+
"jsx-a11y/no-noninteractive-element-interactions": 1,
30+
"jsx-a11y/no-static-element-interactions": 0,
31+
"jsx-quotes": 2,
5832
"max-len": [0, 80, 4],
59-
"max-nested-callbacks": [0, 2],
60-
"max-params": [0, 3],
61-
"max-statements": [0, 10],
62-
"new-parens": [2],
63-
"new-cap": [0],
64-
"newline-after-var": [0],
65-
"no-alert": [2],
66-
"no-array-constructor": [2],
67-
"no-bitwise": [0],
68-
"no-caller": [2],
69-
"no-catch-shadow": [2],
70-
"no-cond-assign": [2],
7133
"no-console": [0],
72-
"no-constant-condition": [1],
73-
"no-continue": [2],
74-
"no-control-regex": [2],
75-
"no-debugger": [2],
76-
"no-delete-var": [2],
77-
"no-div-regex": [0],
78-
"no-dupe-args": [2],
79-
"no-dupe-keys": [2],
80-
"no-duplicate-case": [2],
8134
"no-else-return": [0],
82-
"no-empty": [2],
83-
"no-empty-character-class": [2],
84-
"no-empty-label": [2],
85-
"no-eq-null": [0],
86-
"no-eval": [2],
87-
"no-ex-assign": [2],
88-
"no-extend-native": [1],
89-
"no-extra-bind": [1],
90-
"no-extra-boolean-cast": [2],
91-
"no-extra-semi": [1],
92-
"no-fallthrough": [2],
93-
"no-floating-decimal": [2],
94-
"no-func-assign": [2],
95-
"no-implied-eval": [2],
96-
"no-inline-comments": [0],
97-
"no-inner-declarations": [2, "functions"],
98-
"no-invalid-regexp": [2],
99-
"no-irregular-whitespace": [2],
100-
"no-iterator": [2],
101-
"no-label-var": [2],
102-
"no-labels": [2],
103-
"no-lone-blocks": [2],
104-
"no-lonely-if": [1],
105-
"no-loop-func": [1],
106-
"no-mixed-requires": [0, false],
107-
"no-mixed-spaces-and-tabs": [2, false],
108-
"no-multi-spaces": [1],
109-
"no-multi-str": [2],
110-
"no-multiple-empty-lines": [2, {"max": 2}],
111-
"no-native-reassign": [1],
112-
"no-negated-in-lhs": [2],
113-
"no-nested-ternary": [0],
114-
"no-new": [2],
115-
"no-new-func": [2],
116-
"no-new-object": [2],
117-
"no-new-require": [0],
118-
"no-new-wrappers": [2],
119-
"no-obj-calls": [2],
120-
"no-octal": [2],
121-
"no-octal-escape": [2],
122-
"no-param-reassign": [1],
123-
"no-path-concat": [0],
35+
"no-multi-spaces": [0],
36+
"no-multiple-empty-lines": [0], // allow indented comments (like this one)
12437
"no-plusplus": [0],
125-
"no-process-env": [0],
126-
"no-process-exit": [2],
127-
"no-proto": [2],
128-
"no-redeclare": [1],
129-
"no-regex-spaces": [2],
130-
"no-reserved-keys": [0],
131-
"no-restricted-modules": [0],
132-
"no-return-assign": [2],
133-
"no-script-url": [2],
134-
"no-self-compare": [0],
135-
"no-sequences": [1],
136-
"no-shadow": [1],
137-
"no-shadow-restricted-names": [2],
138-
"no-spaced-func": [1],
139-
"no-sparse-arrays": [2],
140-
"no-sync": [0],
141-
"no-ternary": [0],
142-
"no-throw-literal": [2],
143-
"no-trailing-spaces": [1],
144-
"no-undef": [1],
145-
"no-undef-init": [2],
146-
"no-undefined": [0],
14738
"no-underscore-dangle": [0],
148-
"no-unreachable": [2],
149-
"no-unused-expressions": [1],
150-
"no-unused-vars": [1],
151-
"no-use-before-define": [1],
152-
"no-void": [0],
153-
"no-warning-comments": [0, {"terms": ["todo", "fixme", "xxx"], "location": "start"}],
154-
"no-with": [2],
155-
"no-extra-parens": [1],
156-
"one-var": [1, "never"],
157-
"operator-assignment": [0, "always"],
158-
"operator-linebreak": [1, "after"],
159-
"padded-blocks": [0],
160-
"quote-props": [0],
161-
"radix": [0],
162-
"semi": [1],
163-
"semi-spacing": [2, {"before": false, "after": true}],
164-
"sort-vars": [0],
165-
"space-after-keywords": [2, "always"],
166-
"space-before-function-paren": [1, {"anonymous": "always", "named": "always"}],
167-
"space-before-blocks": [0, "always"],
168-
"space-in-brackets": [
169-
0, "never", {
170-
"singleValue": true,
171-
"arraysInArrays": false,
39+
"object-curly-newline": 0,
40+
"object-curly-spacing": [1,
41+
"always", {
17242
"arraysInObjects": false,
173-
"objectsInArrays": true,
174-
"objectsInObjects": true,
175-
"propertyName": false
43+
"objectsInObjects": true
17644
}
17745
],
178-
"space-in-parens": [0],
179-
"space-infix-ops": [1],
180-
"space-return-throw-case": [2],
181-
"space-unary-ops": [0, {"words": true, "nonwords": false}],
182-
"spaced-line-comment": [0, "always"],
183-
"strict": [0, "never"],
184-
"use-isnan": [2],
185-
"valid-jsdoc": [0],
186-
"valid-typeof": [2],
187-
"vars-on-top": [0],
188-
"wrap-iife": [2],
189-
"wrap-regex": [1],
190-
"yoda": [2, "never", {"exceptRange": true}],
191-
"react/jsx-boolean-value": 2,
192-
"react/jsx-no-undef": 2,
193-
"react/jsx-sort-props": 0,
194-
"react/jsx-sort-prop-types": 0,
195-
"react/jsx-uses-react": 2,
196-
"react/jsx-uses-vars": 2,
46+
"operator-linebreak": [1, "after"],
47+
"padded-blocks": [1],
48+
"prefer-destructuring": 1,
49+
"quotes": [1, "single", "avoid-escape"],
50+
"radix": 0, // Dec 2018: We always use base 10, so specifying it each time seems excessive
51+
"react/button-has-type": 1,
52+
"react/destructuring-assignment": 0, // Dec 2018: We should do this! But right now we have 3990 warnings/errors if enabled.
53+
"react/forbid-prop-types": 0, // Dec 2018: Should consider someday
54+
"react/indent-prop": 0,
55+
"react/jsx-first-prop-new-line": 0,
56+
"react/jsx-indent-props": 0,
57+
"react/jsx-no-bind": 1, // Dec 2018: Should these be errors?
58+
"react/no-access-state-in-setstate": 1,
59+
"react/no-array-index-key": 1,
60+
"react/no-children-prop": 1,
19761
"react/no-did-mount-set-state": 0,
198-
"react/no-did-update-set-state": 2,
199-
"react/no-multi-comp": 2,
200-
"react/no-unknown-property": 1,
62+
"react/no-did-update-set-state": 0,
63+
"react/no-string-refs": 1,
64+
"react/no-unused-prop-types": 1,
65+
"react/no-unused-state": 1,
66+
"react/prefer-stateless-function": 0,
20167
"react/prop-types": 1,
202-
"react/react-in-jsx-scope": 2,
203-
"react/self-closing-comp": 2,
204-
"jsx-quotes": 2,
68+
"react/require-default-props": 0, // Dec 2018: Might have value someday
69+
"react/sort-comp": 1,
70+
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
71+
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
72+
"space-before-function-paren": [1, {"anonymous": "always", "named": "always"}],
73+
"space-in-parens": [1],
74+
"template-curly-spacing": ["warn", "never"]
20575
},
20676
"plugins": [
207-
"react"
208-
],
209-
"global": {
210-
"React": true
211-
}
77+
"react",
78+
"react-hooks"
79+
]
21280
}

.github/ISSUE_TEMPLATE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Please describe the issue (What happens? What do you expect?)
2+
3+
### Steps to reproduce the problem (1, 2, 3...), including links

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### What github.com/wevote/WebApp/issues does this fix?
2+
3+
### Changes included this pull request?

.gitignore

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
# Ignore build files
55
build
6+
build-live
7+
package-lock.json
68

79
# TernJS
810
###################
@@ -24,10 +26,6 @@ pids
2426
###################
2527
lib-cov
2628

27-
# Coverage directory used by tools like istanbul
28-
###################
29-
coverage
30-
3129
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
3230
###################
3331
.grunt
@@ -60,13 +58,8 @@ venv
6058
*.class
6159
*.dll
6260
*.exe
63-
*.o
6461
*.so
6562

66-
67-
68-
69-
7063
# PyInstaller #
7164
# Usually these files are written by a python script from a template
7265
# before PyInstaller builds the exe, so as to inject date/other infos into it.
@@ -109,11 +102,8 @@ target/
109102
# git has its own built in compression methods
110103
*.7z
111104
*.dmg
112-
*.gz
113105
*.iso
114-
*.jar
115106
*.rar
116-
*.tar
117107
*.zip
118108

119109
# OS generated files #
@@ -152,24 +142,39 @@ sftp-config.json
152142

153143
# Vim / emacs #
154144
###############
155-
*~
156-
*#
157145
*.swp
158146
*.swo
159147

160148
# Compass / Sass #
161149
##################
162150
.sass-cache
163151

152+
# Heroku Related #
153+
##################
154+
staticfiles
155+
164156
# Other #
165157
#########
166158
/geo/data/
167159
/**/migrations/*.py
168160
!/**/migrations/__init__.py
169-
config/environment_variables.json
161+
src/js/config.js
162+
src/js/config-qa.js
163+
src/js/config-www.js
164+
tests/browserstack/browserstack.config.js
165+
src/javascript/google-tag-manager.js
166+
src/javascript/google-tag-manager-qa.js
167+
src/javascript/google-tag-manager-www.js
168+
src/javascript/google-analytics.js
169+
src/javascript/google-analytics-qa.js
170+
src/javascript/google-analytics-www.js
170171
web_app/build/*
172+
*.crt
173+
*.key
174+
.vscode
175+
.gitattributes
176+
/yarn.lock
177+
server.csr
178+
tests/browserstack/wdio.conf.js
179+
tests/browserstack/wdio.conf.template
171180

172-
# Heroku Related #
173-
##################
174-
*.pyc
175-
staticfiles

.jscsrc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{
22
"preset": "airbnb",
33
"validateQuoteMarks": null,
4-
"excludeFiles": ["build/**", "node_modules"]
4+
"excludeFiles": ["build/**", "node_modules"],
5+
"maximumLineLength": null,
6+
"maxErrors": 200,
7+
"disallowSpacesInFunctionDeclaration": null,
8+
"requirePaddingNewLinesBeforeLineComments": null,
9+
"requirePaddingNewLinesAfterBlocks": null,
10+
"disallowMultipleLineBreaks": null
511
}

0 commit comments

Comments
 (0)