Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Commit bb38eaf

Browse files
committed
fix(legacy-table): linting errors
1 parent 623f4cf commit bb38eaf

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

packages/superset-ui-legacy-plugin-chart-pivot-table/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@ This plugin provides Pivot Table for Superset.
77

88
### Usage
99

10-
Configure `key`, which can be any `string`, and register the plugin. This `key` will be used to lookup this chart throughout the app.
10+
Configure `key`, which can be any `string`, and register the plugin. This `key` will be used to
11+
lookup this chart throughout the app.
1112

1213
```js
1314
import PivottableChartPlugin from '@superset-ui/legacy-plugin-chart-pivot-table';
1415

15-
new PivottableChartPlugin()
16-
.configure({ key: 'pivot-table' })
17-
.register();
16+
new PivottableChartPlugin().configure({ key: 'pivot-table' }).register();
1817
```
1918

20-
Then use it via `SuperChart`. See [storybook](https://apache-superset.github.io/superset-ui-plugins/?selectedKind=plugin-chart-pivot-table) for more details.
19+
Then use it via `SuperChart`. See
20+
[storybook](https://apache-superset.github.io/superset-ui-plugins/?selectedKind=plugin-chart-pivot-table)
21+
for more details.
2122

2223
```js
2324
<SuperChart
@@ -29,4 +30,4 @@ Then use it via `SuperChart`. See [storybook](https://apache-superset.github.io/
2930
data: {...},
3031
}}
3132
/>
32-
```
33+
```

packages/superset-ui-legacy-plugin-chart-table/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"@superset-ui/time-format": "^0.12.0",
4242
"@superset-ui/translation": "^0.12.0",
4343
"jquery": "^3.4.1",
44-
"react": "^16.8.0"
44+
"react": "^16.8.0",
45+
"react-dom": "^16.8.0"
4546
}
4647
}

packages/superset-ui-legacy-plugin-chart-table/src/ReactDataTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ export default function ReactDataTable(props: DataTableProps) {
252252

253253
return (
254254
<div
255+
dangerouslySetInnerHTML={{ __html: ReactDOMServer.renderToStaticMarkup(tableElement) }}
255256
ref={rootElem}
256257
className="superset-legacy-chart-table"
257-
dangerouslySetInnerHTML={{ __html: ReactDOMServer.renderToStaticMarkup(tableElement) }}
258258
/>
259259
);
260260
}

scripts/build.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ const glob = process.argv[2];
77

88
process.env.PATH = `./node_modules/.bin:${process.env.PATH}`;
99

10-
const run = (cmd, async = false) => {
10+
const run = (cmd) => {
1111
console.log(`>> ${cmd}`);
1212
const [p, ...args] = cmd.split(' ');
13-
const runner = async ? spawn : spawnSync;
14-
runner(p, args, { stdio: 'inherit' });
13+
const runner = spawnSync;
14+
const { status } = runner(p, args, { stdio: 'inherit' });
15+
if (status !== 0) {
16+
process.exit(status);
17+
}
1518
};
1619

1720
if (glob) {
21+
run(`eslint --color --quiet packages/${glob}/{src,test}/**/*.{js,jsx,ts,tsx}`);
1822
run(`nimbus prettier --check --workspaces=\"@superset-ui/${glob}"`);
1923
run(`nimbus babel --clean --workspaces=\"@superset-ui/${glob}"`);
2024
run(`nimbus babel --clean --workspaces=\"@superset-ui/${glob}" --esm`);

0 commit comments

Comments
 (0)