Socket
Socket
Sign inDemoInstall

@trivago/prettier-plugin-sort-imports

Package Overview
Dependencies
Maintainers
4
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trivago/prettier-plugin-sort-imports - npm Package Compare versions

Comparing version 4.2.1 to 4.3.0

lib/src/utils/__tests__/is-sort-imports-ignored.spec.js

4

CHANGELOG.md

@@ -5,2 +5,6 @@ ## Changelog

---
### v4.3.0
#### New features
- added support for sort-imports-ignore [#237](https://github.com/trivago/prettier-plugin-sort-imports/pull/237) by [stephdotnet](https://github.com/stephdotnet)
### v4.2.1

@@ -7,0 +11,0 @@ #### Chore

3

lib/src/constants.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.newLineNode = exports.THIRD_PARTY_MODULES_SPECIAL_WORD = exports.newLineCharacters = exports.jsx = exports.typescript = exports.flow = void 0;
exports.newLineNode = exports.THIRD_PARTY_MODULES_SPECIAL_WORD = exports.sortImportsIgnoredComment = exports.newLineCharacters = exports.jsx = exports.typescript = exports.flow = void 0;
var types_1 = require("@babel/types");

@@ -9,2 +9,3 @@ exports.flow = 'flow';

exports.newLineCharacters = '\n\n';
exports.sortImportsIgnoredComment = 'sort-imports-ignore';
/*

@@ -11,0 +12,0 @@ * Used to mark the position between RegExps,

@@ -16,4 +16,4 @@ "use strict";

var parser_flow_1 = require("prettier/parser-flow");
var parser_html_1 = require("prettier/parser-html");
var parser_typescript_1 = require("prettier/parser-typescript");
var parser_html_1 = require("prettier/parser-html");
var default_processor_1 = require("./preprocessors/default-processor");

@@ -20,0 +20,0 @@ var vue_preprocessor_1 = require("./preprocessors/vue-preprocessor");

@@ -9,2 +9,3 @@ "use strict";

var get_sorted_nodes_1 = require("../utils/get-sorted-nodes");
var is_sort_imports_ignored_1 = require("../utils/is-sort-imports-ignored");
function preprocessor(code, options) {

@@ -22,2 +23,4 @@ var importOrderParserPlugins = options.importOrderParserPlugins, importOrder = options.importOrder, importOrderCaseInsensitive = options.importOrderCaseInsensitive, importOrderSeparation = options.importOrderSeparation, importOrderGroupNamespaceSpecifiers = options.importOrderGroupNamespaceSpecifiers, importOrderSortSpecifiers = options.importOrderSortSpecifiers;

return code;
if ((0, is_sort_imports_ignored_1.isSortImportsIgnored)(importNodes))
return code;
var allImports = (0, get_sorted_nodes_1.getSortedNodes)(importNodes, {

@@ -24,0 +27,0 @@ importOrder: importOrder,

{
"name": "@trivago/prettier-plugin-sort-imports",
"version": "4.2.1",
"version": "4.3.0",
"description": "A prettier plugins to sort imports in provided RegEx order",

@@ -48,3 +48,3 @@ "main": "lib/src/index.js",

"@types/lodash": "4.14.168",
"@types/node": "14.14.34",
"@types/node": "20.8.6",
"@vue/compiler-sfc": "^3.2.41",

@@ -51,0 +51,0 @@ "jest": "26.6.3",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc