New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@byjohann/eslint-config

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@byjohann/eslint-config

ESLint config for my projects

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ESLint Config

Sharable ESLint config for my repositories with a focus on code reproducibility and readability.

I was switching between different ESLint configs for my projects. Most of the time Anthony Fu's set of rules was the best fit. He is proactively advocating using ESLint for formatting, which I don't agree with. I prefer to use Prettier for formatting and ESLint for linting.

Thus, the day has come to create my own ESLint config. My goal is to find the middle ground between as little rules as possible and as many rules as necessary. For example, I prefer strictly ordered module and type imports.

Inspirations are drawn from:

Included Rules

[!NOTE] This ESLint config is unopinionated about code styling. Prettier is recommended as code formatter.

Installation

# pnpm
pnpm add -D eslint prettier @byjohann/eslint-config

# npm
npm install -D eslint prettier @byjohann/eslint-config

# yarn
yarn add -D eslint prettier @byjohann/eslint-config

[!NOTE] Installing Prettier is optional. Omit the prettier package if you don't want to use it.

Usage

Create a .eslintrc file in the root of your project with the following content:

{
  "extends": "@byjohann/eslint-config"
}

To enable auto-applied linting and formatting on save in VSCode, add the following to your project's local .vscode/settings.json:

{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true,
  "eslint.validate": ["javascript", "javascriptreact", "vue"]
}

To force your fellow developers to use the same VSCode extensions as you, add the following to your project's local .vscode/extensions.json:

{
  "recommendations": [
    "dbaeumer.vscode-eslint",
    "esbenp.prettier-vscode",
    "Vue.volar"
  ]
}

[!NOTE] If you're not using Vue, remove the Vue.volar extension from the list.

License

MIT

Keywords

FAQs

Package last updated on 19 Oct 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc