Skip to content
Draft
  •  
  •  
  •  
8 changes: 0 additions & 8 deletions .prettierignore

This file was deleted.

5 changes: 0 additions & 5 deletions .prettierrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "webpro.vscode-knip"]
"recommendations": ["webpro.vscode-knip", "oxc.oxc-vscode"]
}
11 changes: 8 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.oxc": "always"
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.defaultFormatter": "oxc.oxc-vscode",
"oxc.fmt.configPath": "oxfmt.config.ts",
"oxc.typeAware": true,
"typescript.tsdk": "node_modules/typescript/lib",
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
}
}
143 changes: 0 additions & 143 deletions eslint.config.js

This file was deleted.

4 changes: 2 additions & 2 deletions knip.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"entry": ["src/sw.ts", "scripts/normalize-imports.js"],
"ignore": ["oxlint.config.ts", "oxfmt.config.ts"],
"ignoreExportsUsedInFile": {
"interface": true,
"type": true
},
"ignoreDependencies": [
"buffer",
"@sableclient/sable-call-embedded",
"@matrix-org/matrix-sdk-crypto-wasm",
"@testing-library/user-event"
"@matrix-org/matrix-sdk-crypto-wasm"
],
"ignoreBinaries": ["knope"],
"rules": {
Expand Down
12 changes: 8 additions & 4 deletions knope.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
versioned_files = ["package.json"]
changelog = "CHANGELOG.md"
extra_changelog_sections = [
{ name = "Documentation", types = ["docs"] },
{ name = "Notes", types = ["note"] },
{ name = "Documentation", types = [
"docs",
] },
{ name = "Notes", types = [
"note",
] },
]
# assets = "marker" // TODO: add this later once we have assets

Expand Down Expand Up @@ -64,6 +68,6 @@ repo = "Sable"
[release_notes]
# The <!-- commit:$commit_hash --> marker is used by prepare-release.yml
change_templates = [
"### $summary <!-- commit:$commit_hash -->\n\n$details",
"* $summary <!-- commit:$commit_hash -->",
"### $summary <!-- commit:$commit_hash -->\n\n$details",
"* $summary <!-- commit:$commit_hash -->",
]
18 changes: 18 additions & 0 deletions oxfmt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { defineConfig } from 'oxfmt';

export default defineConfig({
printWidth: 100,
tabWidth: 2,
singleQuote: true,
trailingComma: 'es5',
ignorePatterns: [
'dist',
'node_modules',
'package.json',
'pnpm-lock.yaml',
'LICENSE',
'README.md',
'CHANGELOG.md',
'./changeset',
],
});
62 changes: 62 additions & 0 deletions oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { defineConfig } from 'oxlint';

export default defineConfig({
options: {
typeAware: true,
},
plugins: ['react', 'jsx-a11y', 'typescript', 'import', 'unicorn', 'oxc', 'vitest', 'promise'],
categories: {
correctness: 'error',
suspicious: 'warn',
perf: 'warn',
style: 'off',
},
env: {
browser: true,
builtin: true,
},
rules: {
'import/no-unassigned-import': 'off',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',
'no-console': ['error', { allow: ['warn', 'error'] }],
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': ['error', { extensions: ['.tsx', '.jsx'] }],
'react/rules-of-hooks': 'error',
'react/exhaustive-deps': 'error',
'react/iframe-missing-sandbox': 'off',
'jsx-a11y/no-autofocus': 'off',
'jsx-a11y/prefer-tag-over-role': 'off',
'typescript/no-explicit-any': 'error',
'typescript/consistent-type-imports': 'error',
'typescript/only-throw-error': 'error',
'typescript/no-unsafe-type-assertion': 'off',
'typescript/no-floating-promises': 'off',
'typescript/no-unnecessary-type-arguments': 'off',
'oxc/no-map-spread': 'off',
'promise/always-return': 'off',
},
overrides: [
{
files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],
rules: {
'typescript/no-unused-vars': [
'error',
{
args: 'after-used',
ignoreRestSiblings: true,
vars: 'all',
},
],
'typescript/no-shadow': 'error',
},
},
{
files: ['**/*.test.ts', '**/*.test.tsx'],
rules: {
'typescript/unbound-method': 'off',
'typescript/no-unsafe-enum-comparison': 'off',
},
},
],
});
20 changes: 7 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"fmt": "prettier --write .",
"fmt:check": "prettier --check .",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix && oxfmt .",
"fmt": "oxfmt .",
"fmt:check": "oxfmt --check .",
"typecheck": "tsc",
"test": "vitest",
"test:ui": "vitest --ui",
Expand Down Expand Up @@ -57,7 +57,6 @@
"dompurify": "^3.3.3",
"emojibase": "^15.3.1",
"emojibase-data": "^15.3.2",
"eslint-plugin-react": "7.37.5",
"eventemitter3": "^5.0.4",
"file-saver": "^2.0.5",
"focus-trap-react": "^10.3.1",
Expand Down Expand Up @@ -96,8 +95,6 @@
"devDependencies": {
"@cloudflare/vite-plugin": "^1.26.0",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@eslint/compat": "2.0.2",
"@eslint/js": "9.39.3",
"@rollup/plugin-inject": "^5.0.5",
"@rollup/plugin-wasm": "^6.2.2",
"@sableclient/sable-call-embedded": "v1.1.4",
Expand All @@ -118,14 +115,11 @@
"@vitest/ui": "^4.1.0",
"buffer": "^6.0.3",
"cloudflared": "^0.7.1",
"eslint": "9.39.3",
"eslint-config-airbnb-extended": "3.0.1",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-prettier": "5.5.5",
"globals": "17.3.0",
"jsdom": "^29.0.0",
"knip": "5.85.0",
"prettier": "3.8.1",
"oxfmt": "^0.45.0",
"oxlint": "^1.60.0",
"oxlint-tsgolint": "^0.21.0",
"typescript": "^5.9.3",
"vite": "^7.3.1",
"vite-plugin-compression2": "2.5.0",
Expand Down
Loading
Loading