Skip to content

Commit a8424d2

Browse files
committed
chore(many): remove jsx praga headers; use react-jsx compiler option for jsx; fix lint
1 parent 142c508 commit a8424d2

File tree

527 files changed

+1094
-1181
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

527 files changed

+1094
-1181
lines changed

commitlint.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,6 @@ module.exports = {
8686
formatMessageCB: ({ scope, defaultMessage }) =>
8787
scope.split(',').length > 3
8888
? defaultMessage.replace(scope, 'many')
89-
: defaultMessage
89+
: defaultMessage.replace(scope, 'many')
9090
}
9191
}

cypress/component/Alerts.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
25-
import { Alert } from '../../packages/ui'
24+
25+
import { Alert } from '@instructure/ui'
2626

2727
import '../support/component'
2828
import 'cypress-real-events'

cypress/component/AppNav.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
25-
import { AppNav } from '../../packages/ui'
24+
25+
import { AppNav } from '@instructure/ui'
2626

2727
import '../support/component'
2828
import 'cypress-real-events'

cypress/component/ColorIndicator.cy.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
25-
import { ColorIndicator } from '../../packages/ui'
24+
25+
import { ColorIndicator } from '@instructure/ui'
2626

2727
import '../support/component'
2828
import 'cypress-real-events'
2929

30-
import { colorToRGB, colorToHex8 } from '../../packages/ui-color-utils'
30+
import { colorToRGB, colorToHex8 } from '@instructure/ui-color-utils'
3131

