🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@gossi/config-eslint

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gossi/config-eslint

Add eslint to your packages.

1.1.2
latest
Source
npm
Version published
Weekly downloads
1.4K
-53.32%
Maintainers
1
Weekly downloads
 
Created
Source

@gossi/config-eslint

Add eslint to your packages.

Installation

1) Install these packages

pnpm add -D @gossi/config-eslint eslint

2) Add scripts to execute linting

{
  "scripts": {
    "lint:js": "eslint . --cache",
    "lint:js:fix": "eslint . --fix"
  }
}

3) Create Config

Create a eslint.config.js file with your desired config (see below)

Configs

Base

The shared common configs. It's good way to start your own config.

// eslint.config.js
import { configs } from '@gossi/config-eslint';

export default configs.base(import.meta.dirname);

Node

For all node projects.

// eslint.config.js
import { configs } from '@gossi/config-eslint';

export default configs.node(import.meta.dirname);

Ember

For all ember projects.

// eslint.config.js
import { configs } from '@gossi/config-eslint';

export default configs.ember(import.meta.dirname);

overriding with storybook (install eslint-plugin-storybook):

import storybook from 'eslint-plugin-storybook';

import { configs } from '@gossi/config-eslint';

export default [
  ...configs.ember(import.meta.dirname),
  ...storybook.configs['flat/recommended'],
  ...storybook.configs['flat/csf']
];

JSON

If you wish, use it for json.

// eslint.config.js
import { configs } from '@gossi/config-eslint';

export default configs.json();

Debugging

To see what the resolved config looks like for a file

ppx @eslint/config-inspector

Utils

Some utilities to help you writing/customizing rules.

hasBabelConfig()

Find out, if a babel config is used:

import { utils } from '@gossi/config-eslint';

const usesBabelWithAConfig = utils.hasBabelConfig(import.meta.dirname);

hasTypescript()

Find out, if typescript is being used.

import { utils } from '@gossi/config-eslint';

const usesTypescript = utils.hasTypescript(import.meta.dirname);

hasTypeModule()

Find out, if package is using "type": "module".

import { utils } from '@gossi/config-eslint';

const usesESM = utils.hasTypeModule(import.meta.dirname);

hasDep()

Figure, if a given dependency is present

import { utils } from '@gossi/config-eslint';

const usesStorybook = utils.hasDep(import.meta.dirname, 'storybook');

FAQs

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