Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# use path directly instead of npx or npm run because it's way faster
node_modules/.bin/oxlint --deny-warnings
node_modules/.bin/oxlint --type-aware --deny-warnings
24 changes: 23 additions & 1 deletion .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,29 @@
"react-hooks/exhaustive-deps": "error",
"react-hooks/rules-of-hooks": "error",
"import/no-default-export": "error",
"consistent-type-imports": "error"
"consistent-type-imports": "error",

// Missing ESLint core rules
"eqeqeq": ["error", "always", { "null": "ignore" }],
"no-param-reassign": "error",
"no-return-assign": "error",
"no-restricted-imports": [
"error",
{
// prevent confusion due to auto-imports and barrel files
"paths": ["."],
"patterns": [
// import all CSS except index.css at top level through CSS @import statements
// to avoid bad ordering situations. See https://github.com/oxidecomputer/console/pull/2035
"*.css"
]
}
],
"radix": "error",

// TypeScript rules (currently disabled but available)
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/unbound-method": "off"
},
"overrides": [
{
Expand Down
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright Oxide Computer Company
*/

// eslint-disable-next-line no-default-export
export default {
// note: it seems like tailwind has to be last for it to work
plugins: ['@ianvs/prettier-plugin-sort-imports', 'prettier-plugin-tailwindcss'],
Expand Down
1 change: 1 addition & 0 deletions app/forms/firewall-rules-common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ import { type FirewallRuleValues } from './firewall-rules-util'

type TargetAndHostFilterType =
| VpcFirewallRuleTarget['type']
// eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents
| VpcFirewallRuleHostFilter['type']

type TargetAndHostFormValues = {
Expand Down
3 changes: 2 additions & 1 deletion mock-api/json-type.type-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import type { Json } from './json-type'
// are not equal. There's no point in wrapping this in a real test because it
// will always pass.

let val: any // eslint-disable-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const val: any = undefined

// just checking :)
assertType<1>(val as 1)
Expand Down
186 changes: 149 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"e2ec": "playwright test --project=chrome",
"visual:baseline": "./tools/generate-visual-baseline.sh",
"visual:compare": "./tools/compare-visual-changes.sh",
"lint": "oxlint && eslint --ext .js,.ts,.tsx app test mock-api",
"oxlint": "oxlint",
"lint": "oxlint --type-aware && eslint --ext .js,.ts,.tsx app test mock-api",
"oxlint": "oxlint --type-aware",
"fmt": "prettier --cache --write . && npm run lint -- --fix",
"openapi-gen-ts": "openapi-gen-ts",
"prettier": "prettier",
Expand Down Expand Up @@ -114,7 +114,8 @@
"ip-num": "^1.5.1",
"jsdom": "^25.0.1",
"msw": "^2.7.5",
"oxlint": "^1.6.0",
"oxlint": "^1.23.0",
"oxlint-tsgolint": "^0.2.0",
"patch-package": "^8.0.0",
"postcss": "^8.4.49",
"postcss-import": "^16.1.0",
Expand Down
Loading