3232
const colorTestCases = {
3333
'3 digit hex': '#069',

cypress/component/ColorMixer.cy.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
25-
import { ColorMixer } from '../../packages/ui'
24+
25+
import { ColorMixer } from '@instructure/ui'
2626

2727
import '../support/component'
2828
import 'cypress-real-events'
2929

30-
import { colorToHex8 } from '../../packages/ui-color-utils'
30+
import { colorToHex8 } from '@instructure/ui-color-utils'
3131

3232
const testValue = {
3333
value: '#09918B'

cypress/component/ColorPicker.cy.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
24+
2525
import {
2626
ColorPicker,
2727
ColorMixer,
2828
ColorPreset,
2929
ColorContrast,
3030
Button
31-
} from '../../packages/ui'
31+
} from '@instructure/ui'
3232

3333
import '../support/component'
3434
import 'cypress-real-events'
3535

36-
import { colorToRGB, color2hex } from '../../packages/ui-color-utils'
36+
import { colorToRGB, color2hex } from '@instructure/ui-color-utils'
3737

3838
const colorPreset = [
3939
'#ffffff',

cypress/component/ColorPreset.cy.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
25-
import { ColorPreset } from '../../packages/ui'
24+
25+
import { ColorPreset } from '@instructure/ui'
2626

2727
import '../support/component'
2828
import 'cypress-real-events'
2929

30-
import { colorToRGB } from '../../packages/ui-color-utils'
30+
import { colorToRGB } from '@instructure/ui-color-utils'
3131

3232
const testValue = {
3333
colors: [

cypress/component/DateInput.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
24+
2525
import 'cypress-real-events'
2626

2727
import '../support/component'
28-
import { DateInput, Calendar } from '../../packages/ui'
28+
import { DateInput, Calendar } from '@instructure/ui'
2929

3030
const weekdayLabels = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
3131

cypress/component/DateInput2.cy.tsx

+225-125
Large diffs are not rendered by default.

cypress/component/DateTimeInput.cy.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
24+
2525
import 'cypress-real-events'
2626

2727
import '../support/component'
28-
import { DateTimeInput } from '../../packages/ui'
29-
import { DateTime } from '../../packages/ui-i18n'
28+
import { DateTimeInput } from '@instructure/ui'
29+
import { DateTime } from '@instructure/ui-i18n'
3030

3131
describe('<DateInput/>', () => {
3232
it('should merge defaultValue and initialTimeForNewDate and handle onChange when the user clears date input and select another one', () => {

cypress/component/Dialog.cy.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React, { useState, useRef } from 'react'
24+
import { useState, useRef } from 'react'
2525
import { Dialog } from '@instructure/ui'
2626
import 'cypress-real-events'
2727

cypress/component/DrawerLayout.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
24+
2525
import { expect } from 'chai'
2626

2727
import '../support/component'
2828
import { px, within } from '@instructure/ui-utils'
29-
import DrawerLayoutFixture from '../../packages/ui-drawer-layout/src/DrawerLayout/__fixtures__/DrawerLayout.fixture'
29+
import DrawerLayoutFixture from '@instructure/ui-drawer-layout/src/DrawerLayout/__fixtures__/DrawerLayout.fixture'
3030

3131
describe('<DrawerLayout/>', () => {
3232
it('with no overlay, layout content should have margin equal to tray width with placement=start', () => {

cypress/component/DrawerTray.cy.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
2524

2625
import '../support/component'
2726
import canvas from '@instructure/ui-themes'

cypress/component/Drilldown.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
24+
2525
import 'cypress-real-events'
2626

27-
import { Drilldown } from '../../packages/ui'
27+
import { Drilldown } from '@instructure/ui'
2828
import '../support/component'
2929

3030
const data = Array(5)

cypress/component/DrilldownGroup.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
24+
2525
import 'cypress-real-events'
2626

27-
import { Drilldown } from '../../packages/ui'
27+
import { Drilldown } from '@instructure/ui'
2828
import '../support/component'
2929

3030
function mountDrilldown(selectableType, defaultSelected) {

cypress/component/DrilldownOption.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
24+
2525
import 'cypress-real-events'
2626

27-
import { Drilldown } from '../../packages/ui'
27+
import { Drilldown } from '@instructure/ui'
2828
import '../support/component'
2929

3030
describe('<DrilldownOption/>', () => {

cypress/component/DrilldownPage.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
24+
2525
import 'cypress-real-events'
2626

27-
import { Drilldown } from '../../packages/ui'
27+
import { Drilldown } from '@instructure/ui'
2828
import '../support/component'
2929

3030
describe('<DrilldownPage/>', () => {

cypress/component/DrilldownSeparator.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
24+
2525
import 'cypress-real-events'
2626

27-
import { Drilldown } from '../../packages/ui'
27+
import { Drilldown } from '@instructure/ui'
2828
import '../support/component'
2929

3030
describe('<DrilldownSeparator/>', () => {

cypress/component/FormField.cy.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
25-
// eslint-disable-next-line @instructure/no-relative-imports
26-
import { FormFieldLayout } from '../../packages/ui'
24+
25+
import { FormFieldLayout } from '@instructure/ui'
2726

2827
import '../support/component'
2928

cypress/component/Img.cy.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
24+
2525
import '../support/component'
2626
import 'cypress-real-events'
2727
import { Img } from '@instructure/ui'

cypress/component/InlineSVG.cy.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
24+
2525
import '../support/component'
2626
import 'cypress-real-events'
2727
import { InlineSVG } from '@instructure/ui'

cypress/component/ListItem.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
24+
2525
import 'cypress-real-events'
2626

27-
import { ListItem } from '../../packages/ui'
27+
import { ListItem } from '@instructure/ui'
2828
import '../support/component'
2929

3030
describe('<ListItem/>', () => {

cypress/component/Menu.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
24+
2525
import { expect } from 'chai'
2626
import 'cypress-real-events'
2727

2828
import '../support/component'
29-
import { Menu, MenuItem } from '../../packages/ui'
29+
import { Menu, MenuItem } from '@instructure/ui'
3030

3131
describe('<Menu/>', () => {
3232
it('should move focus properly', () => {

cypress/component/MenuItem.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
24+
2525
import { expect } from 'chai'
2626
import 'cypress-real-events'
2727

2828
import '../support/component'
29-
import { MenuItem } from '../../packages/ui'
29+
import { MenuItem } from '@instructure/ui'
3030

3131
describe('<MenuItem />', () => {
3232
it('should call onSelect after SPACE key is pressed', () => {

cypress/component/MenuItemGroup.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
24+
2525
import { expect } from 'chai'
2626
import 'cypress-real-events'
2727

2828
import '../support/component'
29-
import { MenuItem, MenuItemGroup, MenuItemSeparator } from '../../packages/ui'
29+
import { MenuItem, MenuItemGroup, MenuItemSeparator } from '@instructure/ui'
3030

3131
describe('<MenuItemGroup />', () => {
3232
it('updates the selected items when allowMultiple is true', () => {

cypress/component/Modal.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React, { useState } from 'react'
25-
import { Modal, View } from '../../packages/ui'
24+
import { useState } from 'react'
25+
import { Modal, View } from '@instructure/ui'
2626

2727
import '../support/component'
2828

cypress/component/NumberInput.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
25-
import { NumberInput } from '../../packages/ui'
24+
25+
import { NumberInput } from '@instructure/ui'
2626

2727
import '../support/component'
2828
import 'cypress-real-events'

cypress/component/OptionsItem.cy.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
24+
2525
import '../support/component'
2626
import 'cypress-real-events'
2727
import { expect } from 'chai'

cypress/component/Page.cy.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React, { useState } from 'react'
24+
import { useState } from 'react'
2525
import { Pages, PagesPage } from '@instructure/ui-pages'
2626

2727
import '../support/component'

cypress/component/Pagination.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
25-
import { Pagination, ScreenReaderContent } from '../../packages/ui'
24+
25+
import { Pagination, ScreenReaderContent } from '@instructure/ui'
2626

2727
import '../support/component'
2828
import 'cypress-real-events'

cypress/component/PaginationArrowButton.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
25-
import { Pagination } from '../../packages/ui'
24+
25+
import { Pagination } from '@instructure/ui'
2626

2727
import '../support/component'
2828
import 'cypress-real-events'

cypress/component/PaginationPageInput.cy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
* SOFTWARE.
2323
*/
24-
import React from 'react'
25-
import { Pagination } from '../../packages/ui'
24+
25+
import { Pagination } from '@instructure/ui'
2626

2727
import '../support/component'
2828
import 'cypress-real-events'

0 commit comments

Comments
 (0)