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
539 changes: 539 additions & 0 deletions .oxlintrc.json

Large diffs are not rendered by default.

16 changes: 13 additions & 3 deletions docs/contributing/contributing-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,20 @@ See the [testing documentation](testing-overview) for details.

### Linters and Code Formatting

Linters are run as part of the build. If you use VSCode, you can set up the following plugins to catch lint and formatting errors earlier.
Linting is run as part of the build via [oxlint](https://oxc.rs/docs/guide/usage/linter).

1. Install the _Eslint_ plugin [VSCode](https://github.com/Microsoft/vscode-eslint)
1. Install the _Stylelint_ plugin [VSCode](https://github.com/stylelint/vscode-stylelint)
Useful commands:

- `pnpm run lint` — lint the whole workspace.
- `pnpm run lint:fix` — lint the whole workspace and auto-fix what it can.
- `pnpm run lint:changes` — lint only files changed since the last commit.
- `pnpm --filter <package name> lint` / `lint:fix` — lint a single package.

Lint errors are also fixed automatically on commit for staged files via `lint-staged` (see the `pre-commit` git hook).

If you use VSCode, you can set up the following plugin to catch lint errors earlier.

1. Install the _Oxc_ plugin [VSCode](https://marketplace.visualstudio.com/items?itemName=oxc.oxc-vscode)
1. Run `pnpm install` to install the dependencies
1. Restart your editor

Expand Down
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 @@ -63,7 +63,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 @@ -78,7 +77,6 @@
"@vitejs/plugin-react": "^5.2.0",
"@vitest/browser": "4.1.9",
"@vitest/browser-playwright": "4.1.9",
"@vitest/eslint-plugin": "^1.6.20",
"@vitest/ui": "4.1.9",
"babel-loader": "^10.1.1",
"babel-plugin-add-import-extension": "^1.6.0",
Expand All @@ -92,26 +90,18 @@
"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",
Comment thread
matyasf marked this conversation as resolved.
"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",
"prettier": "2.8.8",
"playwright": "1.61.1",
"react": "18.3.1",
"read-package-up": "^12.0.0",
"typescript": "6.0.3",
"typescript-eslint": "^8.62.1",
"vitest": "^4.1.9",
"vitest-browser-react": "2.2.0",
"webpack": "^5.107.2"
Expand All @@ -120,8 +110,6 @@
"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 @@ -137,7 +125,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 @@ -10,7 +10,7 @@
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyrigfht notice and this permission notice shall be included in all
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyrigfht notice and this permission notice shall be included in all
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2018 - present Instructure, Inc.
* Copyright (c) 2015 - present Instructure, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-date-time-input/src/DateTimeInput/v1/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2018 - present Instructure, Inc.
* Copyright (c) 2015 - present Instructure, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-date-time-input/src/DateTimeInput/v2/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2018 - present Instructure, Inc.
* Copyright (c) 2015 - present Instructure, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2018 - present Instructure, Inc.
* Copyright (c) 2015 - present Instructure, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading
Loading