
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
setup-config
Advanced tools
I work with various JS frameworks and got really tired of always having to create ESLint and Prettier config files so I created this. This is a good starting point to create an ESLint config that also uses Prettier for formatting.
npx setup-config setup
npx allows you to use the command without installing it locally, which is the preferred method.
or you can just install as a dev dependency like so...
npm i -D setup-config
setup-config setup
If you do not want to use Prettier...
setup-config setup -p
# or
setup-config setup --no-prettier
Want to remove the config files?
setup-config remove
# or
setup-config rm
removedoes not remove the entries in yourpackage.json, so if you want to remove those, then you must manually do that.
Need help?
setup-config --help
npx commandsnpx setup-config setup
npx setup-config setup -p # without Prettier
npx setup-config remove # removes conig files
Here are the config files that are created in the root of your project
.eslintrc.js with Prettier
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
},
env: {
browser: true,
es6: true,
},
extends: ['airbnb-base/legacy', 'prettier'],
plugins: ['prettier', 'import'],
// add your custom rules here
rules: {
'prettier/prettier': 1,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 1 : 0,
'no-console': process.env.NODE_ENV === 'production' ? 1 : 0,
},
};
.eslintrc.js without Prettier
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
},
env: {
browser: true,
es6: true,
},
extends: ['airbnb-base/legacy'],
plugins: ['import'],
// add your custom rules here
rules: {
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 1 : 0,
'no-console': process.env.NODE_ENV === 'production' ? 1 : 0,
},
};
.prettierrc.js
module.exports = {
printWidth: 100,
semi: true,
singleQuote: true,
trailingComma: 'es5',
arrowParens: 'avoid',
};
When you run setup-config setup, here is the npm install command that is run:
npm i -D babel-eslint eslint eslint-config-airbnb-base eslint-config-prettier eslint-plugin-import eslint-plugin-prettier prettier
When you run the setup-config setup -p, here is the npm install command that is run:
npm i -D babel-eslint eslint eslint-config-airbnb-base eslint-plugin-import
This is a good base for how I use ESLint and Prettier. If you want something changed, create an issue and we can discuss it.
I will probably end up creating a --react flag that is setup to use React because I do spend a lot
of time in React.
FAQs
Sets up ESlint and Prettier with some sensible defaults
We found that setup-config 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.