Skip to content

Commit 386a088

Browse files
authored
chore: migrate to oxlint and oxfmt (#502)
1 parent 1b387cd commit 386a088

File tree

279 files changed

+6468
-26307
lines changed

Some content is hidden

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

279 files changed

+6468
-26307
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ end_of_line = lf
88
charset = utf-8
99
trim_trailing_whitespace = true
1010
insert_final_newline = true
11+
quote_type = single
1112

1213
[*.md]
1314
trim_trailing_whitespace = false

.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
provenance=true
2-
public-hoist-pattern[]=*eslint*
2+
public-hoist-pattern[]=oxlint

.oxfmtrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"semi": false,
4+
"singleQuote": true
5+
}

.oxlintrc.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"plugins": [
3+
"eslint",
4+
"typescript",
5+
"unicorn",
6+
"react",
7+
"react-perf",
8+
"nextjs",
9+
"oxc",
10+
"import",
11+
"jsdoc",
12+
"jsx-a11y",
13+
"node",
14+
"promise",
15+
"vitest",
16+
"vue"
17+
],
18+
"settings": {
19+
"jsdoc": {
20+
"tagNamePreference": {
21+
"defaultValue": "defaultValue",
22+
"remarks": "remarks"
23+
}
24+
}
25+
},
26+
"overrides": [
27+
{
28+
"files": ["docs/**/samples/**/*.ts"],
29+
"rules": {
30+
"no-unused-vars": "allow"
31+
}
32+
},
33+
{
34+
"files": ["packages/{fol,key-hierarchy,vue-persistent-storage-manager}/test/**/*.ts"],
35+
"rules": {
36+
"valid-expect": "allow"
37+
}
38+
}
39+
]
40+
}

.vscode/settings.json

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,8 @@
11
{
2-
// Disable the default formatter, use eslint instead
32
"prettier.enable": false,
43
"editor.formatOnSave": false,
5-
6-
// Auto fix
7-
"editor.codeActionsOnSave": {
8-
"source.fixAll.eslint": "explicit",
9-
"source.organizeImports": "never"
10-
},
11-
12-
// Silent the stylistic rules in you IDE, but still auto fix them
13-
"eslint.rules.customizations": [
14-
{ "rule": "style/*", "severity": "off" },
15-
{ "rule": "format/*", "severity": "off" },
16-
{ "rule": "*-indent", "severity": "off" },
17-
{ "rule": "*-spacing", "severity": "off" },
18-
{ "rule": "*-spaces", "severity": "off" },
19-
{ "rule": "*-order", "severity": "off" },
20-
{ "rule": "*-dangle", "severity": "off" },
21-
{ "rule": "*-newline", "severity": "off" },
22-
{ "rule": "*quotes", "severity": "off" },
23-
{ "rule": "*semi", "severity": "off" }
24-
],
25-
26-
// Enable eslint for all supported languages
27-
"eslint.validate": [
28-
"astro",
29-
"javascript",
30-
"javascriptreact",
31-
"typescript",
32-
"typescriptreact",
33-
"vue",
34-
"html",
35-
"markdown",
36-
"json",
37-
"jsonc",
38-
"yaml",
39-
"toml"
40-
],
41-
"eslint.workingDirectories": [{ "mode": "auto" }],
424
"markdownlint.config": {
5+
"MD024": false,
436
"MD033": false
447
},
458
"vitest.commandLine": "pnpm test --run"

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
- [@yeger/debounce](./packages/debounce)
2626
- [@yeger/deepmerge](./packages/deepmerge)
27-
- [@yeger/eslint-config](./packages/eslint-config)
2827
- [@yeger/fol](./packages/fol)
2928
- [@yeger/html-diff](./packages/html-diff)
3029
- [@yeger/playwright-config](./packages/playwright-config)

apps/formi/components/CopyButton.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ const props = defineProps<{ content: string }>()
55
const emit = defineEmits(['copied'])
66
const { content } = toRefs(props)
77
8-
const isClipboardSupported =
9-
typeof navigator !== 'undefined' && !!navigator.clipboard
8+
const isClipboardSupported = typeof navigator !== 'undefined' && !!navigator.clipboard
109
1110
const { info } = useNotification()
1211

apps/formi/components/FOLTree.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ const borderBreakpoints = [1, 3, 5] as const
3030
:class="{ 'cursor-pointer': children.length > 0 }"
3131
style="white-space: nowrap"
3232
@click="expanded = !expanded"
33-
>{{ expanded ? fragment.text() : fragment.toFormattedString() }}</code>
33+
>{{ expanded ? fragment.text() : fragment.toFormattedString() }}</code
34+
>
3435
<div
3536
v-show="expanded && children.length > 0"
3637
class="mt-2 flex size-fit flex-row justify-evenly gap-2"

apps/formi/components/FeatureSection.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<script setup lang="ts">
2-
const props = defineProps<{ title: string, number: number }>()
2+
const props = defineProps<{ title: string; number: number }>()
33
const { title, number } = toRefs(props)
44
</script>
55

66
<template>
77
<section :data-testid="`features-section-${title}`">
8-
<div
9-
class="mb-16 flex items-center justify-center gap-4 text-xl sm:text-2xl md:text-3xl"
10-
>
8+
<div class="mb-16 flex items-center justify-center gap-4 text-xl sm:text-2xl md:text-3xl">
119
<HLine />
1210
<CircledNumber :number="number" />
1311
<h2>{{ title }}</h2>

apps/formi/components/Footer.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ const resources: Link[] = [
2222
</script>
2323

2424
<template>
25-
<footer
26-
class="align-start mx-auto mt-8 flex w-fit flex-wrap justify-between gap-12"
27-
>
25+
<footer class="align-start mx-auto mt-8 flex w-fit flex-wrap justify-between gap-12">
2826
<FooterColumn title="Resources">
2927
<a
3028
v-for="link of resources"

0 commit comments

Comments
 (0)