@kodehort/prettier-config
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -7,3 +7,3 @@ declare const _default: { | ||
jsxSingleQuote: false; | ||
plugins: any[]; | ||
plugins: string[]; | ||
printWidth: number; | ||
@@ -10,0 +10,0 @@ proseWrap: "always"; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const prettier_plugin_sort_imports_1 = __importDefault(require("@ianvs/prettier-plugin-sort-imports")); | ||
const prettier_plugin_astro_1 = __importDefault(require("prettier-plugin-astro")); | ||
const prettier_plugin_curly_1 = __importDefault(require("prettier-plugin-curly")); | ||
const prettier_plugin_packagejson_1 = __importDefault(require("prettier-plugin-packagejson")); | ||
const prettier_plugin_tailwindcss_1 = __importDefault(require("prettier-plugin-tailwindcss")); | ||
exports.default = { | ||
arrowParens: 'always', | ||
arrowParens: "always", | ||
importOrder: [ | ||
'<BUILTIN_MODULES>', | ||
'', | ||
'<THIRD_PARTY_MODULES>', | ||
'', | ||
'^[~/]', | ||
'^[.]', | ||
"<BUILTIN_MODULES>", | ||
"", | ||
"<THIRD_PARTY_MODULES>", | ||
"", | ||
"^[~/]", | ||
"^[.]", | ||
], | ||
importOrderParserPlugins: ['typescript', 'jsx', 'decorators-legacy'], | ||
importOrderTypeScriptVersion: '5.0.0', | ||
importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"], | ||
importOrderTypeScriptVersion: "5.0.0", | ||
jsxSingleQuote: false, | ||
plugins: [ | ||
prettier_plugin_sort_imports_1.default, | ||
prettier_plugin_astro_1.default, | ||
prettier_plugin_curly_1.default, | ||
prettier_plugin_packagejson_1.default, | ||
prettier_plugin_tailwindcss_1.default, | ||
"@ianvs/prettier-plugin-sort-imports", | ||
"prettier-plugin-astro", | ||
"prettier-plugin-curly", | ||
"prettier-plugin-packagejson", | ||
"prettier-plugin-tailwindcss", | ||
], | ||
printWidth: 80, | ||
proseWrap: 'always', | ||
proseWrap: "always", | ||
semi: false, | ||
@@ -37,4 +29,4 @@ singleAttributePerLine: true, | ||
tabWidth: 2, | ||
trailingComma: 'all', | ||
trailingComma: "all", | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFFQSx1R0FBeUQ7QUFDekQsa0ZBQXlDO0FBQ3pDLGtGQUF5QztBQUN6Qyw4RkFBcUQ7QUFDckQsOEZBQXFEO0FBRXJELGtCQUFlO0lBQ2IsV0FBVyxFQUFFLFFBQVE7SUFDckIsV0FBVyxFQUFFO1FBQ1gsbUJBQW1CO1FBQ25CLEVBQUU7UUFDRix1QkFBdUI7UUFDdkIsRUFBRTtRQUNGLE9BQU87UUFDUCxNQUFNO0tBQ1A7SUFDRCx3QkFBd0IsRUFBRSxDQUFDLFlBQVksRUFBRSxLQUFLLEVBQUUsbUJBQW1CLENBQUM7SUFDcEUsNEJBQTRCLEVBQUUsT0FBTztJQUNyQyxjQUFjLEVBQUUsS0FBSztJQUNyQixPQUFPLEVBQUM7UUFDTixzQ0FBTztRQUNQLCtCQUFLO1FBQ0wsK0JBQUs7UUFDTCxxQ0FBVztRQUNYLHFDQUFXO0tBQ1o7SUFDRCxVQUFVLEVBQUUsRUFBRTtJQUNkLFNBQVMsRUFBRSxRQUFRO0lBQ25CLElBQUksRUFBRSxLQUFLO0lBQ1gsc0JBQXNCLEVBQUUsSUFBSTtJQUM1QixXQUFXLEVBQUUsSUFBSTtJQUNqQixRQUFRLEVBQUUsQ0FBQztJQUNYLGFBQWEsRUFBRSxLQUFLO0NBQ0ksQ0FBQSJ9 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFFQSxrQkFBZTtJQUNiLFdBQVcsRUFBRSxRQUFRO0lBQ3JCLFdBQVcsRUFBRTtRQUNYLG1CQUFtQjtRQUNuQixFQUFFO1FBQ0YsdUJBQXVCO1FBQ3ZCLEVBQUU7UUFDRixPQUFPO1FBQ1AsTUFBTTtLQUNQO0lBQ0Qsd0JBQXdCLEVBQUUsQ0FBQyxZQUFZLEVBQUUsS0FBSyxFQUFFLG1CQUFtQixDQUFDO0lBQ3BFLDRCQUE0QixFQUFFLE9BQU87SUFDckMsY0FBYyxFQUFFLEtBQUs7SUFDckIsT0FBTyxFQUFFO1FBQ1AscUNBQXFDO1FBQ3JDLHVCQUF1QjtRQUN2Qix1QkFBdUI7UUFDdkIsNkJBQTZCO1FBQzdCLDZCQUE2QjtLQUM5QjtJQUNELFVBQVUsRUFBRSxFQUFFO0lBQ2QsU0FBUyxFQUFFLFFBQVE7SUFDbkIsSUFBSSxFQUFFLEtBQUs7SUFDWCxzQkFBc0IsRUFBRSxJQUFJO0lBQzVCLFdBQVcsRUFBRSxJQUFJO0lBQ2pCLFFBQVEsRUFBRSxDQUFDO0lBQ1gsYUFBYSxFQUFFLEtBQUs7Q0FDSSxDQUFDIn0= |
{ | ||
"name": "@kodehort/prettier-config", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "A curated set of prettier configurations that we use across our projects and can be used in your projects.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/kodehort/prettier-config", |
@@ -36,3 +36,3 @@ # prettier-config | ||
```javascript prettier.config.js | ||
import prettierConfig from '@kodehort/prettier-config' | ||
import prettierConfig from "@kodehort/prettier-config"; | ||
@@ -43,3 +43,20 @@ /** @type {import("prettier").Config} */ | ||
semi: false, | ||
}; | ||
``` | ||
## FAQs | ||
### Module type of the repository has an impact in the configuration file | ||
If the package is defined with type `module` in the `package.json` file, you | ||
need to use the `.js` extension for the configuration file. This | ||
is because the `import` statement is not supported in CommonJS files. | ||
````json package.json | ||
{ | ||
"type": "module" | ||
} | ||
``` | ||
Otherwise you can use the `.mjs` extension for the configuration file. | ||
```` |
Sorry, the diff of this file is not supported yet
61
5738
46