Migrate to oxfmt (#71)

This commit is contained in:
Vitaly Rtishchev
2026-03-31 12:59:22 +03:00
committed by GitHub
parent 518ce860d7
commit fc4f868f69
6 changed files with 252 additions and 178 deletions
+35
View File
@@ -0,0 +1,35 @@
{
"printWidth": 100,
"singleQuote": true,
"trailingComma": "es5",
"importOrder": [
".*styles.css$",
"",
"dayjs",
"^react$",
"^next$",
"^next/.*$",
"<BUILTIN_MODULES>",
"<THIRD_PARTY_MODULES>",
"^@mantine/(.*)$",
"^@mantinex/(.*)$",
"^@mantine-tests/(.*)$",
"^@docs/(.*)$",
"^@/.*$",
"^../(?!.*\\.css$).*$",
"^./(?!.*\\.css$).*$",
"\\.module\\.css$",
"(?<!\\.module)\\.css$"
],
"sortPackageJson": false,
"ignorePatterns": [
"*.d.ts",
"*.mdx",
"*.md",
"packages/*/*/styles.css",
"packages/*/*/styles.layer.css",
"packages/*/*/styles/*.css",
"docs/.next",
"docs/out"
]
}
-2
View File
@@ -1,2 +0,0 @@
.next
next-env.d.ts
-35
View File
@@ -1,35 +0,0 @@
/** @type {import("@ianvs/prettier-plugin-sort-imports").PrettierConfig} */
const config = {
printWidth: 100,
singleQuote: true,
trailingComma: 'es5',
plugins: ['@ianvs/prettier-plugin-sort-imports'],
importOrder: [
'.*styles.css$',
'',
'dayjs',
'^react$',
'^next$',
'^next/.*$',
'<BUILTIN_MODULES>',
'<THIRD_PARTY_MODULES>',
'^@mantine/(.*)$',
'^@mantinex/(.*)$',
'^@mantine-tests/(.*)$',
'^@docs/(.*)$',
'^@/.*$',
'^../(?!.*.css$).*$',
'^./(?!.*.css$).*$',
'\\.css$',
],
overrides: [
{
files: '*.mdx',
options: {
printWidth: 70,
},
},
],
};
export default config;
+3 -3
View File
@@ -25,13 +25,13 @@ This template comes with the following features:
- `typecheck` checks TypeScript types
- `lint` runs ESLint
- `prettier:check` checks files with Prettier
- `format:test` checks files with oxfmt
- `jest` runs jest tests
- `jest:watch` starts jest watch
- `test` runs `jest`, `prettier:check`, `lint` and `typecheck` scripts
- `test` runs `jest`, `format:test`, `lint` and `typecheck` scripts
### Other scripts
- `storybook` starts storybook dev server
- `storybook:build` build production storybook bundle to `storybook-static`
- `prettier:write` formats all files with Prettier
- `format:write` formats all files with oxfmt
+4 -5
View File
@@ -13,9 +13,9 @@
"stylelint": "stylelint '**/*.css' --cache",
"jest": "jest",
"jest:watch": "jest --watch",
"prettier:check": "prettier --check \"**/*.{ts,tsx}\"",
"prettier:write": "prettier --write \"**/*.{ts,tsx}\"",
"test": "npx next typegen && npm run prettier:check && npm run lint && npm run typecheck && npm run jest",
"format:test": "oxfmt --check \"**/*.{ts,tsx,css}\"",
"format:write": "oxfmt --write \"**/*.{ts,tsx,css}\"",
"test": "npx next typegen && npm run format:test && npm run lint && npm run typecheck && npm run jest",
"storybook": "storybook dev -p 6006",
"storybook:build": "storybook build"
},
@@ -32,7 +32,6 @@
"@babel/core": "^7.28.4",
"@eslint/eslintrc": "^3",
"@eslint/js": "^9.37.0",
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
"@storybook/addon-themes": "^10.0.0",
"@storybook/nextjs": "^10.0.0",
"@storybook/react": "^10.0.0",
@@ -52,10 +51,10 @@
"eslint-plugin-react": "^7.37.5",
"jest": "^30.2.0",
"jest-environment-jsdom": "^30.2.0",
"oxfmt": "^0.42.0",
"postcss": "^8.5.6",
"postcss-preset-mantine": "1.18.0",
"postcss-simple-vars": "^7.0.1",
"prettier": "^3.6.2",
"storybook": "^10.0.0",
"stylelint": "^17.0.0",
"stylelint-config-standard-scss": "^17.0.0",
+210 -133
View File
@@ -52,17 +52,6 @@ __metadata:
languageName: node
linkType: hard
"@babel/code-frame@npm:^7.25.9, @babel/code-frame@npm:^7.26.2":
version: 7.26.2
resolution: "@babel/code-frame@npm:7.26.2"
dependencies:
"@babel/helper-validator-identifier": "npm:^7.25.9"
js-tokens: "npm:^4.0.0"
picocolors: "npm:^1.0.0"
checksum: 10c0/7d79621a6849183c415486af99b1a20b84737e8c11cd55b6544f688c51ce1fd710e6d869c3dd21232023da272a79b91efb3e83b5bc2dc65c1187c5fcd1b72ea8
languageName: node
linkType: hard
"@babel/code-frame@npm:^7.27.1":
version: 7.27.1
resolution: "@babel/code-frame@npm:7.27.1"
@@ -138,19 +127,6 @@ __metadata:
languageName: node
linkType: hard
"@babel/generator@npm:^7.26.2, @babel/generator@npm:^7.26.5":
version: 7.26.5
resolution: "@babel/generator@npm:7.26.5"
dependencies:
"@babel/parser": "npm:^7.26.5"
"@babel/types": "npm:^7.26.5"
"@jridgewell/gen-mapping": "npm:^0.3.5"
"@jridgewell/trace-mapping": "npm:^0.3.25"
jsesc: "npm:^3.0.2"
checksum: 10c0/3be79e0aa03f38858a465d12ee2e468320b9122dc44fc85984713e32f16f4d77ce34a16a1a9505972782590e0b8d847b6f373621f9c6fafa1906d90f31416cb0
languageName: node
linkType: hard
"@babel/generator@npm:^7.27.5":
version: 7.27.5
resolution: "@babel/generator@npm:7.27.5"
@@ -447,13 +423,6 @@ __metadata:
languageName: node
linkType: hard
"@babel/helper-string-parser@npm:^7.25.9":
version: 7.25.9
resolution: "@babel/helper-string-parser@npm:7.25.9"
checksum: 10c0/7244b45d8e65f6b4338a6a68a8556f2cb161b782343e97281a5f2b9b93e420cad0d9f5773a59d79f61d0c448913d06f6a2358a87f2e203cf112e3c5b53522ee6
languageName: node
linkType: hard
"@babel/helper-string-parser@npm:^7.27.1":
version: 7.27.1
resolution: "@babel/helper-string-parser@npm:7.27.1"
@@ -468,13 +437,6 @@ __metadata:
languageName: node
linkType: hard
"@babel/helper-validator-identifier@npm:^7.25.9":
version: 7.25.9
resolution: "@babel/helper-validator-identifier@npm:7.25.9"
checksum: 10c0/4fc6f830177b7b7e887ad3277ddb3b91d81e6c4a24151540d9d1023e8dc6b1c0505f0f0628ae653601eb4388a8db45c1c14b2c07a9173837aef7e4116456259d
languageName: node
linkType: hard
"@babel/helper-validator-identifier@npm:^7.27.1":
version: 7.27.1
resolution: "@babel/helper-validator-identifier@npm:7.27.1"
@@ -579,17 +541,6 @@ __metadata:
languageName: node
linkType: hard
"@babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.2, @babel/parser@npm:^7.26.5":
version: 7.26.5
resolution: "@babel/parser@npm:7.26.5"
dependencies:
"@babel/types": "npm:^7.26.5"
bin:
parser: ./bin/babel-parser.js
checksum: 10c0/2e77dd99ee028ee3c10fa03517ae1169f2432751adf71315e4dc0d90b61639d51760d622f418f6ac665ae4ea65f8485232a112ea0e76f18e5900225d3d19a61e
languageName: node
linkType: hard
"@babel/parser@npm:^7.28.6":
version: 7.28.6
resolution: "@babel/parser@npm:7.28.6"
@@ -1773,17 +1724,6 @@ __metadata:
languageName: node
linkType: hard
"@babel/template@npm:^7.25.9":
version: 7.25.9
resolution: "@babel/template@npm:7.25.9"
dependencies:
"@babel/code-frame": "npm:^7.25.9"
"@babel/parser": "npm:^7.25.9"
"@babel/types": "npm:^7.25.9"
checksum: 10c0/ebe677273f96a36c92cc15b7aa7b11cc8bc8a3bb7a01d55b2125baca8f19cae94ff3ce15f1b1880fb8437f3a690d9f89d4e91f16fc1dc4d3eb66226d128983ab
languageName: node
linkType: hard
"@babel/template@npm:^7.27.2":
version: 7.27.2
resolution: "@babel/template@npm:7.27.2"
@@ -1824,21 +1764,6 @@ __metadata:
languageName: node
linkType: hard
"@babel/traverse@npm:^7.25.9":
version: 7.26.5
resolution: "@babel/traverse@npm:7.26.5"
dependencies:
"@babel/code-frame": "npm:^7.26.2"
"@babel/generator": "npm:^7.26.5"
"@babel/parser": "npm:^7.26.5"
"@babel/template": "npm:^7.25.9"
"@babel/types": "npm:^7.26.5"
debug: "npm:^4.3.1"
globals: "npm:^11.1.0"
checksum: 10c0/0779059ecf63e31446564cf31adf170e701e8017ef02c819c57924a9a83d6b2ce41dbff3ef295589da9410497a3e575655bb8084ca470e0ab1bc193128afa9fe
languageName: node
linkType: hard
"@babel/traverse@npm:^7.27.1, @babel/traverse@npm:^7.28.5, @babel/traverse@npm:^7.28.6":
version: 7.28.6
resolution: "@babel/traverse@npm:7.28.6"
@@ -1906,16 +1831,6 @@ __metadata:
languageName: node
linkType: hard
"@babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0, @babel/types@npm:^7.26.5":
version: 7.26.5
resolution: "@babel/types@npm:7.26.5"
dependencies:
"@babel/helper-string-parser": "npm:^7.25.9"
"@babel/helper-validator-identifier": "npm:^7.25.9"
checksum: 10c0/0278053b69d7c2b8573aa36dc5242cad95f0d965e1c0ed21ccacac6330092e59ba5949753448f6d6eccf6ad59baaef270295cc05218352e060ea8c68388638c4
languageName: node
linkType: hard
"@babel/types@npm:^7.27.1, @babel/types@npm:^7.27.3":
version: 7.27.6
resolution: "@babel/types@npm:7.27.6"
@@ -2529,34 +2444,6 @@ __metadata:
languageName: node
linkType: hard
"@ianvs/prettier-plugin-sort-imports@npm:^4.7.0":
version: 4.7.1
resolution: "@ianvs/prettier-plugin-sort-imports@npm:4.7.1"
dependencies:
"@babel/generator": "npm:^7.26.2"
"@babel/parser": "npm:^7.26.2"
"@babel/traverse": "npm:^7.25.9"
"@babel/types": "npm:^7.26.0"
semver: "npm:^7.5.2"
peerDependencies:
"@prettier/plugin-oxc": ^0.0.4 || ^0.1.0
"@vue/compiler-sfc": 2.7.x || 3.x
content-tag: ^4.0.0
prettier: 2 || 3 || ^4.0.0-0
prettier-plugin-ember-template-tag: ^2.1.0
peerDependenciesMeta:
"@prettier/plugin-oxc":
optional: true
"@vue/compiler-sfc":
optional: true
content-tag:
optional: true
prettier-plugin-ember-template-tag:
optional: true
checksum: 10c0/cda335ef13b4f95825c7667a4962bd679c0065863572f9d3bd715f2d2a463e56e93808dc7b5c24ecca33d63ddf2159780cfdb3d78f30c828b6efb054972dfc5b
languageName: node
linkType: hard
"@img/colour@npm:^1.0.0":
version: 1.0.0
resolution: "@img/colour@npm:1.0.0"
@@ -3445,6 +3332,139 @@ __metadata:
languageName: node
linkType: hard
"@oxfmt/binding-android-arm-eabi@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-android-arm-eabi@npm:0.42.0"
conditions: os=android & cpu=arm
languageName: node
linkType: hard
"@oxfmt/binding-android-arm64@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-android-arm64@npm:0.42.0"
conditions: os=android & cpu=arm64
languageName: node
linkType: hard
"@oxfmt/binding-darwin-arm64@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-darwin-arm64@npm:0.42.0"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
"@oxfmt/binding-darwin-x64@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-darwin-x64@npm:0.42.0"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
"@oxfmt/binding-freebsd-x64@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-freebsd-x64@npm:0.42.0"
conditions: os=freebsd & cpu=x64
languageName: node
linkType: hard
"@oxfmt/binding-linux-arm-gnueabihf@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-linux-arm-gnueabihf@npm:0.42.0"
conditions: os=linux & cpu=arm
languageName: node
linkType: hard
"@oxfmt/binding-linux-arm-musleabihf@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-linux-arm-musleabihf@npm:0.42.0"
conditions: os=linux & cpu=arm
languageName: node
linkType: hard
"@oxfmt/binding-linux-arm64-gnu@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-linux-arm64-gnu@npm:0.42.0"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
"@oxfmt/binding-linux-arm64-musl@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-linux-arm64-musl@npm:0.42.0"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
"@oxfmt/binding-linux-ppc64-gnu@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-linux-ppc64-gnu@npm:0.42.0"
conditions: os=linux & cpu=ppc64 & libc=glibc
languageName: node
linkType: hard
"@oxfmt/binding-linux-riscv64-gnu@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-linux-riscv64-gnu@npm:0.42.0"
conditions: os=linux & cpu=riscv64 & libc=glibc
languageName: node
linkType: hard
"@oxfmt/binding-linux-riscv64-musl@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-linux-riscv64-musl@npm:0.42.0"
conditions: os=linux & cpu=riscv64 & libc=musl
languageName: node
linkType: hard
"@oxfmt/binding-linux-s390x-gnu@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-linux-s390x-gnu@npm:0.42.0"
conditions: os=linux & cpu=s390x & libc=glibc
languageName: node
linkType: hard
"@oxfmt/binding-linux-x64-gnu@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-linux-x64-gnu@npm:0.42.0"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
"@oxfmt/binding-linux-x64-musl@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-linux-x64-musl@npm:0.42.0"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
"@oxfmt/binding-openharmony-arm64@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-openharmony-arm64@npm:0.42.0"
conditions: os=openharmony & cpu=arm64
languageName: node
linkType: hard
"@oxfmt/binding-win32-arm64-msvc@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-win32-arm64-msvc@npm:0.42.0"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
"@oxfmt/binding-win32-ia32-msvc@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-win32-ia32-msvc@npm:0.42.0"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard
"@oxfmt/binding-win32-x64-msvc@npm:0.42.0":
version: 0.42.0
resolution: "@oxfmt/binding-win32-x64-msvc@npm:0.42.0"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
"@pkgjs/parseargs@npm:^0.11.0":
version: 0.11.0
resolution: "@pkgjs/parseargs@npm:0.11.0"
@@ -10928,7 +10948,6 @@ __metadata:
"@babel/core": "npm:^7.28.4"
"@eslint/eslintrc": "npm:^3"
"@eslint/js": "npm:^9.37.0"
"@ianvs/prettier-plugin-sort-imports": "npm:^4.7.0"
"@mantine/core": "npm:8.3.18"
"@mantine/hooks": "npm:8.3.18"
"@next/bundle-analyzer": "npm:^16.0.0"
@@ -10953,10 +10972,10 @@ __metadata:
jest: "npm:^30.2.0"
jest-environment-jsdom: "npm:^30.2.0"
next: "npm:16.2.1"
oxfmt: "npm:^0.42.0"
postcss: "npm:^8.5.6"
postcss-preset-mantine: "npm:1.18.0"
postcss-simple-vars: "npm:^7.0.1"
prettier: "npm:^3.6.2"
react: "npm:19.2.4"
react-dom: "npm:19.2.4"
storybook: "npm:^10.0.0"
@@ -11786,6 +11805,75 @@ __metadata:
languageName: node
linkType: hard
"oxfmt@npm:^0.42.0":
version: 0.42.0
resolution: "oxfmt@npm:0.42.0"
dependencies:
"@oxfmt/binding-android-arm-eabi": "npm:0.42.0"
"@oxfmt/binding-android-arm64": "npm:0.42.0"
"@oxfmt/binding-darwin-arm64": "npm:0.42.0"
"@oxfmt/binding-darwin-x64": "npm:0.42.0"
"@oxfmt/binding-freebsd-x64": "npm:0.42.0"
"@oxfmt/binding-linux-arm-gnueabihf": "npm:0.42.0"
"@oxfmt/binding-linux-arm-musleabihf": "npm:0.42.0"
"@oxfmt/binding-linux-arm64-gnu": "npm:0.42.0"
"@oxfmt/binding-linux-arm64-musl": "npm:0.42.0"
"@oxfmt/binding-linux-ppc64-gnu": "npm:0.42.0"
"@oxfmt/binding-linux-riscv64-gnu": "npm:0.42.0"
"@oxfmt/binding-linux-riscv64-musl": "npm:0.42.0"
"@oxfmt/binding-linux-s390x-gnu": "npm:0.42.0"
"@oxfmt/binding-linux-x64-gnu": "npm:0.42.0"
"@oxfmt/binding-linux-x64-musl": "npm:0.42.0"
"@oxfmt/binding-openharmony-arm64": "npm:0.42.0"
"@oxfmt/binding-win32-arm64-msvc": "npm:0.42.0"
"@oxfmt/binding-win32-ia32-msvc": "npm:0.42.0"
"@oxfmt/binding-win32-x64-msvc": "npm:0.42.0"
tinypool: "npm:2.1.0"
dependenciesMeta:
"@oxfmt/binding-android-arm-eabi":
optional: true
"@oxfmt/binding-android-arm64":
optional: true
"@oxfmt/binding-darwin-arm64":
optional: true
"@oxfmt/binding-darwin-x64":
optional: true
"@oxfmt/binding-freebsd-x64":
optional: true
"@oxfmt/binding-linux-arm-gnueabihf":
optional: true
"@oxfmt/binding-linux-arm-musleabihf":
optional: true
"@oxfmt/binding-linux-arm64-gnu":
optional: true
"@oxfmt/binding-linux-arm64-musl":
optional: true
"@oxfmt/binding-linux-ppc64-gnu":
optional: true
"@oxfmt/binding-linux-riscv64-gnu":
optional: true
"@oxfmt/binding-linux-riscv64-musl":
optional: true
"@oxfmt/binding-linux-s390x-gnu":
optional: true
"@oxfmt/binding-linux-x64-gnu":
optional: true
"@oxfmt/binding-linux-x64-musl":
optional: true
"@oxfmt/binding-openharmony-arm64":
optional: true
"@oxfmt/binding-win32-arm64-msvc":
optional: true
"@oxfmt/binding-win32-ia32-msvc":
optional: true
"@oxfmt/binding-win32-x64-msvc":
optional: true
bin:
oxfmt: bin/oxfmt
checksum: 10c0/0fe0e0d1f2330b66a3e3df2dfeb013493831d7312a9c66f51a2a0814dfb2468f9d6cfd3a58d763dfd4a004db14baa157ada9645205b350af799c665f67d271d5
languageName: node
linkType: hard
"p-limit@npm:^2.2.0":
version: 2.3.0
resolution: "p-limit@npm:2.3.0"
@@ -12350,15 +12438,6 @@ __metadata:
languageName: node
linkType: hard
"prettier@npm:^3.6.2":
version: 3.8.1
resolution: "prettier@npm:3.8.1"
bin:
prettier: bin/prettier.cjs
checksum: 10c0/33169b594009e48f570471271be7eac7cdcf88a209eed39ac3b8d6d78984039bfa9132f82b7e6ba3b06711f3bfe0222a62a1bfb87c43f50c25a83df1b78a2c42
languageName: node
linkType: hard
"pretty-error@npm:^4.0.0":
version: 4.0.0
resolution: "pretty-error@npm:4.0.0"
@@ -13335,15 +13414,6 @@ __metadata:
languageName: node
linkType: hard
"semver@npm:^7.5.2":
version: 7.6.3
resolution: "semver@npm:7.6.3"
bin:
semver: bin/semver.js
checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf
languageName: node
linkType: hard
"semver@npm:^7.7.1, semver@npm:^7.7.2":
version: 7.7.2
resolution: "semver@npm:7.7.2"
@@ -14474,6 +14544,13 @@ __metadata:
languageName: node
linkType: hard
"tinypool@npm:2.1.0":
version: 2.1.0
resolution: "tinypool@npm:2.1.0"
checksum: 10c0/9fb1c760558c6264e0f4cfde96a63b12450b43f1730fbe6274aa24ddbdf488745c08924d0dea7a1303b47d555416a6415f2113898c69b6ecf731e75ac95238a5
languageName: node
linkType: hard
"tinyrainbow@npm:^2.0.0":
version: 2.0.0
resolution: "tinyrainbow@npm:2.0.0"