mirror of https://github.com/apache/superset.git
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": {},
|
||||
"peerDependencies": {
|
||||
"@airbnb/config-babel": "^2.0.1",
|
||||
"@superset-ui/chart-controls": "*",
|
||||
"@superset-ui/core": "*",
|
||||
"react": "^16.13.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@airbnb/config-babel": "^2.0.1",
|
||||
"@babel/cli": "^7.16.0",
|
||||
"@types/jest": "^26.0.4",
|
||||
"jest": "^26.6.3",
|
||||
|
|
|
@ -38,14 +38,15 @@ const Styles = styled.div<<%= packageLabel %>StylesProps>`
|
|||
/* You can use your props to control CSS! */
|
||||
margin-top: 0;
|
||||
margin-bottom: ${({ theme }) => theme.gridUnit * 3}px;
|
||||
font-size: ${({ theme, headerFontSize }) => theme.typography.sizes[headerFontSize]}px;
|
||||
font-weight: ${({ theme, boldText }) => theme.typography.weights[boldText ? 'bold' : 'normal']};
|
||||
font-size: ${({ theme, headerFontSize }) =>
|
||||
theme.typography.sizes[headerFontSize]}px;
|
||||
font-weight: ${({ theme, boldText }) =>
|
||||
theme.typography.weights[boldText ? 'bold' : 'normal']};
|
||||
}
|
||||
|
||||
pre {
|
||||
height: ${({ theme, headerFontSize, height }) => (
|
||||
height - theme.gridUnit * 12 - theme.typography.sizes[headerFontSize]
|
||||
)}px;
|
||||
height: ${({ theme, headerFontSize, height }) =>
|
||||
height - theme.gridUnit * 12 - theme.typography.sizes[headerFontSize]}px;
|
||||
}
|
||||
`;
|
||||
|
||||
|
|
|
@ -17,7 +17,11 @@
|
|||
* under the License.
|
||||
*/
|
||||
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 = {
|
||||
/**
|
||||
|
|
|
@ -16,7 +16,11 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { QueryFormData, supersetTheme, TimeseriesDataRecord } from '@superset-ui/core';
|
||||
import {
|
||||
QueryFormData,
|
||||
supersetTheme,
|
||||
TimeseriesDataRecord,
|
||||
} from '@superset-ui/core';
|
||||
|
||||
export interface <%= packageLabel %>StylesProps {
|
||||
height: number;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { ChartProps } from '@superset-ui/core';
|
||||
import { ChartProps, supersetTheme } from '@superset-ui/core';
|
||||
import transformProps from '../../src/plugin/transformProps';
|
||||
|
||||
describe('<%= packageLabel %> transformProps', () => {
|
||||
|
@ -34,6 +34,7 @@ describe('<%= packageLabel %> transformProps', () => {
|
|||
formData,
|
||||
width: 800,
|
||||
height: 600,
|
||||
theme: supersetTheme,
|
||||
queriesData: [{
|
||||
data: [{ name: 'Hulk', sum__num: 1<%if (chartType === 'timeseries') { %>, __timestamp: 599616000000<% } %> }],
|
||||
}],
|
||||
|
|
Loading…
Reference in New Issue