0
Fork 0
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:
Jordi Sala Morales 2024-04-15 11:36:37 +00:00
parent 1b29448831
commit 3738c3cc4f
No known key found for this signature in database
GPG key ID: C5127140107F55FD
8 changed files with 5 additions and 12 deletions

View file

@ -18,5 +18,8 @@ module.exports = {
react: { react: {
version: 'detect' version: 'detect'
} }
},
rules: {
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }]
} }
}; };

View file

@ -6,7 +6,6 @@ import { createPenpotItem } from '.';
export const createPenpotArtboard = ( export const createPenpotArtboard = (
file: PenpotFile, file: PenpotFile,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
{ type, children = [], ...rest }: FrameShape { type, children = [], ...rest }: FrameShape
) => { ) => {
file.addArtboard({ file.addArtboard({

View file

@ -4,7 +4,6 @@ import { CircleShape } from '@ui/lib/types/circle/circleShape';
import { translateFillGradients } from '../translators'; import { translateFillGradients } from '../translators';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const createPenpotCircle = (file: PenpotFile, { type, fills, ...rest }: CircleShape) => { export const createPenpotCircle = (file: PenpotFile, { type, fills, ...rest }: CircleShape) => {
file.createCircle({ file.createCircle({
type: CIRCLE_TYPE, type: CIRCLE_TYPE,

View file

@ -6,7 +6,6 @@ import { createPenpotItem } from '.';
export const createPenpotGroup = ( export const createPenpotGroup = (
file: PenpotFile, file: PenpotFile,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
{ type, children = [], ...rest }: GroupShape { type, children = [], ...rest }: GroupShape
) => { ) => {
file.addGroup({ file.addGroup({

View file

@ -2,7 +2,6 @@ import { PenpotFile } from '@ui/lib/penpot';
import { IMAGE_TYPE } from '@ui/lib/types/image/imageAttributes'; import { IMAGE_TYPE } from '@ui/lib/types/image/imageAttributes';
import { ImageShape } from '@ui/lib/types/image/imageShape'; 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) => { export const createPenpotImage = (file: PenpotFile, { type, ...rest }: ImageShape) => {
file.createImage({ file.createImage({
type: IMAGE_TYPE, type: IMAGE_TYPE,

View file

@ -3,7 +3,6 @@ import { RECT_TYPE } from '@ui/lib/types/rect/rectAttributes';
import { RectShape } from '@ui/lib/types/rect/rectShape'; import { RectShape } from '@ui/lib/types/rect/rectShape';
import { translateFillGradients } from '@ui/translators'; import { translateFillGradients } from '@ui/translators';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const createPenpotRectangle = (file: PenpotFile, { type, fills, ...rest }: RectShape) => { export const createPenpotRectangle = (file: PenpotFile, { type, fills, ...rest }: RectShape) => {
file.createRect({ file.createRect({
type: RECT_TYPE, type: RECT_TYPE,

View file

@ -2,11 +2,7 @@ import { PenpotFile } from '@ui/lib/penpot';
import { TEXT_TYPE } from '@ui/lib/types/text/textAttributes'; import { TEXT_TYPE } from '@ui/lib/types/text/textAttributes';
import { TextShape } from '@ui/lib/types/text/textShape'; import { TextShape } from '@ui/lib/types/text/textShape';
export const createPenpotText = ( export const createPenpotText = (file: PenpotFile, { type, ...rest }: TextShape) => {
file: PenpotFile,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
{ type, ...rest }: TextShape
) => {
file.createText({ file.createText({
type: TEXT_TYPE, type: TEXT_TYPE,
...rest ...rest

View file

@ -36,8 +36,7 @@ export interface PenpotFile {
// lookupShape(shapeId: string): void; // lookupShape(shapeId: string): void;
// updateObject(id: string, object: any): void; // updateObject(id: string, object: any): void;
// deleteObject(id: string): void; // deleteObject(id: string): void;
// eslint-disable-next-line @typescript-eslint/no-explicit-any asMap(): unknown;
asMap(): any;
export(): void; export(): void;
} }