Skip to content

Commit

Permalink
fix: eslint errors fix
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Apr 4, 2021
1 parent 5e62fcf commit 47e02f6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/cc-cli/templates/imports/react-test-renderer.ts.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import renderer, { act } from 'react-test-renderer';

const renderErr = () => { throw new Error('Could not render the story'); };
const componentErr = () => { throw new Error('Error rendering component with react-test-renderer')};
const renderErr = (): void => { throw new Error('Could not render the story'); };
const componentErr = (): void => { throw new Error('Error rendering component with react-test-renderer')};
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { render, act } from '@testing-library/react';

const renderErr = () => { throw new Error('Could not render the story'); };
const renderErr = (): void => { throw new Error('Could not render the story'); };
1 change: 1 addition & 0 deletions plugins/cc-cli/templates/store/loop/imports.cjs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const documents = extractDocuments({ config, configPath });
if (documents) {
documents.filter(file => !isMDXDocument(file, config.instrument)).forEach(file => {
// eslint-disable-next-line global-require, import/no-dynamic-require
const exports = require(file);
const doc = exports.default;
const examples = Object.keys(exports)
Expand Down
1 change: 1 addition & 0 deletions plugins/cc-cli/templates/store/loop/imports.esm.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const documents = extractDocuments({ config, configPath });
if (documents) {
documents.filter(file => !isMDXDocument(file, config.instrument)).forEach(file => {
// eslint-disable-next-line global-require, import/no-dynamic-require
const exports = require(file);
const doc = exports.default;
const examples = Object.keys(exports)
Expand Down
1 change: 1 addition & 0 deletions plugins/cc-cli/templates/store/loop/imports.ts.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const documents = extractDocuments({ config, configPath });
if (documents) {
documents.filter((file: string) => !isMDXDocument(file, config.instrument)).forEach((file: string) => {
// eslint-disable-next-line @typescript-eslint/no-var-requires, global-require, import/no-dynamic-require
const exports = require(file);
const doc = exports.default;
const examples = Object.keys(exports)
Expand Down

0 comments on commit 47e02f6

Please sign in to comment.