Skip to content

Commit

Permalink
feat: Use bare directories instead of index files in specifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
PolariTOON committed Feb 14, 2023
1 parent bdc551c commit 00dd09e
Show file tree
Hide file tree
Showing 27 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion react/ActionMenu/index.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Icon from '../Icon'
import FileIcon from '../Icons/File'
import WarningIcon from '../Icons/Warning'

import ActionMenu, { ActionMenuItem, ActionMenuRadio } from './'
import ActionMenu, { ActionMenuItem, ActionMenuRadio } from '.'

describe('ActionMenu', () => {
fixPopperTesting()
Expand Down
2 changes: 1 addition & 1 deletion react/Alerter/alerter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import React from 'react'
import { shallow } from 'enzyme'

import Alerter from './'
import Alerter from '.'
import Alert from './Alert'
import Button from '../Button'

Expand Down
2 changes: 1 addition & 1 deletion react/AppIcon/test/AppIcon.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import React from 'react'
import { shallow } from 'enzyme'

import { AppIcon } from '../'
import { AppIcon } from '..'

describe('AppIcon component', () => {
const app = {}
Expand Down
2 changes: 1 addition & 1 deletion react/AppLinker/index.deprecated.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
checkApp
} from 'cozy-device-helper'

import AppLinker from './index'
import AppLinker from '.'
import { generateUniversalLink } from './native'
jest.useFakeTimers()

Expand Down
2 changes: 1 addition & 1 deletion react/AppLinker/index.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
checkApp
} from 'cozy-device-helper'

import AppLinker from './index'
import AppLinker from '.'
import { generateUniversalLink } from './native'
jest.useFakeTimers()

Expand Down
2 changes: 1 addition & 1 deletion react/AppTile/AppTile.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import CozyClient, { CozyProvider } from 'cozy-client'
import en from '../AppSections/locales/en.json'
import I18n from '../I18n'

import AppTile from './index'
import AppTile from '.'

const appMock = {
slug: 'test',
Expand Down
2 changes: 1 addition & 1 deletion react/Banner/index.spec.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { render } from '@testing-library/react'
import Banner from './index'
import Banner from '.'

describe('Grid', () => {
it('should render correctly justify content', () => {
Expand Down
2 changes: 1 addition & 1 deletion react/CipherIcon/index.spec.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { fireEvent, render } from '@testing-library/react'
import CipherIcon from './index'
import CipherIcon from '.'

jest.mock('cozy-client', () => ({
withClient: Component => {
Expand Down
2 changes: 1 addition & 1 deletion react/DateMonthPicker/index.spec.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { mount } from 'enzyme'
import React from 'react'
import DateMonthPicker from './index'
import DateMonthPicker from '.'
import { act } from 'react-dom/test-utils'

import I18n from '../I18n'
Expand Down
2 changes: 1 addition & 1 deletion react/Field/index.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import Field from './'
import Field from '.'
import { shallow } from 'enzyme'

describe('Field component', () => {
Expand Down
2 changes: 1 addition & 1 deletion react/FileInput/index.spec.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import uniqueId from 'lodash/uniqueId'

import FileInput from './index'
import FileInput from '.'

jest.mock('lodash/uniqueId')

Expand Down
2 changes: 1 addition & 1 deletion react/FilePicker/FilePickerHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Previous from '../Icons/Previous'

import FilePickerBreadcrumb from './FilePickerBreadcrumb'
import { buildCurrentFolderQuery } from './queries'
import { ROOT_DIR_ID } from './index'
import { ROOT_DIR_ID } from '.'

/**
* @param {IOCozyFolder} displayedFolder - An io.cozy.files folder
Expand Down
2 changes: 1 addition & 1 deletion react/I18n/withLocales.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { I18n, translate } from './'
import { I18n, translate } from '.'
import omit from 'lodash/omit'

/**
Expand Down
2 changes: 1 addition & 1 deletion react/Input/index.spec.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'

import Input from './index'
import Input from '.'

describe('Input component', () => {
it('should support number type', () => {
Expand Down
2 changes: 1 addition & 1 deletion react/Modal/index.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import { act } from 'react-dom/test-utils'
import { useState } from 'react'
import { mount } from 'enzyme'
import Modal, { BODY_CLASS } from './index'
import Modal, { BODY_CLASS } from '.'
import { BreakpointsProvider } from '../hooks/useBreakpoints'

describe('Modal', () => {
Expand Down
2 changes: 1 addition & 1 deletion react/PieChart/index.spec.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { makeOptions, makeData } from './index'
import { makeOptions, makeData } from '.'

describe('makeOptions', () => {
it('should return default options', () => {
Expand Down
2 changes: 1 addition & 1 deletion react/Popup/index.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { shallow } from 'enzyme'

import { isMobileApp } from 'cozy-device-helper'

import { Popup } from './'
import { Popup } from '.'

jest.mock('cozy-device-helper', () => ({
...jest.requireActual('cozy-device-helper'),
Expand Down
2 changes: 1 addition & 1 deletion react/PushClientButton/index.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'

import { render } from '@testing-library/react'

import PushClientButton from './'
import PushClientButton from '.'

jest.mock('../Icons/DeviceLaptop', () => () => (
<div data-testid="device-laptop" />
Expand Down
2 changes: 1 addition & 1 deletion react/Radio/index.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from 'react'

import { render, fireEvent } from '@testing-library/react'

import Radio from './'
import Radio from '.'
import RadioGroup from '../RadioGroup'
import FormControlLabel from '../FormControlLabel'

Expand Down
2 changes: 1 addition & 1 deletion react/SquareAppIcon/SquareAppIcon.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import CozyClient, { CozyProvider } from 'cozy-client'
import Icon from '../Icon'
import CozyIcon from '../Icons/Cozy'
import MuiCozyTheme from '../MuiCozyTheme'
import SquareAppIcon from './index'
import SquareAppIcon from '.'

const appMock = {
slug: 'test',
Expand Down
2 changes: 1 addition & 1 deletion react/UploadQueue/index.spec.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { UploadQueue, formatRemainingTime } from './index'
import { UploadQueue, formatRemainingTime } from '.'
import { render } from '@testing-library/react'
import { useI18n } from '../I18n'

Expand Down
2 changes: 1 addition & 1 deletion react/ViewStack/example.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { useViewStack } from './index'
import { useViewStack } from '.'
import Button from '../Button'

const PaddedParagraph = ({ children }) => (
Expand Down
2 changes: 1 addition & 1 deletion react/ViewStack/index.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { mount } from 'enzyme'
import React from 'react'
import { act } from 'react-dom/test-utils'
import { Slide } from './example'
import ViewStack from './index'
import ViewStack from '.'
import Button from '../Button'
import SwipeableViews from 'react-swipeable-views'

Expand Down
2 changes: 1 addition & 1 deletion react/Viewer/Viewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { FileDoctype } from '../proptypes'

import ViewerControls from './components/ViewerControls'
import ViewerByFile from './components/ViewerByFile'
import { toolbarPropsPropType } from './index'
import { toolbarPropsPropType } from '.'

const KEY_CODE_LEFT = 37
const KEY_CODE_RIGHT = 39
Expand Down
2 changes: 1 addition & 1 deletion react/Viewer/ViewerExposer.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import DefaultViewer from './index'
import DefaultViewer from '.'

export default DefaultViewer
2 changes: 1 addition & 1 deletion react/Viewer/components/ViewerControls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { withStyles } from '../../styles'
import withBreakpoints from '../../helpers/withBreakpoints'

import { isValidForPanel } from '../helpers'
import { toolbarPropsPropType } from '../index'
import { toolbarPropsPropType } from '..'
import { infoWidth } from './InformationPanel'
import Toolbar from './Toolbar'
import Navigation from './Navigation'
Expand Down
2 changes: 1 addition & 1 deletion react/hooks/useConfirmExit/index.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import useConfirmExit from './'
import useConfirmExit from '.'
import { renderHook, act } from '@testing-library/react-hooks'
import { isElement } from 'react-dom/test-utils'

Expand Down

0 comments on commit 00dd09e

Please sign in to comment.