first commit
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
/** @typedef {import("prettier").Config} PrettierConfig */
|
||||
/** @typedef {import("prettier-plugin-tailwindcss").PluginOptions} TailwindConfig */
|
||||
/** @typedef {import("@ianvs/prettier-plugin-sort-imports").PluginConfig} SortImportsConfig */
|
||||
|
||||
/** @type { PrettierConfig | SortImportsConfig | TailwindConfig } */
|
||||
const config = {
|
||||
singleQuote: true,
|
||||
trailingComma: 'all',
|
||||
experimentalTernaries: true,
|
||||
endOfLine: 'auto',
|
||||
tabWidth: 2,
|
||||
useTabs: false,
|
||||
plugins: [
|
||||
'@ianvs/prettier-plugin-sort-imports',
|
||||
'prettier-plugin-tailwindcss',
|
||||
],
|
||||
tailwindConfig: fileURLToPath(
|
||||
new URL('../../packages/ufb-tailwindcss/index.js', import.meta.url),
|
||||
),
|
||||
tailwindFunctions: ['cn', 'cva'],
|
||||
importOrder: [
|
||||
'^(react/(.*)$)|^(react$)',
|
||||
'^(next/(.*)$)|^(next$)',
|
||||
'<THIRD_PARTY_MODULES>',
|
||||
'',
|
||||
'^@ufb/(.*)$',
|
||||
'',
|
||||
'^(@/shared/(.*))$|^(@/shared$)',
|
||||
'^(@/entities/(.*)$)|^(@/entities$)',
|
||||
'^(@/features/(.*)$)|^(@/features$)',
|
||||
'^(@/widgets/(.*)$)|^(@/widgets$)',
|
||||
'',
|
||||
'^@/',
|
||||
'^[../]',
|
||||
'^[./]',
|
||||
],
|
||||
importOrderParserPlugins: ['typescript', 'jsx', 'decorators-legacy'],
|
||||
importOrderTypeScriptVersion: '4.4.0',
|
||||
};
|
||||
|
||||
export default config;
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "@ufb/prettier-config",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./index.js"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "git clean -xdf .cache .turbo node_modules",
|
||||
"format": "prettier --check . --ignore-path ../../.gitignore",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ianvs/prettier-plugin-sort-imports": "^4.7.1",
|
||||
"prettier": "catalog:",
|
||||
"prettier-plugin-tailwindcss": "^0.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "24.12.0",
|
||||
"@ufb/tsconfig": "workspace:*",
|
||||
"typescript": "catalog:"
|
||||
},
|
||||
"prettier": "@ufb/prettier-config"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"extends": "@ufb/tsconfig/base.json",
|
||||
"include": ["."],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user