Skip to content
This repository was archived by the owner on Aug 4, 2025. It is now read-only.

Commit d6e5e78

Browse files
committed
Revert "Feature: New Build Method & Structure Cleanup."
This reverts commit 4dd012f.
1 parent 4dd012f commit d6e5e78

101 files changed

Lines changed: 5648 additions & 8610 deletions

File tree

Some content is hidden

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

.babelrc

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
{
2-
"presets": [
3-
"@babel/preset-react",
4-
[
5-
"@babel/preset-env", {
6-
"targets": {
7-
"esmodules": true
8-
}
9-
}
10-
]
11-
]
12-
}
2+
"presets": ["react","env","stage-0"],
3+
"env": {
4+
"test": {
5+
"plugins": ["require-context-hook"]
6+
}
7+
}
8+
}

.eslintrc

Lines changed: 11 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,10 @@
11
{
22
"plugins": [
3-
"babel",
4-
"react",
5-
"react-hooks",
6-
"@typescript-eslint"
3+
"babel"
74
],
8-
"parser": "@typescript-eslint/parser",
9-
"parserOptions": {
10-
"ecmaFeatures": {
11-
"legacyDecorators": true
12-
}
13-
},
14-
"settings": {
15-
"react": {
16-
"version": "detect"
17-
}
18-
},
5+
"parser": "babel-eslint",
196
"rules": {
20-
"camelcase": "off",
21-
"comma-dangle": ["error",
22-
{
23-
"arrays": "always-multiline",
24-
"objects": "always-multiline",
25-
"imports": "always-multiline",
26-
"exports": "always-multiline",
27-
"functions": "never"
28-
}],
7+
"comma-dangle": ["error", "always-multiline"],
298
"space-before-function-paren": ["error", {
309
"anonymous": "never",
3110
"named": "never",
@@ -34,27 +13,13 @@
3413
"jsx-quotes": ["error", "prefer-double"],
3514
"no-var": "error",
3615
"prefer-const": "warn",
37-
"new-cap": ["error", {
38-
"newIsCapExceptions": ["api.batch"],
39-
"capIsNew": false
40-
}],
41-
"no-invalid-this": "warn",
42-
"no-unused-expressions": "error",
43-
"semi": ["error", "never"],
44-
"lines-between-class-members": ["error", "always", {"exceptAfterSingleLine": true }],
16+
17+
"babel/no-invalid-this": "warn",
18+
"babel/semi": ["error", "never"],
4519
"react/prop-types": "warn",
46-
"react/jsx-handler-names": "off",
47-
"react/jsx-indent": ["error", 2, { "checkAttributes": false, "indentLogicalExpressions": true }],
48-
"react/jsx-pascal-case": ["error", {"allowAllCaps": true}],
49-
"react/jsx-uses-react": "error",
50-
"react/jsx-uses-vars": "error",
5120
"react/no-unused-state": "warn",
5221
"react/no-access-state-in-setstate": "warn",
53-
"react-hooks/rules-of-hooks": "error",
54-
"react-hooks/exhaustive-deps": "warn",
55-
"object-curly-spacing": "off",
56-
"multiline-ternary": "off",
57-
"no-use-before-define": "off"
22+
"object-curly-spacing": "off"
5823
},
5924
"overrides": [
6025
{
@@ -64,17 +29,13 @@
6429
}
6530
}
6631
],
67-
"extends": [
68-
"standard",
69-
"standard-react"
70-
],
32+
"extends": ["standard", "standard-react"],
7133
"env": {
72-
"jest": true,
7334
"browser": true,
35+
"jest": true,
7436
"jasmine": true
7537
},
7638
"globals": {
77-
"mapboxgl": true,
78-
"UPTICK_PRODUCT_STREAM": "readonly"
39+
"mapboxgl": true
7940
}
80-
}
41+
}

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
node_modules/
22
dist/
33
demo-site/_site/
4+
/cells.js
5+
/filters.js
6+
/main.js
7+
/renderers.js
8+
/utils.js
9+
/icons.js
410
coverage/
511
.vscode/
612
.DS_Store
713
**~
8-
bundle-analysis.json
9-
stats.html
14+
1015
*.log
1116

1217
demo-site/.jekyll-cache

.jest/jest.setup.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import 'raf/polyfill'
2+
import {configure} from 'enzyme'
3+
import moment from 'moment'
4+
import Adapter from 'enzyme-adapter-react-16'
5+
6+
configure({ adapter: new Adapter() })
7+
Date.now = jest.fn(() => new Date(Date.UTC(2017, 6, 15)).valueOf())
8+
moment.prototype.local = function() { return this.utcOffset('+10:00') }
9+
10+
jest.mock('react-select', () => require('__mocks__/react-select'))

.jest/register-context.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import registerRequireContextHook from 'babel-plugin-require-context-hook/register'
2+
registerRequireContextHook()

.storybook/Storyshots.test.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import initStoryshots, {multiSnapshotWithOptions} from '@storybook/addon-storyshots'
2+
3+
jest.mock('@storybook/addon-info', () => ({
4+
withInfo: () => jest.fn(story => story),
5+
}))
6+
7+
jest.mock('react-select', () => require('__mocks__/react-select'))
8+
9+
initStoryshots({
10+
test: multiSnapshotWithOptions({
11+
createNodeMock: elem => {
12+
if (elem.type === 'input' && elem.props.type === 'checkbox') {
13+
const ref = document.createElement('input')
14+
ref.setAttribute('type', 'checkbox')
15+
elem.checkbox = ref
16+
return elem
17+
}
18+
}
19+
})
20+
})

.storybook/addons.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import '@storybook/addon-actions/register'

.storybook/config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import 'babel-polyfill'
2+
import { configure } from '@storybook/react';
3+
import '../src/resources/main.sass'
4+
import '../node_modules/@fortawesome/fontawesome-free/css/all.css'
5+
6+
const appStories = require.context('../src/', true, /stories\.js$/)
7+
8+
const requireAll = (requireContext) => requireContext.keys().map(requireContext)
9+
10+
function loadStories() {
11+
requireAll(appStories)
12+
}
13+
14+
15+
configure(loadStories, module)

.storybook/main.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

.storybook/preview.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)