New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@marshallku/config

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@marshallku/config

This repository contains shared configuration files for ESLint, Prettier, and TypeScript, designed to be used across multiple projects. The configurations are published on npm for easy integration.

latest
npmnpm
Version
0.0.0
Version published
Maintainers
1
Created
Source

Monorepo for ESLint, Prettier, and TypeScript Configurations

This repository contains shared configuration files for ESLint, Prettier, and TypeScript, designed to be used across multiple projects. The configurations are published on npm for easy integration.

Folder Structure

  • .github: GitHub configuration files
  • __tests__: Contains scripts to validate ESLint configurations.
  • apps: Example applications to demonstrate the use of the configurations.
    • next: Example Next.js application.
    • react: Example React application.
  • packages: Contains the shared configuration packages.
    • eslint: ESLint configuration files (@marshallku/eslint-config).
    • prettier: Prettier configuration files (@marshallku/prettier-config).
    • typescript: TypeScript configuration files (@marshallku/typescript-config).

Installation

You can install each configuration package via npm.

ESLint Configuration

Install the ESLint configuration:

npm i -D @marshallku/eslint-config

Then, create or update your .eslintrc.cjs file to extend the installed configuration:

require("@marshallku/eslint-config/patch");

/** @type {import("eslint").Linter.Config} */
module.exports = {
    env: { browser: true, es2020: true },
    extends: ["@marshallku/eslint-config", "@marshallku/eslint-config/mixins/react"],
    settings: {
        react: {
            version: "18.2",
        },
    },
    parserOptions: {
        project: true,
        tsconfigRootDir: __dirname,
    },
};

You have to import @marshallku/eslint-config/patch module before extending the configuration.

Also, please make sure to add version of React to the settings.react.version field, and set the parserOptions.project and parserOptions.tsconfigRootDir fields to enable TypeScript support.

Prettier Configuration

Install the Prettier configuration:

npm i -D @marshallku/prettier-config

Then, add prettier field to your package.json file:

{
    "name": "my-package",
    "version": "1.0.0",
    "prettier": "@marshallku/prettier-config"
}

TypeScript Configuration

Install the TypeScript configuration:

npm i -D @marshallku/typescript-config

Then, create or update your tsconfig.json file to extend the installed configuration:

{
    "extends": "@marshallku/typescript-config/react-library.json",
    "compilerOptions": {
        "target": "ES2020"
    },
    "include": ["src"]
}

FAQs

Package last updated on 30 May 2024

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