prettier-plugin-sorted
Version:
Sort your JavaScript and TypeScript imports with prettier with automatic alias support
3 lines (2 loc) • 1.24 kB
JavaScript
;function r(r){return r&&"object"==typeof r&&"default"in r?r.default:r}Object.defineProperty(exports,"__esModule",{value:!0});var e=r(require("path")),t=r(require("import-sort")),s=require("import-sort-config"),i=require("prettier/parser-babel"),o=require("prettier/parser-typescript"),n=r(require("tiny-invariant"));function p(){return(p=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}return r}).apply(this,arguments)}var a={".js, .jsx, .es6, .es, .mjs, .ts, .tsx":{parser:"typescript",style:"custom",options:{}}},u=function(r,i){var o=function(r,e){var t=s.getConfig(r,e,a);t||n(!1);var i=t.config.style;t.config.parser||n(!1),i||n(!1);var o=t.style;return t.parser||n(!1),(null!=o?o:o===i)||n(!1),t}(i,e.resolve(__dirname,"..","..")),p=o.parser,u=o.style;return t(r,void 0===p?"typescript":p,void 0===u?"custom":u,"dummy"+i,o.config.options).code},c={typescript:p({},o.parsers.typescript,{preprocess:function(r){return u(r,".ts")}}),babel:p({},i.parsers.babel,{preprocess:function(r){return u(r,".js")}})};exports.defaultConfig=a,exports.parsers=c;
//# sourceMappingURL=prettier-plugin-sorted.cjs.production.min.js.map