Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
prettier-plugin-import-sort
Advanced tools
Prettier plugin to pass javascript and typescript through import-sort
This is Prettier plugin to sort imports using import-sort for javascript and typescript files.
$ npm i -D prettier prettier-plugin-import-sort
You will also want to install an import sort style module of your choice, such as:
$ npm i -D import-sort-style-module
You will then need the configuration for import-sorts available, e.g. something like this in package.json
"importSort": {
".js, .jsx, .ts, .tsx": {
"style": "module"
}
}
If you are using typescript, you may also need to specify the typescript parser. This is somewhat dependant upon the typescript features used (decorators for instance), e.g.
"importSort": {
".js, .jsx, .ts, .tsx": {
"style": "module",
"parser": "typescript"
}
}
Note: importSort silently falls back to its default configuration if it finds a setup error. Make sure that the extension list is like the example above and not something like "*.js"
which is an error.
A large part of this code was copied from import-sort-cli.
FAQs
Prettier plugin to pass javascript and typescript through import-sort
The npm package prettier-plugin-import-sort receives a total of 55,879 weekly downloads. As such, prettier-plugin-import-sort popularity was classified as popular.
We found that prettier-plugin-import-sort demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.