mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
fix(plugin-generator): Addresses linter errors in newly generated Superset plugin (#23513)
This commit is contained in:
parent
f2be53dd53
commit
de42c11f99
@ -28,12 +28,12 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
"@airbnb/config-babel": "^2.0.1",
|
||||||
"@superset-ui/chart-controls": "*",
|
"@superset-ui/chart-controls": "*",
|
||||||
"@superset-ui/core": "*",
|
"@superset-ui/core": "*",
|
||||||
"react": "^16.13.1"
|
"react": "^16.13.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@airbnb/config-babel": "^2.0.1",
|
|
||||||
"@babel/cli": "^7.16.0",
|
"@babel/cli": "^7.16.0",
|
||||||
"@types/jest": "^26.0.4",
|
"@types/jest": "^26.0.4",
|
||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
|
@ -38,14 +38,15 @@ const Styles = styled.div<<%= packageLabel %>StylesProps>`
|
|||||||
/* You can use your props to control CSS! */
|
/* You can use your props to control CSS! */
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: ${({ theme }) => theme.gridUnit * 3}px;
|
margin-bottom: ${({ theme }) => theme.gridUnit * 3}px;
|
||||||
font-size: ${({ theme, headerFontSize }) => theme.typography.sizes[headerFontSize]}px;
|
font-size: ${({ theme, headerFontSize }) =>
|
||||||
font-weight: ${({ theme, boldText }) => theme.typography.weights[boldText ? 'bold' : 'normal']};
|
theme.typography.sizes[headerFontSize]}px;
|
||||||
|
font-weight: ${({ theme, boldText }) =>
|
||||||
|
theme.typography.weights[boldText ? 'bold' : 'normal']};
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
height: ${({ theme, headerFontSize, height }) => (
|
height: ${({ theme, headerFontSize, height }) =>
|
||||||
height - theme.gridUnit * 12 - theme.typography.sizes[headerFontSize]
|
height - theme.gridUnit * 12 - theme.typography.sizes[headerFontSize]}px;
|
||||||
)}px;
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
@ -17,7 +17,11 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { t, validateNonEmpty } from '@superset-ui/core';
|
import { t, validateNonEmpty } from '@superset-ui/core';
|
||||||
import { ControlPanelConfig, sections, sharedControls } from '@superset-ui/chart-controls';
|
import {
|
||||||
|
ControlPanelConfig,
|
||||||
|
sections,
|
||||||
|
sharedControls,
|
||||||
|
} from '@superset-ui/chart-controls';
|
||||||
|
|
||||||
const config: ControlPanelConfig = {
|
const config: ControlPanelConfig = {
|
||||||
/**
|
/**
|
||||||
|
@ -16,7 +16,11 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { QueryFormData, supersetTheme, TimeseriesDataRecord } from '@superset-ui/core';
|
import {
|
||||||
|
QueryFormData,
|
||||||
|
supersetTheme,
|
||||||
|
TimeseriesDataRecord,
|
||||||
|
} from '@superset-ui/core';
|
||||||
|
|
||||||
export interface <%= packageLabel %>StylesProps {
|
export interface <%= packageLabel %>StylesProps {
|
||||||
height: number;
|
height: number;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { ChartProps } from '@superset-ui/core';
|
import { ChartProps, supersetTheme } from '@superset-ui/core';
|
||||||
import transformProps from '../../src/plugin/transformProps';
|
import transformProps from '../../src/plugin/transformProps';
|
||||||
|
|
||||||
describe('<%= packageLabel %> transformProps', () => {
|
describe('<%= packageLabel %> transformProps', () => {
|
||||||
@ -34,6 +34,7 @@ describe('<%= packageLabel %> transformProps', () => {
|
|||||||
formData,
|
formData,
|
||||||
width: 800,
|
width: 800,
|
||||||
height: 600,
|
height: 600,
|
||||||
|
theme: supersetTheme,
|
||||||
queriesData: [{
|
queriesData: [{
|
||||||
data: [{ name: 'Hulk', sum__num: 1<%if (chartType === 'timeseries') { %>, __timestamp: 599616000000<% } %> }],
|
data: [{ name: 'Hulk', sum__num: 1<%if (chartType === 'timeseries') { %>, __timestamp: 599616000000<% } %> }],
|
||||||
}],
|
}],
|
||||||
|
Loading…
Reference in New Issue
Block a user