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

illumea

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

illumea

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

eslint-config-zzjtnb

npm

  • Single quotes, no semi
  • Auto fix for formatting (aimed to be used standalone without Prettier)
  • Designed to work with TypeScript, JavaScript,Vue out-of-box
  • Lint also for json, yaml, markdown
  • Sorted imports, dangling commas for cleaner commit diff
  • Reasonable defaults, best practices, only one-line of config

Usage

Install

pnpm add -D eslint eslint-define-config eslint-config-zzjtnb

.eslintrc.js

For all:

/* eslint-env node */
// @ts-check
const { defineConfig } = require('eslint-define-config')

module.exports = defineConfig({
  root: true,
  extends: [
    'zzjtnb',
  ],
})

For JavaScript:

/* eslint-env node */
// @ts-check
const { defineConfig } = require('eslint-define-config')

module.exports = defineConfig({
  root: true,
  extends: [
    'zzjtnb/basic',
  ],
})

You don't need .eslintignore normally as it has been provided by the preset.

Add script for package.json

For example:

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

Config VS Code auto fix

Install VS Code ESLint extension and create .vscode/settings.json

{
  "prettier.enable": false,
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "eslint.validate": [
    "javascript",
    "typescript",
    "html",
    "vue",
    "markdown",
    "json",
    "jsonc",
    "yaml",
    "yml"
  ]
}

Contents:

ESLint configs: for all:

  • zzjtnb

for js|html|yaml|json|jsonc|md:

  • zzjtnb/basic

for typescript:

  • zzjtnb/ts

For vue and typescript or javaScript:

  • zzjtnb/vue

for js|html|yaml|json|jsonc|md:

  • zzjtnb-basic

for typescript:

  • zzjtnb-ts

For vue and typescript or javaScript:

  • zzjtnb-vue

All (zzjtnb) includes:

/* eslint-env node */
// @ts-check
const { defineConfig } = require('eslint-define-config')

module.exports = defineConfig({
  root: true,
  extends: [
    'zzjtnb',
    // 'zzjtnb/basic',
    // 'zzjtnb/ts',
    // 'zzjtnb/vue',
    // "zzjtnb-basic"
    // "zzjtnb-ts"
    // 'zzjtnb-vue',
  ],
})

License

MIT License © 2022 争逐

FAQs

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