Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mifi committed Aug 28, 2022
1 parent 3304ffd commit e92e950
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 22 deletions.
17 changes: 0 additions & 17 deletions .eslintrc

This file was deleted.

20 changes: 20 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
extends: 'airbnb-base',
parserOptions: {
ecmaVersion: 2022,
},
env: {
node: true,
},
settings: {
'import/extensions': ['.js'],
},
rules: {
'max-len': 0,
'no-console': 0,
'object-curly-newline': 0,
'no-await-in-loop': 0,
'no-promise-executor-return': 0,
'import/extensions': ['error', 'ignorePackages'],
},
};
1 change: 1 addition & 0 deletions examples/renderSingleFrame.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { parse } from 'json5';
import fsExtra from 'fs-extra';

// eslint-disable-next-line import/named
import { renderSingleFrame } from '..';

(async () => {
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { testFf } from './ffmpeg.js';
import { parseFps, multipleOf2, assertFileValid, checkTransition } from './util.js';
import { createFabricCanvas, rgbaToFabricImage, getNodeCanvasFromFabricCanvas } from './sources/fabric.js';
import { createFrameSource } from './sources/frameSource.js';
import { parseConfig } from './parseConfig.js';
import parseConfig from './parseConfig.js';
import GlTransitions from './glTransitions.js';
import Audio from './audio.js';

Expand Down Expand Up @@ -394,7 +394,7 @@ async function Editly(config = {}) {
console.log();
console.log('Done. Output file can be found at:');
console.log(outPath);
};
}

// Pure function to get a frame at a certain time
// TODO I think this does not respect transition durations
Expand Down
2 changes: 1 addition & 1 deletion parseConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function validateArbitraryAudio(audio, allowRemoteRequests) {
}
}

export async function parseConfig({ defaults: defaultsIn = {}, clips, arbitraryAudio: arbitraryAudioIn, backgroundAudioPath, loopAudio, allowRemoteRequests, ffprobePath }) {
export default async function parseConfig({ defaults: defaultsIn = {}, clips, arbitraryAudio: arbitraryAudioIn, backgroundAudioPath, loopAudio, allowRemoteRequests, ffprobePath }) {
const defaults = {
duration: 4,
...defaultsIn,
Expand Down
2 changes: 1 addition & 1 deletion sources/frameSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
slideInTextFrameSource,
} from './fabric/fabricFrameSources.js';
import createVideoFrameSource from './videoFrameSource.js';
import { createGlFrameSource } from './glFrameSource.js';
import createGlFrameSource from './glFrameSource.js';

const fabricFrameSources = {
fabric: customFabricFrameSource,
Expand Down
2 changes: 1 addition & 1 deletion sources/glFrameSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import fsExtra from 'fs-extra';

// I have no idea what I'm doing but it works ¯\_(ツ)_/¯

export async function createGlFrameSource({ width, height, channels, params }) {
export default async function createGlFrameSource({ width, height, channels, params }) {
const gl = GL(width, height);

const defaultVertexSrc = `
Expand Down

0 comments on commit e92e950

Please sign in to comment.