Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
eslint-config-moxy
Advanced tools
MOXY eslint configuration to be used across several JavaScript projects
MOXY eslint configuration to be used across several JavaScript projects.
$ npm install --save-dev eslint eslint-config-moxy
NOTE: npm
v3 or greater is required for this package to work correctly until #3458 is resolved - this means that you must run node
v6 or greater.
Create a .eslintrc.json
file in the project root using a base configuration and addons.
First you need to choose the base configuration to use:
es5
- The configuration to be used in ECMAScript 5 based projectses6
- The configuration to be used in ECMAScript 6 based projectses7
- The configuration to be used in ECMAScript 7 based projectses8
- The configuration to be used in ECMAScript 8 based projectsThen enhance it with one or more addons:
browser
- If you are going to develop code for the browser (assumes you use CommonJS or AMD)node
- If you are going to develop code for NodeJSes6-modules
: If you are going to use ES6 import & export instead of CommonJS or AMDobject-spread
: Allows to use object rest spread when destructuring objectsreact
- If you are going to use React and JSX (requires es6
base configuration or higher)Cutting edge react in the browser:
{
"root": true,
"extends": [
"eslint-config-moxy/es8",
"eslint-config-moxy/addons/browser",
"eslint-config-moxy/addons/es6-modules",
"eslint-config-moxy/addons/react",
"eslint-config-moxy/addons/object-spread"
]
}
ES6 with modules in NodeJS (requires a transpiler such as Babel or similar):
{
"root": true,
"extends": [
"eslint-config-moxy/es6",
"eslint-config-moxy/addons/es6-modules",
"eslint-config-moxy/addons/node"
]
}
Use ES6 in NodeJS without any transpiler:
{
"root": true,
"extends": [
"eslint-config-moxy/es6",
"eslint-config-moxy/addons/node"
]
}
Old ES5 in the browser:
{
"root": true,
"extends": [
"eslint-config-moxy/es5",
"eslint-config-moxy/addons/browser"
]
}
Note that by setting root
to true, we ensure that no ancestor configuration is used which also improves ESLint
performance because no more file lookups need to be done.
If your file exports a single class, your filename should be exactly the name of the class. For other cases, the name of the file should be the same as the default exports. If the file doesn't have a default export, the name can be in kebab-case
(e.g.: some-file.js
).
$ npm test
$ npm test:watch
during development
FAQs
MOXY eslint configuration to be used across several JavaScript projects
The npm package eslint-config-moxy receives a total of 132 weekly downloads. As such, eslint-config-moxy popularity was classified as not popular.
We found that eslint-config-moxy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 20 open source maintainers 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
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.