Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jcamp/eslint-config-test

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jcamp/eslint-config-test

JohnCampionJr's ESLint config

  • 1.0.0-beta.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

@jcamp/eslint-config

This is my personal ESLint Config.

It extends @antfu's eslint-config.

It starts with his vue config and makes these changes:

  • Uses only the vue config, omitting react
  • Adds my Prettier config
  • Adds the official TailwindCSS Prettier plugin
  • Disables the antfu/if-newline rule as it will clash with Prettier
  • Follows Prettier's recommended configuration with ESLint:

Usage

Install

pnpm add -D eslint prettier @jcamp/eslint-config

Config eslint.config.js

import config from '@jcamp/eslint-config'

export default config

.eslintignore is no longer supported by eslint flatconfig.

config.push({
  ignores: ['temp.js', '**/vendor/*.js'],
})

Config .prettierrc.js

import baseConfig from '@jcamp/eslint-config/prettier'

export default {
  ...baseConfig,
  /* make any changes here */
  singleAttributePerLine: false,
}

Add script for package.json

For example:

{
  "scripts": {
    "lint": "eslint .",
    "fix": "eslint . --fix",
    "format": "prettier . --check",
    "clean": "prettier . --write"
  }
}

Config VS Code auto fix

Create .vscode/settings.json

{
  "prettier.enable": true,
  // Enable the ESlint flat config support
  "eslint.experimental.useFlatConfig": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit",
    "source.organizeImports": "never"
  }
}

License

MIT License © 2023-PRESENT John Campion

Keywords

FAQs

Package last updated on 09 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