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

eslint-config-gmana

Package Overview
Dependencies
Maintainers
0
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-gmana

## Goals

  • 1.1.12
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
0
Weekly downloads
 
Created
Source

eslint-config-gmana

Goals

  1. Find errors that are detectable with static analysis.
  2. Make reading code easier by providing consistent code style.
  3. Make writing code faster by leveraging auto fix wherever possible.

Getting started

  1. pnpm add eslint eslint-config-gmana prettier --dev
  2. Setup your project config in eslint.config.mjs:
import { getPresets } from 'eslint-config-gmana';

export default [
  ...(await getPresets(
    // Base config
    'typescript', // or 'javascript'

    // Optional extensions
    'react',
    'cssModules',
    'tailwind',
    'jest',
    'cypress',
    'vitest',
  )),

  {
    // Your custom config
  },
];
  1. If you require globals, like browser APIs on window, you can add them to your config:
// eslint.config.mjs
import globals from 'globals';

export default [
  // ...
  {
    languageOptions: {
      globals: {
        ...globals.browser,
        ...globals.node,
      },
    },
  },
];
  1. To set up Prettier, add to your package.json:
"prettier": "eslint-config-gmana/.prettierrc.json"
  1. If you use TypeScript, add to your tsconfig.json:
"extends": "eslint-config-gmana/tsconfig.json"

Happy linting!

Further configuration

CI integration

To validate your code in a CI pipeline, add the following to your package.json:

"scripts": {
  "lint": "eslint src && prettier src --check"
}

VSCode integration

The following two extensions are recommended:

  1. dbaeumer.vscode-eslint
  2. esbenp.prettier-vscode

To auto-fix errors from ESLint as well as Prettier on save, you can use the following configuration:

// settings.json (VSCode)
{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "always"
  },
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true
}

FAQs

Package last updated on 03 Jan 2025

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