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

@mizdra/eslint-config-mizdra

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mizdra/eslint-config-mizdra

ESLint config for @mizdra

  • 2.0.0-beta.3
  • beta
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
650
increased by87.32%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-config-mizdra

ESLint config for @mizdra

Install

npm i -D @mizdra/eslint-config-mizdra eslint

Usage

With legacy config

module.exports = {
  root: true,
  extends: ['@mizdra/mizdra', '@mizdra/mizdra/+react', '@mizdra/mizdra/+prettier'],
  parserOptions: { ecmaVersion: 2021 },
  env: { es2021: true, node: true, browser: true, jest: true },
  rules: {
    // Write your favorite rules
  },
  overrides: [
    // For TypeScript
    {
      files: ['*.ts', '*.tsx', '*.cts', '*.mts'],
      extends: ['@mizdra/mizdra/+typescript', '@mizdra/mizdra/+prettier'],
      rules: {
        // Write your favorite rules for TypeScript
      },
    },
  ],
};

With flat config

// @ts-check

import { FlatCompat } from '@eslint/eslintrc';
import js from '@eslint/js';
import globals from 'globals';

const __dirname = new URL('.', import.meta.url).pathname;

const compat = new FlatCompat({
  baseDirectory: __dirname,
  recommendedConfig: js.configs.recommended,
  allConfig: js.configs.all,
});

/** @type {import('eslint').Linter.FlatConfig[]} */
export default [
  { ignores: ['**/dist'] },
  ...compat.extends('@mizdra/mizdra', '@mizdra/mizdra/+react'),
  {
    languageOptions: {
      ecmaVersion: 2021,
      globals: { ...globals.node, ...globals.browser, ...globals.jest },
    },
    rules: {
      // Write your favorite rules
    },
  },
  ...compat.config({
    overrides: [
      {
        // For TypeScript
        files: ['*.ts', '*.tsx', '*.cts', '*.mts'],
        extends: ['@mizdra/mizdra/+typescript.js'],
        rules: {
          // Write your favorite rules for TypeScript
        },
      },
    ],
  }),
  ...compat.extends('@mizdra/mizdra/+prettier'),
];

Built-in 3rd-party packages

When eslint-config-mizdra is installed the following packages are installed as its dependencies for usability. The installed version is always the latest.

FAQ

How can we upgrade built-in 3rd-party packages?

Uninstall eslint-config-mizdra and then reinstall it. It will then switch to the latest built-in 3rd-party packages.

npm un @mizdra/eslint-config-mizdra
npm i -D @mizdra/eslint-config-mizdra

How do we pin built-in 3rd-party packages to a specific version?

Use the overrides field for npm and pnpm, or the resolutions field for yarn.

// package.json
{
  "overrides": {
    "@typescript-eslint/parser": "^4.0.0"
  }
}

In npm and pnpm, you can also match the version written in dependencies.

// package.json
{
  "dependencies": {
    "@typescript-eslint/parser": "^4.0.0"
  },
  "overrides": {
    "@typescript-eslint/parser": "$@typescript-eslint/parser"
  }
}

FAQs

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