Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
import-sort-style-capital
Advanced tools
Capital style for import-sort.
This style is just a fork of import-sort-style-retino.
// Modules that start with 'react'
import React from 'react';
import ReactDom from 'react-dom';
// Other Modules
import _, {...} from 'first-module';
import _, {...} from 'second-module';
// Modules starting with capital letter
import localModule from 'LocalModule';
// Siblings and parents
import things from '../grand-parent';
import name from '../parent';
import sibling from './sibling';
// Imports without members
import "style.css"
These instrutions use prettier, which is my preferred method of enforcing import sort order.
# Install prettier-plugin-import-sort
yarn add -D prettier-plugin-import-sort
# Install import-sort-style-capital
yarn add -D import-sort-style-capital
Then add on your root package.json
:
{
"importSort": {
".js, .jsx": {
"parser": "babylon",
"style": "capital"
},
".ts, .tsx": {
"parser": "typescript",
"style": "capital"
}
}
}
I've used yarn, and tsdx, which provides scaffolding for TypeScript libraries.
# Install yarn, if you don't have it
curl -o- -L https://yarnpkg.com/install.sh | bash
# Install dependencies
yarn install
# Build upon changes (development mode)
yarn run dev
# Lint code
yarn run lint
# Test code
yarn run test
# Build code
yarn run build
FAQs
Capital import-sort style
The npm package import-sort-style-capital receives a total of 122 weekly downloads. As such, import-sort-style-capital popularity was classified as not popular.
We found that import-sort-style-capital 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
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.