Socket
Socket
Sign inDemoInstall

@schoero/configs

Package Overview
Dependencies
43
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @schoero/configs

This repository contains shared configuration files used to configure my personal development environment and projects.


Version published
Weekly downloads
353
increased by620.41%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Shared configuration files

This repository contains shared configuration files used to configure my personal development environment and projects.

  • eslint
  • cspell
  • markdownlint
  • vite
  • tsconfig
  • unwritten
  • changelogen

Installation

npm i --save-dev @schoero/configs

VSCode

// .vscode/settings.json
{

  // eslint
  "[javascript]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
  },
  "[json]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
  },
  "[json5]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
  },
  "[jsonc]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
  },
  "[typescript]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
  },
  "eslint.validate": ["javascript", "typescript", "json", "jsonc", "json5", "yaml"],

  // markdown
  "[markdown]": {
    "editor.defaultFormatter": "DavidAnson.vscode-markdownlint",
    "editor.rulers": [
      40,
      80,
      119
    ],
    "editor.wordWrapColumn": 119
  },

  // prettier
  "prettier.enable": false,

  // vscode
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit",
    "source.fixAll.markdownlint": "explicit",
    "source.organizeImports": "never"
  },
  "editor.formatOnSave": false,
  "editor.rulers": [
    119
  ],
  "search.exclude": {
    "lib": true
  },

  // file nesting
  "explorer.fileNesting.enabled": true,
  "explorer.fileNesting.expand": false,
  "explorer.fileNesting.patterns": {
    "*.js": "$(capture).test.js,$(capture).cjs,$(capture).mjs,$(capture).d.ts,$(capture).d.ts.map,$(capture).js.map",
    "*.ts": "$(capture).test.ts,$(capture).test.snap,$(capture).test-d.ts"
  },

  "typescript.preferences.autoImportFileExcludePatterns": [
    "@types/node/test.d.ts"
  ],

  // es module import
  "typescript.preferences.importModuleSpecifier": "non-relative",
  "typescript.preferences.importModuleSpecifierEnding": "minimal",
  "typescript.preferences.useAliasesForRenames": true,

  // typescript
  "typescript.tsdk": "node_modules/typescript/lib"
}
// .vscode/extensions.json
{
  "recommendations": [
    "dbaeumer.vscode-eslint",
    "DavidAnson.vscode-markdownlint",
    "streetsidesoftware.code-spell-checker"
  ]
}
// .vscode/launch.json
{
  "configurations": [
    {
      "args": [
        "run",
        "${relativeFileDirname}/${fileBasenameNoExtension}"
      ],
      "autoAttachChildProcesses": true,
      "console": "integratedTerminal",
      "name": "debug current test file",
      "program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
      "request": "launch",
      "skipFiles": ["<node_internals>/**", "**/node_modules/**"],
      "smartStep": true,
      "type": "node"
    },
    {
      "args": [
        "run",
        "${relativeFileDirname}/${fileBasenameNoExtension}"
      ],
      "autoAttachChildProcesses": true,
      "console": "integratedTerminal",
      "name": "debug current test file with node internals",
      "program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
      "request": "launch",
      "skipFiles": [],
      "smartStep": true,
      "type": "node"
    }
  ],
  "version": "0.2.0"
}

Scripts

// package.json
{
  "scripts": {
    // vite
    "build": "vite build",
    "prebuild": "npm run typecheck && npm run lint && npm run spellcheck",
    "typecheck": "tsc --noEmit",

    // eslint
    "eslint": "eslint --ext .ts,.tsx,.js,.jsx,.json,.jsonc,.yml,.md .",
    "eslint:ci": "npm run eslint -- --max-warnings 0",
    "eslint:fix": "npm run eslint -- --fix",
    "lint": "npm run eslint && npm run markdownlint",
    "lint:ci": "npm run eslint:ci && npm run markdownlint:ci",
    "lint:fix": "npm run eslint:fix && npm run markdownlint:fix",

    // markdownlint
    "markdownlint": "markdownlint-cli2 '**/*.md' '#node_modules'",
    "markdownlint:ci": "npm run markdownlint",
    "markdownlint:fix": "npm run markdownlint -- --fix",

    // changelogen
    "postrelease:alpha": "npm run postrelease",
    "postrelease:beta": "npm run postrelease",
    "postrelease:latest": "eslint --fix package.json &&  markdownlint-cli2-fix 'CHANGELOG.md'",
    "prerelease:alpha": "npm run test -- --run && npm run build",
    "prerelease:beta": "npm run test -- --run && npm run build",
    "prerelease:latest": "npm run test -- --run && npm run build",
    "publish:alpha": "npm run publish:latest -- --publishTag alpha",
    "publish:beta": "npm run publish:latest -- --publishTag beta",
    "publish:latest": "changelogen gh release && changelogen --publish",
    "release:alpha": "npm run release -- --prerelease alpha",
    "release:beta": "npm run release -- --prerelease beta",
    "release:latest": "changelogen --bump --output --no-tag",

    // cspell
    "spellcheck": "cspell .",
    "spellcheck:ci": "npm run spellcheck -- --no-progress",
    "test": "vitest -c ./vite.config.ts"
  }
}

FAQs

Last updated on 04 May 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc