Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
546 changes: 546 additions & 0 deletions .oxlintrc.json

Large diffs are not rendered by default.

230 changes: 0 additions & 230 deletions eslint.config.mjs

This file was deleted.

16 changes: 2 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"@commitlint/config-conventional": "^21.2.0",
"@emotion/cache": "^11.14.0",
"@emotion/react": "^11.14.0",
"@eslint/js": "^9.39.4",
"@instructure/browserslist-config-instui": "workspace:*",
"@instructure/ui-babel-preset": "workspace:*",
"@instructure/ui-scripts": "workspace:*",
Expand All @@ -72,7 +71,6 @@
"@types/react": "18.3.26",
"@types/react-dom": "18.3.1",
"@vitejs/plugin-react": "^5.2.0",
"@vitest/eslint-plugin": "^1.6.20",
"babel-loader": "^10.1.1",
"babel-plugin-add-import-extension": "^1.6.0",
"chai": "^4.4.1",
Expand All @@ -85,33 +83,23 @@
"cz-git": "^1.13.1",
"esbuild": "^0.28.1",
"esbuild-loader": "^4.5.0",
"eslint": "^9.39.4",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-node": "^0.4.0",
"eslint-module-utils": "2.13.0",
"eslint-plugin-compat": "^7.0.2",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-notice": "^1.0.0",
"eslint-plugin-react": "^7.37.5",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one can be deleted too

"globals": "^17.7.0",
"husky": "^9.1.7",
"jsdom": "^29.1.1",
"lerna": "9.0.7",
"lint-staged": "^17.0.8",
"moment-timezone": "^0.6.2",
"oxlint": "^1.72.0",
"react": "18.3.1",
"read-package-up": "^12.0.0",
"typescript": "6.0.3",
"typescript-eslint": "^8.62.1",
"vitest": "^4.1.9",
"webpack": "^5.107.2"
},
"//dependency-comments": {
"scripts": "The '--' at the end of commands is needed so user parameters are passed forward",
"danger": "^11.3.1 -- add this back if we use it in pr-validation.yml",
"tar": "Lerna 8 needs tar for this fixed(?) bug: https://github.com/lerna/lerna/issues/4005",
"eslint-import-resolver-typescript": "^3.6.1 not supported by ESLint 9",
"eslint-plugin-import-x": "^3.1.0 not supported by ESLint 9",
"@types/jest": "needed because https://github.com/testing-library/jest-dom/issues/544 recheck if fixed",
"git-raw-commits>dargs": "Force dargs@7.0.0 (CommonJS) for git-raw-commits@3.0.0 used by lerna. pnpm hoisting was causing ESM dargs@8.1.0 to be resolved instead, breaking 'pnpm run bump' with 'TypeError: dargs is not a function'"
},
Expand All @@ -127,7 +115,7 @@
},
"lint-staged": {
"*.{js,ts,tsx}": [
"eslint --quiet",
"oxlint -c .oxlintrc.json --fix",
"prettier --write"
],
"*.{json,jsx,md,mdx,html}": [
Expand Down
4 changes: 2 additions & 2 deletions packages/__docs__/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ import { dark, light } from '@instructure/ui-themes'
import { debounce } from '@instructure/debounce'

// @ts-expect-error no type declarations for CSS side-effect import
// eslint-disable-next-line @instructure/no-relative-imports
// eslint-disable-next-line instructure/no-relative-imports
import '../ui-icons/src/generated/icon-font/Solid/InstructureIcons-Solid.css'

// @ts-expect-error no type declarations for CSS side-effect import
// eslint-disable-next-line @instructure/no-relative-imports
// eslint-disable-next-line instructure/no-relative-imports
import '../ui-icons/src/generated/icon-font/Line/InstructureIcons-Line.css'

import { DateTime } from '@instructure/ui-i18n'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe('<ColorPreset />', () => {
})
})

it('should default to using the hex code as aria-label when colorScreenReaderLabel is not provided ', async () => {
it('should default to using the hex code as aria-label when colorScreenReaderLabel is not provided', async () => {
render(<ColorPreset {...testValue} />)
const buttons = screen.getAllByRole('button')

Expand Down
2 changes: 1 addition & 1 deletion packages/ui-i18n/src/textDirectionContextConsumer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const textDirectionContextConsumer: TextDirectionContextConsumerType =
TextDirectionContextConsumerForwardingRef.defaultProps =
ComposedComponent.defaultProps
TextDirectionContextConsumerForwardingRef.propTypes =
// eslint-disable-next-line react/forbid-foreign-prop-types
// eslint-disable-next-line react-js/forbid-foreign-prop-types
ComposedComponent.propTypes
TextDirectionContextConsumerForwardingRef.allowedProps =
ComposedComponent.allowedProps
Expand Down
14 changes: 7 additions & 7 deletions packages/ui-scripts/lib/__node_tests__/lint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ vi.mock('@instructure/command-utils', () => ({
runCommandSync: vi.fn()
}))

import lint from '../test/lint.ts'
import lint from '../commands/lint.ts'
import { runCommandSync } from '@instructure/command-utils'

const runMock = vi.mocked(runCommandSync)
Expand All @@ -40,7 +40,7 @@ describe('lint handler', () => {

it('lints "." when no positional paths are provided', async () => {
await lint.handler({ _: ['lint'] })
expect(runMock).toHaveBeenCalledWith('eslint', ['.'])
expect(runMock).toHaveBeenCalledWith('oxlint', ['.'])
})

it('keeps only .js, .jsx, .ts, .tsx paths', async () => {
Expand All @@ -56,23 +56,23 @@ describe('lint handler', () => {
expect(runMock).not.toHaveBeenCalled()
})

it('passes --fix to eslint when argv.fix is true', async () => {
it('passes --fix to oxlint when argv.fix is true', async () => {
await lint.handler({ _: ['lint', 'a.ts'], fix: true })
expect(runMock).toHaveBeenCalledWith('eslint', ['a.ts', '--fix'])
expect(runMock).toHaveBeenCalledWith('oxlint', ['a.ts', '--fix'])
})

it('does not pass --fix when argv.fix is false', async () => {
await lint.handler({ _: ['lint', 'a.ts'], fix: false })
expect(runMock).toHaveBeenCalledWith('eslint', ['a.ts'])
expect(runMock).toHaveBeenCalledWith('oxlint', ['a.ts'])
})

it('does not pass --fix when argv.fix is undefined', async () => {
await lint.handler({ _: ['lint', 'a.ts'] })
expect(runMock).toHaveBeenCalledWith('eslint', ['a.ts'])
expect(runMock).toHaveBeenCalledWith('oxlint', ['a.ts'])
})

it('appends --fix even when linting the default "." path', async () => {
await lint.handler({ _: ['lint'], fix: true })
expect(runMock).toHaveBeenCalledWith('eslint', ['.', '--fix'])
expect(runMock).toHaveBeenCalledWith('oxlint', ['.', '--fix'])
})
})
2 changes: 1 addition & 1 deletion packages/ui-scripts/lib/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import publish from './publish.ts'
import publishPrivate from './publish-private.ts'
import visualDiff from './visual-diff.ts'
import transpileDiff from './transpile-diff.ts'
import lint from '../test/lint.ts'
import lint from './lint.ts'
import bundle from '../build/webpack.ts'
import clean from '../build/clean.ts'
import build from '../build/babel.ts'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default {
)
}
if (jspaths.length) {
runCommandSync('eslint', argv.fix ? [...jspaths, '--fix'] : jspaths)
runCommandSync('oxlint', argv.fix ? [...jspaths, '--fix'] : jspaths)
}
}
}
2 changes: 1 addition & 1 deletion packages/ui-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"read-package-up": "^12.0.0"
},
"peerDependencies": {
"eslint": "^9",
"oxlint": "^1.72.0",
"react": ">=18 <=19",
"webpack": "^5"
},
Expand Down
Loading
Loading