Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Add extensions to lodash imports #20443

Merged
merged 4 commits into from
Dec 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/danger/dangerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ execSync('npm install lodash');

const flatten = require('lodash/flatten');
const intersection = require('lodash/intersection');
const isEmpty = require('lodash/isEmpty');
const isEmpty = require('lodash/isEmpty.js');
valentinpalkovic marked this conversation as resolved.
Show resolved Hide resolved

const pkg = require('../../code/package.json'); // eslint-disable-line import/newline-after-import
const prLogConfig = pkg['pr-log'];
Expand Down
1 change: 1 addition & 0 deletions code/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = {
rules: {
'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
'react-hooks/rules-of-hooks': 'off',
'import/extensions': 'off', // for mjs, we sometimes need extensions
'jest/no-done-callback': 'off',
'@typescript-eslint/dot-notation': [
'error',
Expand Down
2 changes: 1 addition & 1 deletion code/lib/manager-api/src/lib/merge.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import mergeWith from 'lodash/mergeWith';
import isEqual from 'lodash/isEqual';
import isEqual from 'lodash/isEqual.js';

import { logger } from '@storybook/client-logger';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import qs from 'qs';
import { dedent } from 'ts-dedent';
import type { Args } from '@storybook/types';
import { once } from '@storybook/client-logger';
import isPlainObject from 'lodash/isPlainObject';
import isPlainObject from 'lodash/isPlainObject.js';

// Keep this in sync with validateArgs in router/src/utils.ts
const VALIDATION_REGEXP = /^[a-zA-Z0-9 _-]*$/;
Expand Down
2 changes: 1 addition & 1 deletion code/lib/preview-api/src/modules/store/args.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { dequal as deepEqual } from 'dequal';
import type { Renderer, Args, ArgTypes, InputType, SBType, StoryContext } from '@storybook/types';
import { once } from '@storybook/client-logger';
import isPlainObject from 'lodash/isPlainObject';
import isPlainObject from 'lodash/isPlainObject.js';
import { dedent } from 'ts-dedent';

const INCOMPATIBLE = Symbol('incompatible');
Expand Down
2 changes: 1 addition & 1 deletion code/lib/preview-api/src/modules/store/parameters.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Utilities for handling parameters
import type { Parameters } from '@storybook/types';
import isPlainObject from 'lodash/isPlainObject';
import isPlainObject from 'lodash/isPlainObject.js';

/**
* Safely combine parameters recursively. Only copy objects when needed.
Expand Down
2 changes: 1 addition & 1 deletion code/lib/router/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { once } from '@storybook/client-logger';
import { dequal as deepEqual } from 'dequal';
import isPlainObject from 'lodash/isPlainObject';
import isPlainObject from 'lodash/isPlainObject.js';
import memoize from 'memoizerific';
import type { IStringifyOptions } from 'qs';
import qs from 'qs';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/ban-types */
import isPlainObject from 'lodash/isPlainObject';
import isFunction from 'lodash/isFunction';
import isString from 'lodash/isString';
import isPlainObject from 'lodash/isPlainObject.js';
import isFunction from 'lodash/isFunction.js';
import isString from 'lodash/isString.js';
import reactElementToJSXString from 'react-element-to-jsx-string';
import {
type PropDef,
Expand Down