Socket
Book a DemoInstallSign in
Socket

@map-colonies/eslint-config

Package Overview
Dependencies
Maintainers
10
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@map-colonies/eslint-config

eslint configs for map colonies organization

latest
Source
npmnpm
Version
6.0.0
Version published
Weekly downloads
611
5.71%
Maintainers
10
Weekly downloads
 
Created
Source

ESLint config

A collection of ESLint configs for various frameworks and environments. The package only supports eslint 9 and above using the flat configuration.

Available Configs

  • ts-base: base configurations for TypeScript.
  • React: rules for React (extends react-app).
  • Jest: rules for Jest.

Installation

base

$ npm install --save-dev eslint @map-colonies/eslint-config

react

$ npm install --save-dev @map-colonies/eslint-config eslint-plugin-react eslint-plugin-react-hooks

jest

$ npm install --save-dev @map-colonies/eslint-config eslint-plugin-jest

Usage

Add the configs you want to the eslint configuration file of your choice. In this example we are using the file eslint.config.mjs For more information check the following link Configuration Files .
Note: make sure to add ts-base last.

import tsBaseConfig from '@map-colonies/eslint-config/ts-base';
import { config } from '@map-colonies/eslint-config/helpers';

export default config(tsBaseConfig);

Debug

If you want to check the ESLint configuration, debug problems or just see the final configuration, you can the following command that will open the eslint configuration UI in your browser.

npx eslint --inspect-config .

For more information check the following link debug.

Adding new Configs

Add a new file and name it as you would like. Inside export the ESLint configuration.

module.exports = {
  extends: ['plugin:jest/recommended', 'plugin:jest/style'],
  plugins: ['jest'],
  env: {
    'jest/globals': true,
  },
};

after you finished developing the config, make sure it works by using the --print-config flag of ESLint, in the project you use for testing.

$ npx eslint --print-config index.ts

Don't forget adding the config to this readme :blush:

Issues

If any linting error is appearing twice, or you have any other problem, please open an issue with all the details you have.

FAQs

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