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

@sparticuz/eslint-config

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sparticuz/eslint-config

Sparticuz's shareable config for eslint

  • 8.0.2
  • npm
  • Socket score

Version published
Weekly downloads
18
decreased by-88.39%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-config

My eslint config

I use this on projects that I develop.

Install

npm install --save-dev @sparticuz/eslint-config typescript-eslint

Example eslint.config.js

// @ts-check

import myConfig from "@sparticuz/eslint-config";
import tseslint from "typescript-eslint";

export default tseslint.config(
  ...myConfig,
  {
    languageOptions: {
      parserOptions: {
        project: true
      }
    }
  }
);

Example prettier.config.cjs

This is my prettier.config.cjs file. Requires npm install --save-dev prettier @ianvs/prettier-plugin-sort-imports

/** @type {import("prettier").Config} */
/** @type {import("@ianvs/prettier-plugin-sort-imports").PrettierConfig} */
const config = {
  importOrder: [
    "",
    "<BUILTIN_MODULES>",
    "",
    "react",
    "",
    "^(@dazser|@sparticuz)/(.*)$",
    "",
    "<THIRD_PARTY_MODULES>",
    "",
    "^@/(.*)$",
    "",
    "^[.]",
    "",
    ".json$",
    "^(?!.*[.]css$)[./].*$",
    ".css$",
  ],
  importOrderParserPlugins: [
    "classProperties",
    "decorators-legacy",
    "importAssertions",
    "jsx",
    "typescript",
  ],
  importOrderTypeScriptVersion: "5.3.3",
  // eslint-disable-next-line n/no-unpublished-require
  plugins: [require.resolve("@ianvs/prettier-plugin-sort-imports")],
  trailingComma: "all",
};
module.exports = config;

FAQs

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

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