
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
npm-starter
Advanced tools
This enables you to write ES2015 code but before the package is published on NPM, it gets converted to ES5 code so anyone can use it in their projects.
You just need to clone this project, delete the .git
folder and install the NPM dependencies.
$ git clone https://github.com/deiucanta/npm-starter.git
$ cd npm-starter
$ rm -rf .git
$ npm install
You can run git init
as well to start your own git repo. Next, you should edit package.json
to reflect your package name and version.
There are a few predefined NPM scripts available. Run them by typing this in your terminal: npm run [script]
Name | Description |
---|---|
lint | Runs ESlint on all files from ./src and ./tests |
lint:fix | Runs ESlint and fixes all the inconsistencies |
test | Runs the tests with Mocha |
test:dev | Re-runs the tests whenever a change occurs |
build | Compiles all ES2015 files to ES5 (legacy code) |
clean | Removes the compiled files |
NOTE: There is another script prepublish
that runs before you publish the package to NPM. All it does is to run clean
and build
.
object rest spread
capabilities?npm i --save-dev babel-plugin-transform-object-rest-spread
transform-object-rest-spread
to the plugins array in your .babelrc
file.{
"presets": ["es2015"],
"plugins": [
"transform-runtime",
"transform-object-rest-spread"
]
}
...
) for objects as well!npm i --save-dev babel-preset-react
react
preset in your .babelrc
file.{
"presets": ["es2015", "react"],
"plugins": [
"transform-runtime"
]
}
npm i --save-dev eslint-plugin-react
extends
property in your .eslintrc
file to be just airbnb
instead of airbnb/base
.{
"parser": "babel-eslint",
"extends": "airbnb",
"rules": {}
}
P.S. This approach is perfect if you write a React library but if you build an app you might want to consider Webpack which helps you bundle everything/
Open a new issue with the feature you want and I'll add a short tutorial for you - like the one above.
npm install
I get UNMET PEER DEPENDENCY
for two packages?This is totally fine. It happens because Airbnb's ESlint package needs those but only when you want to use React. This project uses only the
airbnb/base
set of linters available in Airbnb. It includes everything you need except the React parts — which you might not need.
1.0.0 (2016-04-15) — initial release
Before you submit a pull request, please take the following actions.
MIT @ Andrei Canta
FAQs
A starter codebase for writing NPM packages using ES2015
We found that npm-starter 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.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.