@2digits/prettier-config 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var constants=require('@2digits/constants'),localPkg=require('local-pkg');var e=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(p,n)=>(typeof require<"u"?require:p)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var i={typescript:"5.
|
|
1
|
+
'use strict';var constants=require('@2digits/constants'),localPkg=require('local-pkg');var e=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(p,n)=>(typeof require<"u"?require:p)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var i={typescript:"5.8.2"};var l=/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/,g=i.typescript.replace(l,"");function r(){return localPkg.getPackageInfoSync("typescript")?.version??g}var O={printWidth:120,trailingComma:"all",bracketSameLine:true,singleQuote:true,experimentalOperatorPosition:"start",importOrder:["<BUILTIN_MODULES>","","^(react/(.*)$)|^(react$)","^(react-native/(.*)$)|^(react-native$)","","^(next/(.*)$)|^(next$)","","^(expo/(.*)$)|^(expo$)|^(expo-(.*)$)|^(@expo/(.*)$)","","<THIRD_PARTY_MODULES>","","^@2digits/","^@mod/","","^@/","^(@[A-Z](.*))","",".json$","","^[./]"],importOrderTypeScriptVersion:r(),tailwindFunctions:constants.tailwindFunctions,language:"sqlite",keywordCase:"upper",experimentalWasm:true,indent:2,allowedBlankLines:1,indentEntries:true,plugins:[e.resolve("@prettier/plugin-xml"),e.resolve("@ianvs/prettier-plugin-sort-imports"),e.resolve("prettier-plugin-toml"),e.resolve("prettier-plugin-jsdoc"),e.resolve("prettier-plugin-sql"),e.resolve("prettier-plugin-sh"),e.resolve("prettier-plugin-embed"),e.resolve("prettier-plugin-tailwindcss")],overrides:[{files:["pnpm-lock.yaml"],options:{requirePragma:true}}]};module.exports=O;//# sourceMappingURL=index.cjs.map
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../package.json","../src/utils.ts"],"names":["devDependencies","semverRegex","localTypescriptVersion","getTypescriptVersion","getPackageInfoSync","index_default","tailwindFunctions","__require"],"mappings":"uFAAA,IAAA,CAAA,CAAA,CAAA,CAAA,EAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,CAAA,OAAA,KAAA,CAAA,GAAA,CAAA,IAAA,KAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,SAAA,CAAA,CAAA,CAAA,GAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,OAAA,CAAA,KAAA,CAAA,IAAA,CAAA,SAAA,CAAA,CAAA,MAAA,KAAA,CAAA,sBAAA,CAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,CAAA,CCmDE,IAAAA,CAAAA,CAAmB,CAKjB,UAAc,CAAA,OAChB,CC9CF,CAAA,IAAMC,EAAc,kDACdC,CAAAA,CAAAA,CAAyBF,CAAgB,CAAA,UAAA,CAAW,OAAQC,CAAAA,CAAAA,CAAa,EAAE,CAAA,CA2B1E,SAASE,CAA+B,EAAA,CAG7C,OAFWC,2BAAAA,CAAmB,YAAY,CAAA,EAE/B,OAAWF,EAAAA,CACxB,CFvCOG,IAAAA,CAAAA,CAAqB,CAC1B,UAAA,CAAY,GACZ,CAAA,aAAA,CAAe,KACf,CAAA,eAAA,CAAiB,KACjB,WAAa,CAAA,IAAA,CACb,4BAA8B,CAAA,OAAA,CAE9B,WAAa,CAAA,CACX,mBACA,CAAA,EAAA,CACA,2BACA,wCACA,CAAA,EAAA,CACA,wBACA,CAAA,EAAA,CACA,sDACA,EACA,CAAA,uBAAA,CACA,EACA,CAAA,YAAA,CACA,SACA,EACA,CAAA,KAAA,CACA,eACA,CAAA,EAAA,CACA,QACA,CAAA,EAAA,CACA,OACF,CAAA,CACA,6BAA8BF,CAAqB,EAAA,CAEnD,iBAAAG,CAAAA,2BAAAA,CAEA,QAAU,CAAA,QAAA,CACV,WAAa,CAAA,OAAA,CAEb,iBAAkB,IAClB,CAAA,MAAA,CAAQ,CAER,CAAA,iBAAA,CAAmB,CACnB,CAAA,aAAA,CAAe,IAEf,CAAA,OAAA,CAAS,CACPC,CAAQ,CAAA,OAAA,CAAQ,sBAAsB,CAAA,CACtCA,CAAQ,CAAA,OAAA,CAAQ,qCAAqC,CAAA,CACrDA,EAAQ,OAAQ,CAAA,sBAAsB,CACtCA,CAAAA,CAAAA,CAAQ,OAAQ,CAAA,uBAAuB,CACvCA,CAAAA,CAAAA,CAAQ,QAAQ,qBAAqB,CAAA,CACrCA,CAAQ,CAAA,OAAA,CAAQ,oBAAoB,CAAA,CACpCA,CAAQ,CAAA,OAAA,CAAQ,uBAAuB,CACvCA,CAAAA,CAAAA,CAAQ,OAAQ,CAAA,6BAA6B,CAC/C,CAAA,CAEA,SAAW,CAAA,CACT,CACE,KAAO,CAAA,CAAC,gBAAgB,CAAA,CACxB,QAAS,CACP,aAAA,CAAe,IACjB,CACF,CACF,CACF","file":"index.cjs","sourcesContent":["import { tailwindFunctions } from '@2digits/constants';\n\nimport { defineConfig, getTypescriptVersion } from './utils';\n\nexport default defineConfig({\n printWidth: 120,\n trailingComma: 'all',\n bracketSameLine: true,\n singleQuote: true,\n experimentalOperatorPosition: 'start',\n\n importOrder: [\n '<BUILTIN_MODULES>',\n '',\n '^(react/(.*)$)|^(react$)',\n '^(react-native/(.*)$)|^(react-native$)',\n '',\n '^(next/(.*)$)|^(next$)',\n '',\n '^(expo/(.*)$)|^(expo$)|^(expo-(.*)$)|^(@expo/(.*)$)',\n '',\n '<THIRD_PARTY_MODULES>',\n '',\n '^@2digits/',\n '^@mod/',\n '',\n '^@/',\n '^(@[A-Z](.*))',\n '',\n '.json$',\n '',\n '^[./]',\n ],\n importOrderTypeScriptVersion: getTypescriptVersion(),\n\n tailwindFunctions,\n\n language: 'sqlite',\n keywordCase: 'upper',\n\n experimentalWasm: true,\n indent: 2,\n\n allowedBlankLines: 1,\n indentEntries: true,\n\n plugins: [\n require.resolve('@prettier/plugin-xml'),\n require.resolve('@ianvs/prettier-plugin-sort-imports'),\n require.resolve('prettier-plugin-toml'),\n require.resolve('prettier-plugin-jsdoc'),\n require.resolve('prettier-plugin-sql'),\n require.resolve('prettier-plugin-sh'),\n require.resolve('prettier-plugin-embed'),\n require.resolve('prettier-plugin-tailwindcss'),\n ],\n\n overrides: [\n {\n files: ['pnpm-lock.yaml'],\n options: {\n requirePragma: true,\n },\n },\n ],\n});\n","{\n \"name\": \"@2digits/prettier-config\",\n \"version\": \"3.0.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../package.json","../src/utils.ts"],"names":["devDependencies","semverRegex","localTypescriptVersion","getTypescriptVersion","getPackageInfoSync","index_default","tailwindFunctions","__require"],"mappings":"uFAAA,IAAA,CAAA,CAAA,CAAA,CAAA,EAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,CAAA,OAAA,KAAA,CAAA,GAAA,CAAA,IAAA,KAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,SAAA,CAAA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CA,CAAAA,CAAAA,CAAQ,QAAQ,qBAAqB,CAAA,CACrCA,CAAQ,CAAA,OAAA,CAAQ,oBAAoB,CAAA,CACpCA,CAAQ,CAAA,OAAA,CAAQ,uBAAuB,CACvCA,CAAAA,CAAAA,CAAQ,OAAQ,CAAA,6BAA6B,CAC/C,CAAA,CAEA,SAAW,CAAA,CACT,CACE,KAAO,CAAA,CAAC,gBAAgB,CAAA,CACxB,QAAS,CACP,aAAA,CAAe,IACjB,CACF,CACF,CACF","file":"index.cjs","sourcesContent":["import { tailwindFunctions } from '@2digits/constants';\n\nimport { defineConfig, getTypescriptVersion } from './utils';\n\nexport default defineConfig({\n printWidth: 120,\n trailingComma: 'all',\n bracketSameLine: true,\n singleQuote: true,\n experimentalOperatorPosition: 'start',\n\n importOrder: [\n '<BUILTIN_MODULES>',\n '',\n '^(react/(.*)$)|^(react$)',\n '^(react-native/(.*)$)|^(react-native$)',\n '',\n '^(next/(.*)$)|^(next$)',\n '',\n '^(expo/(.*)$)|^(expo$)|^(expo-(.*)$)|^(@expo/(.*)$)',\n '',\n '<THIRD_PARTY_MODULES>',\n '',\n '^@2digits/',\n '^@mod/',\n '',\n '^@/',\n '^(@[A-Z](.*))',\n '',\n '.json$',\n '',\n '^[./]',\n ],\n importOrderTypeScriptVersion: getTypescriptVersion(),\n\n tailwindFunctions,\n\n language: 'sqlite',\n keywordCase: 'upper',\n\n experimentalWasm: true,\n indent: 2,\n\n allowedBlankLines: 1,\n indentEntries: true,\n\n plugins: [\n require.resolve('@prettier/plugin-xml'),\n require.resolve('@ianvs/prettier-plugin-sort-imports'),\n require.resolve('prettier-plugin-toml'),\n require.resolve('prettier-plugin-jsdoc'),\n require.resolve('prettier-plugin-sql'),\n require.resolve('prettier-plugin-sh'),\n require.resolve('prettier-plugin-embed'),\n require.resolve('prettier-plugin-tailwindcss'),\n ],\n\n overrides: [\n {\n files: ['pnpm-lock.yaml'],\n options: {\n requirePragma: true,\n },\n },\n ],\n});\n","{\n \"name\": \"@2digits/prettier-config\",\n \"version\": \"3.0.2\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/2digits-agency/configs.git\",\n \"directory\": \"packages/prettier-config\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"files\": [\n \"dist\"\n ],\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"import\": {\n \"types\": \"./dist/index.d.ts\",\n \"default\": \"./dist/index.js\"\n },\n \"require\": {\n \"types\": \"./dist/index.d.cts\",\n \"default\": \"./dist/index.cjs\"\n }\n }\n },\n \"sideEffects\": false,\n \"scripts\": {\n \"build\": \"tsup\",\n \"dev\": \"tsup --watch\",\n \"lint\": \"eslint .\",\n \"types\": \"tsc --noEmit\"\n },\n \"keywords\": [\n \"prettier-config\"\n ],\n \"license\": \"MIT\",\n \"public\": true,\n \"dependencies\": {\n \"@2digits/constants\": \"workspace:*\",\n \"@ianvs/prettier-plugin-sort-imports\": \"4.4.1\",\n \"@prettier/plugin-xml\": \"3.4.1\",\n \"local-pkg\": \"1.1.0\",\n \"prettier-plugin-embed\": \"0.5.0\",\n \"prettier-plugin-jsdoc\": \"1.3.2\",\n \"prettier-plugin-sh\": \"0.15.0\",\n \"prettier-plugin-sql\": \"0.18.1\",\n \"prettier-plugin-tailwindcss\": \"0.6.11\",\n \"prettier-plugin-toml\": \"2.0.2\"\n },\n \"devDependencies\": {\n \"@2digits/tsconfig\": \"workspace:*\",\n \"eslint\": \"9.21.0\",\n \"prettier\": \"3.5.2\",\n \"tsup\": \"8.4.0\",\n \"typescript\": \"5.8.2\"\n },\n \"peerDependencies\": {\n \"prettier\": \">=3.0.0\"\n }\n}\n","import type { PrettierConfig as ImportOrderConfig } from '@ianvs/prettier-plugin-sort-imports';\nimport { getPackageInfoSync } from 'local-pkg';\nimport type { Options } from 'prettier';\nimport type { PluginEmbedOptions } from 'prettier-plugin-embed';\nimport type { ShParserOptions } from 'prettier-plugin-sh';\nimport type { SqlFormatOptions } from 'prettier-plugin-sql';\nimport type { PluginOptions } from 'prettier-plugin-tailwindcss';\nimport type { PrettierTaploOptions } from 'prettier-plugin-toml';\n\nimport { devDependencies } from '../package.json';\n\nconst semverRegex = /^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)$/;\nconst localTypescriptVersion = devDependencies.typescript.replace(semverRegex, '');\n\ntype PrettierConfigWithPlugins = Options\n & ImportOrderConfig\n & PluginOptions\n & SqlFormatOptions\n & PrettierTaploOptions\n & PluginEmbedOptions\n & Partial<ShParserOptions>;\n\n/**\n * Define a Prettier configuration with plugins.\n *\n * @template TConfig The Prettier configuration with plugins.\n * @param config The Prettier configuration with plugins.\n * @returns The Prettier configuration with plugins.\n */\nexport function defineConfig<TConfig extends PrettierConfigWithPlugins>(config: TConfig): TConfig {\n return config;\n}\n\n/**\n * Get the version of the locally installed TypeScript.\n *\n * @returns The local TypeScript version, or the version specified in this [package.json](../package.json) file if\n * TypeScript is not installed locally.\n */\nexport function getTypescriptVersion(): string {\n const ts = getPackageInfoSync('typescript');\n\n return ts?.version ?? localTypescriptVersion;\n}\n"]}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {tailwindFunctions}from'@2digits/constants';import {getPackageInfoSync}from'local-pkg';var e=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(p,n)=>(typeof require<"u"?require:p)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var i={typescript:"5.
|
|
1
|
+
import {tailwindFunctions}from'@2digits/constants';import {getPackageInfoSync}from'local-pkg';var e=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(p,n)=>(typeof require<"u"?require:p)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var i={typescript:"5.8.2"};var l=/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/,g=i.typescript.replace(l,"");function r(){return getPackageInfoSync("typescript")?.version??g}var O={printWidth:120,trailingComma:"all",bracketSameLine:true,singleQuote:true,experimentalOperatorPosition:"start",importOrder:["<BUILTIN_MODULES>","","^(react/(.*)$)|^(react$)","^(react-native/(.*)$)|^(react-native$)","","^(next/(.*)$)|^(next$)","","^(expo/(.*)$)|^(expo$)|^(expo-(.*)$)|^(@expo/(.*)$)","","<THIRD_PARTY_MODULES>","","^@2digits/","^@mod/","","^@/","^(@[A-Z](.*))","",".json$","","^[./]"],importOrderTypeScriptVersion:r(),tailwindFunctions:tailwindFunctions,language:"sqlite",keywordCase:"upper",experimentalWasm:true,indent:2,allowedBlankLines:1,indentEntries:true,plugins:[e.resolve("@prettier/plugin-xml"),e.resolve("@ianvs/prettier-plugin-sort-imports"),e.resolve("prettier-plugin-toml"),e.resolve("prettier-plugin-jsdoc"),e.resolve("prettier-plugin-sql"),e.resolve("prettier-plugin-sh"),e.resolve("prettier-plugin-embed"),e.resolve("prettier-plugin-tailwindcss")],overrides:[{files:["pnpm-lock.yaml"],options:{requirePragma:true}}]};export{O as default};//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../package.json","../src/utils.ts"],"names":["devDependencies","semverRegex","localTypescriptVersion","getTypescriptVersion","getPackageInfoSync","index_default","tailwindFunctions","__require"],"mappings":"8FAAA,IAAA,CAAA,CAAA,CAAA,CAAA,EAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,CAAA,OAAA,KAAA,CAAA,GAAA,CAAA,IAAA,KAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,CAAA,CAAA,EAAA,CAAA,CAAA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A,CAAAA,CAAQ,OAAQ,CAAA,uBAAuB,CACvCA,CAAAA,CAAAA,CAAQ,QAAQ,qBAAqB,CAAA,CACrCA,CAAQ,CAAA,OAAA,CAAQ,oBAAoB,CAAA,CACpCA,CAAQ,CAAA,OAAA,CAAQ,uBAAuB,CACvCA,CAAAA,CAAAA,CAAQ,OAAQ,CAAA,6BAA6B,CAC/C,CAAA,CAEA,SAAW,CAAA,CACT,CACE,KAAO,CAAA,CAAC,gBAAgB,CAAA,CACxB,QAAS,CACP,aAAA,CAAe,IACjB,CACF,CACF,CACF","file":"index.js","sourcesContent":["import { tailwindFunctions } from '@2digits/constants';\n\nimport { defineConfig, getTypescriptVersion } from './utils';\n\nexport default defineConfig({\n printWidth: 120,\n trailingComma: 'all',\n bracketSameLine: true,\n singleQuote: true,\n experimentalOperatorPosition: 'start',\n\n importOrder: [\n '<BUILTIN_MODULES>',\n '',\n '^(react/(.*)$)|^(react$)',\n '^(react-native/(.*)$)|^(react-native$)',\n '',\n '^(next/(.*)$)|^(next$)',\n '',\n '^(expo/(.*)$)|^(expo$)|^(expo-(.*)$)|^(@expo/(.*)$)',\n '',\n '<THIRD_PARTY_MODULES>',\n '',\n '^@2digits/',\n '^@mod/',\n '',\n '^@/',\n '^(@[A-Z](.*))',\n '',\n '.json$',\n '',\n '^[./]',\n ],\n importOrderTypeScriptVersion: getTypescriptVersion(),\n\n tailwindFunctions,\n\n language: 'sqlite',\n keywordCase: 'upper',\n\n experimentalWasm: true,\n indent: 2,\n\n allowedBlankLines: 1,\n indentEntries: true,\n\n plugins: [\n require.resolve('@prettier/plugin-xml'),\n require.resolve('@ianvs/prettier-plugin-sort-imports'),\n require.resolve('prettier-plugin-toml'),\n require.resolve('prettier-plugin-jsdoc'),\n require.resolve('prettier-plugin-sql'),\n require.resolve('prettier-plugin-sh'),\n require.resolve('prettier-plugin-embed'),\n require.resolve('prettier-plugin-tailwindcss'),\n ],\n\n overrides: [\n {\n files: ['pnpm-lock.yaml'],\n options: {\n requirePragma: true,\n },\n },\n ],\n});\n","{\n \"name\": \"@2digits/prettier-config\",\n \"version\": \"3.0.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../package.json","../src/utils.ts"],"names":["devDependencies","semverRegex","localTypescriptVersion","getTypescriptVersion","getPackageInfoSync","index_default","tailwindFunctions","__require"],"mappings":"8FAAA,IAAA,CAAA,CAAA,CAAA,CAAA,EAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,CAAA,OAAA,KAAA,CAAA,GAAA,CAAA,IAAA,KAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,SAAA,CAAA,CAAA,CAAA,GAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,OAAA,CAAA,KAAA,CAAA,IAAA,CAAA,SAAA,CAAA,CAAA,MAAA,KAAA,CAAA,sBAAA,CAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,CAAA,CCmDE,IAAAA,CAAAA,CAAmB,CAKjB,UAAc,CAAA,OAChB,CC9CF,CAAA,IAAMC,EAAc,kDACdC,CAAAA,CAAAA,CAAyBF,CAAgB,CAAA,UAAA,CAAW,OAAQC,CAAAA,CAAAA,CAAa,EAAE,CAAA,CA2B1E,SAASE,CAA+B,EAAA,CAG7C,OAFWC,kBAAAA,CAAmB,YAAY,CAAA,EAE/B,OAAWF,EAAAA,CACxB,CFvCOG,IAAAA,CAAAA,CAAqB,CAC1B,UAAA,CAAY,GACZ,CAAA,aAAA,CAAe,KACf,CAAA,eAAA,CAAiB,KACjB,WAAa,CAAA,IAAA,CACb,4BAA8B,CAAA,OAAA,CAE9B,WAAa,CAAA,CACX,mBACA,CAAA,EAAA,CACA,2BACA,wCACA,CAAA,EAAA,CACA,wBACA,CAAA,EAAA,CACA,sDACA,EACA,CAAA,uBAAA,CACA,EACA,CAAA,YAAA,CACA,SACA,EACA,CAAA,KAAA,CACA,eACA,CAAA,EAAA,CACA,QACA,CAAA,EAAA,CACA,OACF,CAAA,CACA,6BAA8BF,CAAqB,EAAA,CAEnD,iBAAAG,CAAAA,iBAAAA,CAEA,QAAU,CAAA,QAAA,CACV,WAAa,CAAA,OAAA,CAEb,iBAAkB,IAClB,CAAA,MAAA,CAAQ,CAER,CAAA,iBAAA,CAAmB,CACnB,CAAA,aAAA,CAAe,IAEf,CAAA,OAAA,CAAS,CACPC,CAAQ,CAAA,OAAA,CAAQ,sBAAsB,CAAA,CACtCA,CAAQ,CAAA,OAAA,CAAQ,qCAAqC,CAAA,CACrDA,EAAQ,OAAQ,CAAA,sBAAsB,CACtCA,CAAAA,CAAAA,CAAQ,OAAQ,CAAA,uBAAuB,CACvCA,CAAAA,CAAAA,CAAQ,QAAQ,qBAAqB,CAAA,CACrCA,CAAQ,CAAA,OAAA,CAAQ,oBAAoB,CAAA,CACpCA,CAAQ,CAAA,OAAA,CAAQ,uBAAuB,CACvCA,CAAAA,CAAAA,CAAQ,OAAQ,CAAA,6BAA6B,CAC/C,CAAA,CAEA,SAAW,CAAA,CACT,CACE,KAAO,CAAA,CAAC,gBAAgB,CAAA,CACxB,QAAS,CACP,aAAA,CAAe,IACjB,CACF,CACF,CACF","file":"index.js","sourcesContent":["import { tailwindFunctions } from '@2digits/constants';\n\nimport { defineConfig, getTypescriptVersion } from './utils';\n\nexport default defineConfig({\n printWidth: 120,\n trailingComma: 'all',\n bracketSameLine: true,\n singleQuote: true,\n experimentalOperatorPosition: 'start',\n\n importOrder: [\n '<BUILTIN_MODULES>',\n '',\n '^(react/(.*)$)|^(react$)',\n '^(react-native/(.*)$)|^(react-native$)',\n '',\n '^(next/(.*)$)|^(next$)',\n '',\n '^(expo/(.*)$)|^(expo$)|^(expo-(.*)$)|^(@expo/(.*)$)',\n '',\n '<THIRD_PARTY_MODULES>',\n '',\n '^@2digits/',\n '^@mod/',\n '',\n '^@/',\n '^(@[A-Z](.*))',\n '',\n '.json$',\n '',\n '^[./]',\n ],\n importOrderTypeScriptVersion: getTypescriptVersion(),\n\n tailwindFunctions,\n\n language: 'sqlite',\n keywordCase: 'upper',\n\n experimentalWasm: true,\n indent: 2,\n\n allowedBlankLines: 1,\n indentEntries: true,\n\n plugins: [\n require.resolve('@prettier/plugin-xml'),\n require.resolve('@ianvs/prettier-plugin-sort-imports'),\n require.resolve('prettier-plugin-toml'),\n require.resolve('prettier-plugin-jsdoc'),\n require.resolve('prettier-plugin-sql'),\n require.resolve('prettier-plugin-sh'),\n require.resolve('prettier-plugin-embed'),\n require.resolve('prettier-plugin-tailwindcss'),\n ],\n\n overrides: [\n {\n files: ['pnpm-lock.yaml'],\n options: {\n requirePragma: true,\n },\n },\n ],\n});\n","{\n \"name\": \"@2digits/prettier-config\",\n \"version\": \"3.0.2\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/2digits-agency/configs.git\",\n \"directory\": \"packages/prettier-config\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"files\": [\n \"dist\"\n ],\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"import\": {\n \"types\": \"./dist/index.d.ts\",\n \"default\": \"./dist/index.js\"\n },\n \"require\": {\n \"types\": \"./dist/index.d.cts\",\n \"default\": \"./dist/index.cjs\"\n }\n }\n },\n \"sideEffects\": false,\n \"scripts\": {\n \"build\": \"tsup\",\n \"dev\": \"tsup --watch\",\n \"lint\": \"eslint .\",\n \"types\": \"tsc --noEmit\"\n },\n \"keywords\": [\n \"prettier-config\"\n ],\n \"license\": \"MIT\",\n \"public\": true,\n \"dependencies\": {\n \"@2digits/constants\": \"workspace:*\",\n \"@ianvs/prettier-plugin-sort-imports\": \"4.4.1\",\n \"@prettier/plugin-xml\": \"3.4.1\",\n \"local-pkg\": \"1.1.0\",\n \"prettier-plugin-embed\": \"0.5.0\",\n \"prettier-plugin-jsdoc\": \"1.3.2\",\n \"prettier-plugin-sh\": \"0.15.0\",\n \"prettier-plugin-sql\": \"0.18.1\",\n \"prettier-plugin-tailwindcss\": \"0.6.11\",\n \"prettier-plugin-toml\": \"2.0.2\"\n },\n \"devDependencies\": {\n \"@2digits/tsconfig\": \"workspace:*\",\n \"eslint\": \"9.21.0\",\n \"prettier\": \"3.5.2\",\n \"tsup\": \"8.4.0\",\n \"typescript\": \"5.8.2\"\n },\n \"peerDependencies\": {\n \"prettier\": \">=3.0.0\"\n }\n}\n","import type { PrettierConfig as ImportOrderConfig } from '@ianvs/prettier-plugin-sort-imports';\nimport { getPackageInfoSync } from 'local-pkg';\nimport type { Options } from 'prettier';\nimport type { PluginEmbedOptions } from 'prettier-plugin-embed';\nimport type { ShParserOptions } from 'prettier-plugin-sh';\nimport type { SqlFormatOptions } from 'prettier-plugin-sql';\nimport type { PluginOptions } from 'prettier-plugin-tailwindcss';\nimport type { PrettierTaploOptions } from 'prettier-plugin-toml';\n\nimport { devDependencies } from '../package.json';\n\nconst semverRegex = /^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)$/;\nconst localTypescriptVersion = devDependencies.typescript.replace(semverRegex, '');\n\ntype PrettierConfigWithPlugins = Options\n & ImportOrderConfig\n & PluginOptions\n & SqlFormatOptions\n & PrettierTaploOptions\n & PluginEmbedOptions\n & Partial<ShParserOptions>;\n\n/**\n * Define a Prettier configuration with plugins.\n *\n * @template TConfig The Prettier configuration with plugins.\n * @param config The Prettier configuration with plugins.\n * @returns The Prettier configuration with plugins.\n */\nexport function defineConfig<TConfig extends PrettierConfigWithPlugins>(config: TConfig): TConfig {\n return config;\n}\n\n/**\n * Get the version of the locally installed TypeScript.\n *\n * @returns The local TypeScript version, or the version specified in this [package.json](../package.json) file if\n * TypeScript is not installed locally.\n */\nexport function getTypescriptVersion(): string {\n const ts = getPackageInfoSync('typescript');\n\n return ts?.version ?? localTypescriptVersion;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@2digits/prettier-config",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/2digits-agency/configs.git",
|
|
@@ -34,21 +34,21 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@ianvs/prettier-plugin-sort-imports": "4.4.1",
|
|
36
36
|
"@prettier/plugin-xml": "3.4.1",
|
|
37
|
-
"local-pkg": "1.
|
|
37
|
+
"local-pkg": "1.1.0",
|
|
38
38
|
"prettier-plugin-embed": "0.5.0",
|
|
39
39
|
"prettier-plugin-jsdoc": "1.3.2",
|
|
40
40
|
"prettier-plugin-sh": "0.15.0",
|
|
41
41
|
"prettier-plugin-sql": "0.18.1",
|
|
42
42
|
"prettier-plugin-tailwindcss": "0.6.11",
|
|
43
43
|
"prettier-plugin-toml": "2.0.2",
|
|
44
|
-
"@2digits/constants": "0.3.
|
|
44
|
+
"@2digits/constants": "0.3.7"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"eslint": "9.21.0",
|
|
48
48
|
"prettier": "3.5.2",
|
|
49
49
|
"tsup": "8.4.0",
|
|
50
|
-
"typescript": "5.
|
|
51
|
-
"@2digits/tsconfig": "0.
|
|
50
|
+
"typescript": "5.8.2",
|
|
51
|
+
"@2digits/tsconfig": "0.7.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"prettier": ">=3.0.0"
|