Skip to content

Commit 9e40ed5

Browse files
authored
Merge pull request #1 from plotly/first-pass
The New Beginnings
2 parents 95d69ff + d885cfe commit 9e40ed5

30 files changed

+1714
-2
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["env", "react"]
3+
}

.circleci/config.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
version: 2
2+
3+
jobs:
4+
"node":
5+
docker:
6+
- image: circleci/node:8.11.3
7+
8+
steps:
9+
- checkout
10+
11+
- restore_cache:
12+
key: deps1-{{ .Branch }}-{{ checksum "package.json" }}
13+
14+
- run:
15+
name: Install package.json
16+
command: npm i
17+
18+
- save_cache:
19+
key: deps1-{{ .Branch }}-{{ checksum "package.json" }}
20+
paths:
21+
- node_modules
22+
23+
- run:
24+
name: Run eslint
25+
command: ./node_modules/.bin/eslint src
26+
when: always
27+
28+
29+
"python-3.6":
30+
docker:
31+
- image: circleci/python:3.6-stretch-browsers
32+
33+
environment:
34+
PERCY_ENABLED: False
35+
36+
steps:
37+
- checkout
38+
39+
- restore_cache:
40+
key: deps1-{{ .Branch }}-{{ checksum "tests/requirements.txt" }}
41+
42+
- run:
43+
name: Create virtualenv
44+
command: |
45+
python3 -m venv venv
46+
47+
- run:
48+
name: Install requirements
49+
command: |
50+
. venv/bin/activate
51+
pip install -r tests/requirements.txt --quiet
52+
53+
- save_cache:
54+
key: deps1-{{ .Branch }}-{{ checksum "tests/requirements.txt" }}
55+
paths:
56+
- "venv"
57+
58+
- run:
59+
name: Run pylint
60+
command: |
61+
. venv/bin/activate
62+
pylint usage.py tests
63+
when: always
64+
65+
- run:
66+
name: Run flake8
67+
command: |
68+
. venv/bin/activate
69+
flake8 usage.py tests
70+
when: always
71+
72+
- run:
73+
name: Integration Tests
74+
command: |
75+
. venv/bin/activate
76+
python -m unittest tests.test_render
77+
when: always
78+
79+
80+
workflows:
81+
version: 2
82+
build:
83+
jobs:
84+
- "python-3.6"
85+
- "node"

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.css
2+
registerServiceWorker.js

