Skip to content

Commit 5912cf2

Browse files
committed
Build playground during tests
1 parent 2ad946e commit 5912cf2

File tree

7 files changed

+69
-52
lines changed

7 files changed

+69
-52
lines changed
Lines changed: 48 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,51 @@
11
module.exports = {
2-
"extends": "airbnb",
3-
"plugins": [
4-
"react",
5-
"jsx-a11y",
6-
"import"
7-
],
8-
"rules": {
9-
"react/jsx-no-bind": 0,
10-
"react/jsx-first-prop-new-line": 0,
11-
"react/jsx-indent-props": 0,
12-
"react/jsx-filename-extension": 0,
13-
"react/react-in-jsx-scope": 0, // remove when import React is ready
14-
"import/no-unresolved": 0,
15-
"comma-dangle": 0,
16-
"no-console": 0,
17-
"arrow-parens": 0,
18-
"react/jsx-no-undef": 0,
19-
"react/jsx-tag-spacing": 0,
20-
"react/prefer-stateless-function": 0,
21-
"react/forbid-prop-types": 0,
22-
"import/extensions": 0,
23-
"quotes": 0,
24-
"no-prototype-builtins": 0,
25-
"class-methods-use-this": 0,
26-
"no-param-reassign": 0,
27-
"no-mixed-operators": 0,
28-
"no-else-return": 0,
29-
'max-len': ['error', 120, 2, {
30-
ignoreUrls: true,
31-
ignoreComments: false,
32-
ignoreRegExpLiterals: true,
33-
ignoreStrings: true,
34-
ignoreTemplateLiterals: true,
35-
}]
2+
extends: 'airbnb',
3+
plugins: ['react', 'jsx-a11y', 'import'],
4+
rules: {
5+
'react/jsx-no-bind': 0,
6+
'react/jsx-first-prop-new-line': 0,
7+
'react/jsx-indent-props': 0,
8+
'react/jsx-filename-extension': 0,
9+
'react/react-in-jsx-scope': 0, // remove when import React is ready
10+
'import/no-unresolved': 0,
11+
'react/jsx-props-no-spreading': 0,
12+
'comma-dangle': 0,
13+
'no-console': 0,
14+
'no-plusplus': 0,
15+
'import/prefer-default-export': 0,
16+
'import/no-named-as-default': 0,
17+
'import/no-named-as-default-member': 0,
18+
'arrow-parens': 0,
19+
'react/jsx-no-undef': 0,
20+
'react/jsx-tag-spacing': 0,
21+
'react/prefer-stateless-function': 0,
22+
'react/forbid-prop-types': 0,
23+
'react/prop-types': 0,
24+
'import/extensions': 0,
25+
quotes: ['warn', 'single'],
26+
'no-prototype-builtins': 0,
27+
'class-methods-use-this': 0,
28+
'no-param-reassign': 0,
29+
'no-mixed-operators': 0,
30+
'no-else-return': 0,
31+
'max-len': [
32+
'error',
33+
120,
34+
2,
35+
{
36+
ignoreUrls: true,
37+
ignoreComments: false,
38+
ignoreRegExpLiterals: true,
39+
ignoreStrings: true,
40+
ignoreTemplateLiterals: true
41+
}
42+
],
43+
'no-trailing-spaces': ['error', { skipBlankLines: true }],
44+
'react/sort-comp': [
45+
1,
46+
{
47+
order: ['static-methods', 'lifecycle', 'everything-else', 'render']
48+
}
49+
]
3650
}
3751
};

packages/cubejs-playground/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@
5050
"whatwg-fetch": "^3.0.0"
5151
},
5252
"scripts": {
53-
"start": "PORT=3080 react-app-rewired start",
54-
"build": "react-app-rewired --max-old-space-size=2048 build && rm -Rf ../cubejs-server-core/playground/** && cp -R build/ ../cubejs-server-core/playground/",
55-
"test": "react-app-rewired test",
56-
"eject": "react-scripts eject",
53+
"start": "EXTEND_ESLINT=true PORT=3080 react-app-rewired start",
54+
"build": "EXTEND_ESLINT=true react-app-rewired --max-old-space-size=2048 build && rm -Rf ../cubejs-server-core/playground/** && cp -R build/ ../cubejs-server-core/playground/",
55+
"test": "EXTEND_ESLINT=true react-app-rewired --max-old-space-size=2048 build && react-app-rewired test",
56+
"eject": "EXTEND_ESLINT=true react-scripts eject",
5757
"lint": "eslint src/*.js src/*.jsx"
5858
},
5959
"eslintConfig": {

packages/cubejs-playground/src/ChartContainer.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ import {
1010
SyncOutlined,
1111
ThunderboltOutlined,
1212
} from '@ant-design/icons';
13-
import { Card, Button, Menu, Dropdown, notification, Modal } from 'antd';
13+
import {
14+
Card, Button, Menu, Dropdown, notification, Modal
15+
} from 'antd';
1416
import { getParameters } from 'codesandbox-import-utils/lib/api/define';
1517
import { fetch } from 'whatwg-fetch';
1618
import { map } from 'ramda';

packages/cubejs-playground/src/components/CachePane.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ const CachePane = ({ query, cubejsApi }) => (
123123
/>
124124
</Tabs.TabPane>
125125
</Tabs>
126-
)}
126+
)
127+
}
127128
/>
128129
);
129130

