Initial commit
This commit is contained in:
32
tooling/prettier/index.mjs
Normal file
32
tooling/prettier/index.mjs
Normal file
@@ -0,0 +1,32 @@
|
||||
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 = {
|
||||
plugins: [
|
||||
"@ianvs/prettier-plugin-sort-imports",
|
||||
"prettier-plugin-tailwindcss",
|
||||
],
|
||||
tailwindConfig: fileURLToPath(
|
||||
new URL("../../tooling/tailwind/index.ts", import.meta.url),
|
||||
),
|
||||
importOrder: [
|
||||
"^(react/(.*)$)|^(react$)|^(react-native(.*)$)",
|
||||
"^(next/(.*)$)|^(next$)",
|
||||
"^(expo(.*)$)|^(expo$)",
|
||||
"<THIRD_PARTY_MODULES>",
|
||||
"",
|
||||
"^@acme/(.*)$",
|
||||
"",
|
||||
"^~/",
|
||||
"^[../]",
|
||||
"^[./]",
|
||||
],
|
||||
importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"],
|
||||
importOrderTypeScriptVersion: "4.4.0",
|
||||
};
|
||||
|
||||
export default config;
|
||||
21
tooling/prettier/package.json
Normal file
21
tooling/prettier/package.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "@acme/prettier-config",
|
||||
"private": true,
|
||||
"version": "0.1.0",
|
||||
"main": "index.mjs",
|
||||
"scripts": {
|
||||
"clean": "rm -rf .turbo node_modules",
|
||||
"format": "prettier --check . --ignore-path ../../.gitignore",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ianvs/prettier-plugin-sort-imports": "^4.1.1",
|
||||
"prettier": "^3.1.0",
|
||||
"prettier-plugin-tailwindcss": "^0.5.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@acme/tsconfig": "workspace:^0.1.0",
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"prettier": "@acme/prettier-config"
|
||||
}
|
||||
8
tooling/prettier/tsconfig.json
Normal file
8
tooling/prettier/tsconfig.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "@acme/tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
|
||||
},
|
||||
"include": ["."],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user