.eslintrc

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
{
2+
"extends": ["eslint:recommended", "prettier"],
3+
"parser": "babel-eslint",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module",
7+
"ecmaFeatures": {
8+
"arrowFunctions": true,
9+
"blockBindings": true,
10+
"classes": true,
11+
"defaultParams": true,
12+
"destructuring": true,
13+
"forOf": true,
14+
"generators": true,
15+
"modules": true,
16+
"templateStrings": true,
17+
"jsx": true
18+
}
19+
},
20+
"env": {
21+
"browser": true,
22+
"es6": true,
23+
"jasmine": true,
24+
"jest": true,
25+
"node": true
26+
},
27+
"globals": {
28+
"jest": true
29+
},
30+
"plugins": [
31+
"react",
32+
"import"
33+
],
34+
"rules": {
35+
"accessor-pairs": ["error"],
36+
"block-scoped-var": ["error"],
37+
"consistent-return": ["error"],
38+
"curly": ["error", "all"],
39+
"default-case": ["error"],
40+
"dot-location": ["off"],
41+
"dot-notation": ["error"],
42+
"eqeqeq": ["error"],
43+
"guard-for-in": ["off"],
44+
"import/named": ["off"],
45+
"import/no-duplicates": ["error"],
46+
"import/no-named-as-default": ["error"],
47+
"new-cap": ["error"],
48+
"no-alert": [1],
49+
"no-caller": ["error"],
50+
"no-case-declarations": ["error"],
51+
"no-console": ["off"],
52+
"no-div-regex": ["error"],
53+
"no-dupe-keys": ["error"],
54+
"no-else-return": ["error"],
55+
"no-empty-pattern": ["error"],
56+
"no-eq-null": ["error"],
57+
"no-eval": ["error"],
58+
"no-extend-native": ["error"],
59+
"no-extra-bind": ["error"],
60+
"no-extra-boolean-cast": ["error"],
61+
"no-inline-comments": ["error"],
62+
"no-implicit-coercion": ["error"],
63+
"no-implied-eval": ["error"],
64+
"no-inner-declarations": ["off"],
65+
"no-invalid-this": ["error"],
66+
"no-iterator": ["error"],
67+
"no-labels": ["error"],
68+
"no-lone-blocks": ["error"],
69+
"no-loop-func": ["error"],
70+
"no-multi-str": ["error"],
71+
"no-native-reassign": ["error"],
72+
"no-new": ["error"],
73+
"no-new-func": ["error"],
74+
"no-new-wrappers": ["error"],
75+
"no-param-reassign": ["error"],
76+
"no-process-env": ["warn"],
77+
"no-proto": ["error"],
78+
"no-redeclare": ["error"],
79+
"no-return-assign": ["error"],
80+
"no-script-url": ["error"],
81+
"no-self-compare": ["error"],
82+
"no-sequences": ["error"],
83+
"no-shadow": ["off"],
84+
"no-throw-literal": ["error"],
85+
"no-undefined": ["error"],
86+
"no-unused-expressions": ["error"],
87+
"no-use-before-define": ["error", "nofunc"],
88+
"no-useless-call": ["error"],
89+
"no-useless-concat": ["error"],
90+
"no-with": ["error"],
91+
"prefer-const": ["error"],
92+
"radix": ["error"],
93+
"react/jsx-no-duplicate-props": ["error"],
94+
"react/jsx-no-undef": ["error"],
95+
"react/jsx-uses-react": ["error"],
96+
"react/jsx-uses-vars": ["error"],
97+
"react/no-did-update-set-state": ["error"],
98+
"react/no-direct-mutation-state": ["error"],
99+
"react/no-is-mounted": ["error"],
100+
"react/no-unknown-property": ["error"],
101+
"react/prefer-es6-class": ["error", "always"],
102+
"react/prop-types": "error",
103+
"valid-jsdoc": ["off"],
104+
"yoda": ["error"],
105+
"spaced-comment": ["error", "always", {
106+
"block": {
107+
exceptions: ["*"]
108+
}
109+
}],
110+
"no-unused-vars": ["error", {
111+
"args": "after-used",
112+
"argsIgnorePattern": "^_",
113+
"caughtErrorsIgnorePattern": "^e$"
114+
}],
115+
"no-magic-numbers": ["error", {
116+
"ignoreArrayIndexes": true,
117+
"ignore": [-1, 0, 1, 2, 3, 100, 10, 0.5]
118+
}],
119+
"no-underscore-dangle": ["off"]
120+
}
121+
}

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# production
7+
/build
8+
/demo
9+
10+
# testing
11+
/coverage
12+
13+
# misc
14+
.DS_Store
15+
.env.local
16+
.env.development.local
17+
.env.test.local
18+
.env.production.local
19+
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*
23+
24+
# virtualenv
25+
vv
26+
venv
27+
28+
# python
29+
*.pyc
30+
31+
# builds
32+
my_dash_component.egg-info
33+
dist
34+
*__pycache__*
35+
__pycache__/
36+
37+
*.pyc

.npmignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# dependencies
2+
/node_modules
3+
4+
# testing
5+
/coverage
6+
7+
# misc
8+
.DS_Store
9+
.env.local
10+
.env.development.local
11+
.env.test.local
12+
.env.production.local
13+
14+
npm-debug.log*
15+
yarn-debug.log*
16+
yarn-error.log*
17+
18+
# Development folders and files
19+
public
20+
src
21+
scripts
22+
config
23+
.travis.yml
24+
CHANGELOG.md
25+
README.md

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"tabWidth": 4,
3+
"singleQuote": true,
4+
"bracketSpacing": false,
5+
"trailingComma": "es5"
6+
}

0 commit comments

Comments
 (0)