packages/cubejs-playground/src/components/Header.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { useMediaQuery } from 'react-responsive';
99
const StyledMenu = styled(Menu)`
1010
background: #EEEEF5 !important;
1111
border-bottom: 0;
12-
`
12+
`;
1313

1414
const StyledMenuItem = styled(Menu.Item)`
1515
font-size: 15px;
@@ -30,12 +30,12 @@ const StyledMenuItem = styled(Menu.Item)`
3030
border-bottom: 2px solid transparent;
3131
}
3232
}
33-
`
33+
`;
3434

3535
const StyledMenuButton = styled.a`
3636
float: right;
3737
height: 32px;
38-
margin: 8px ${props => props.noMargin ? "0" : "8px"};
38+
margin: 8px ${props => (props.noMargin ? "0" : "8px")};
3939
border: 0.5px solid rgba(67, 67, 107, 0.4);
4040
border-radius: 3px;
4141
display: flex;

packages/cubejs-playground/src/libraries/d3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,5 +161,5 @@ const ${renderFnName} = ({ resultSet }) => (
161161
);
162162

163163
export const imports = {
164-
'd3': d3
164+
d3
165165
};

packages/cubejs-playground/yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,10 +1758,10 @@
17581758
resolved "https://registry.yarnpkg.com/@csstools/normalize.css/-/normalize.css-10.1.0.tgz#f0950bba18819512d42f7197e56c518aa491cf18"
17591759
integrity sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg==
17601760

1761-
"@cubejs-client/core@^0.19.47":
1762-
version "0.19.43"
1763-
resolved "https://registry.yarnpkg.com/@cubejs-client/core/-/core-0.19.43.tgz#64d100fe6b42b5acafd9e125352863f2ef7d1d46"
1764-
integrity sha512-jWFwcIPQ3ts2NGjLgStrUdJR9AVUwB8iNiwHOV4E1jiiLEuoAgzgb9l6Fj0AOXtQQpMSyVwCSN6OHtIlqawHmw==
1761+
"@cubejs-client/core@^0.19.48":
1762+
version "0.19.47"
1763+
resolved "https://registry.yarnpkg.com/@cubejs-client/core/-/core-0.19.47.tgz#3f72a6df399d1a981a705da80a58ce30276f18a6"
1764+
integrity sha512-cyZE4jLUca2xPF2aUFhGmpEiis3rrbKsBQ327wZl2KWELamUXTrYFf7IPpzr1bd2tde7zZbskLteP0xLFArZwQ==
17651765
dependencies:
17661766
"@babel/runtime" "^7.1.2"
17671767
core-js "^3.6.5"
@@ -1772,10 +1772,10 @@
17721772
url-search-params-polyfill "^7.0.0"
17731773
uuid "^3.4.0"
17741774

1775-
"@cubejs-client/react@^0.19.47":
1776-
version "0.19.43"
1777-
resolved "https://registry.yarnpkg.com/@cubejs-client/react/-/react-0.19.43.tgz#af1a070723f347c52d8e3debe52ae37e7e1edca1"
1778-
integrity sha512-oBzRT9nOGXMGi2UN6JW7zYmPc3ZQ+4oUJ6Ze8akfW/W89D3WZ2GtJTfJYRvExbjHF5us3rxN0sWeTnH6kpMDMQ==
1775+
"@cubejs-client/react@^0.19.48":
1776+
version "0.19.47"
1777+
resolved "https://registry.yarnpkg.com/@cubejs-client/react/-/react-0.19.47.tgz#b524fcd163faa18f604047caa65d9932598135ca"
1778+
integrity sha512-+FOnUzrxgNsmPkCCCzL0JKAgCLBnfxVTcA+2tdTY3UpLTEHMVCabdxVh0IqSkw8ToRNVxEYHnp1VWBgPGvPt3w==
17791779
dependencies:
17801780
"@babel/runtime" "^7.1.2"
17811781
core-js "^3.6.5"

0 commit comments

Comments
 (0)