mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 05:33:02 -05:00
avoid eslint errors
This commit is contained in:
parent
1b29448831
commit
3738c3cc4f
8 changed files with 5 additions and 12 deletions
|
@ -18,5 +18,8 @@ module.exports = {
|
|||
react: {
|
||||
version: 'detect'
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }]
|
||||
}
|
||||
};
|
||||
|
|
|
@ -6,7 +6,6 @@ import { createPenpotItem } from '.';
|
|||
|
||||
export const createPenpotArtboard = (
|
||||
file: PenpotFile,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
{ type, children = [], ...rest }: FrameShape
|
||||
) => {
|
||||
file.addArtboard({
|
||||
|
|
|
@ -4,7 +4,6 @@ import { CircleShape } from '@ui/lib/types/circle/circleShape';
|
|||
|
||||
import { translateFillGradients } from '../translators';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export const createPenpotCircle = (file: PenpotFile, { type, fills, ...rest }: CircleShape) => {
|
||||
file.createCircle({
|
||||
type: CIRCLE_TYPE,
|
||||
|
|
|
@ -6,7 +6,6 @@ import { createPenpotItem } from '.';
|
|||
|
||||
export const createPenpotGroup = (
|
||||
file: PenpotFile,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
{ type, children = [], ...rest }: GroupShape
|
||||
) => {
|
||||
file.addGroup({
|
||||
|
|
|
@ -2,7 +2,6 @@ import { PenpotFile } from '@ui/lib/penpot';
|
|||
import { IMAGE_TYPE } from '@ui/lib/types/image/imageAttributes';
|
||||
import { ImageShape } from '@ui/lib/types/image/imageShape';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export const createPenpotImage = (file: PenpotFile, { type, ...rest }: ImageShape) => {
|
||||
file.createImage({
|
||||
type: IMAGE_TYPE,
|
||||
|
|
|
@ -3,7 +3,6 @@ import { RECT_TYPE } from '@ui/lib/types/rect/rectAttributes';
|
|||
import { RectShape } from '@ui/lib/types/rect/rectShape';
|
||||
import { translateFillGradients } from '@ui/translators';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export const createPenpotRectangle = (file: PenpotFile, { type, fills, ...rest }: RectShape) => {
|
||||
file.createRect({
|
||||
type: RECT_TYPE,
|
||||
|
|
|
@ -2,11 +2,7 @@ import { PenpotFile } from '@ui/lib/penpot';
|
|||
import { TEXT_TYPE } from '@ui/lib/types/text/textAttributes';
|
||||
import { TextShape } from '@ui/lib/types/text/textShape';
|
||||
|
||||
export const createPenpotText = (
|
||||
file: PenpotFile,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
{ type, ...rest }: TextShape
|
||||
) => {
|
||||
export const createPenpotText = (file: PenpotFile, { type, ...rest }: TextShape) => {
|
||||
file.createText({
|
||||
type: TEXT_TYPE,
|
||||
...rest
|
||||
|
|
3
ui-src/lib/penpot.d.ts
vendored
3
ui-src/lib/penpot.d.ts
vendored
|
@ -36,8 +36,7 @@ export interface PenpotFile {
|
|||
// lookupShape(shapeId: string): void;
|
||||
// updateObject(id: string, object: any): void;
|
||||
// deleteObject(id: string): void;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
asMap(): any;
|
||||
asMap(): unknown;
|
||||
export(): void;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue