1.1.8 • Published 4 months ago

@schoero/configs v1.1.8

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

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][javascriptreact][json][json5][jsonc][typescript][typescriptreact]": {
    "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"
  }
}
1.1.8

4 months ago

1.1.7

5 months ago

1.1.6

5 months ago

1.1.5

5 months ago

1.1.4

5 months ago

1.1.1

6 months ago

1.1.0

6 months ago

1.1.3

6 months ago

1.1.2

6 months ago

1.0.40

6 months ago

1.0.37

6 months ago

1.0.36

6 months ago

1.0.35

6 months ago

1.0.39

6 months ago

1.0.38

6 months ago

1.0.19

8 months ago

1.0.18

8 months ago

1.0.17

8 months ago

1.0.16

8 months ago

1.0.22

8 months ago

1.0.21

8 months ago

1.0.20

8 months ago

1.0.26

7 months ago

1.0.25

8 months ago

1.0.24

8 months ago

1.0.23

8 months ago

1.0.29

7 months ago

1.0.28

7 months ago

1.0.27

7 months ago

1.0.33

6 months ago

1.0.32

6 months ago

1.0.31

6 months ago

1.0.30

6 months ago

1.0.34

6 months ago

1.0.15

8 months ago

1.0.14

8 months ago

1.0.13

9 months ago

1.0.12

9 months ago

1.0.9

9 months ago

1.0.8

9 months ago

1.0.11

9 months ago

1.0.10

9 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

12 months ago

0.0.0-beta.35

12 months ago

0.0.0-beta.34

12 months ago

0.0.0-beta.31

12 months ago

0.0.0-beta.33

12 months ago

0.0.0-beta.32

12 months ago

0.0.0-beta.30

1 year ago

0.0.0-beta.29

1 year ago

0.0.0-beta.27

1 year ago

0.0.0-beta.26

1 year ago

0.0.0-beta.25

1 year ago

0.0.0-beta.20

1 year ago

0.0.0-beta.22

1 year ago

0.0.0-beta.21

1 year ago

0.0.0-beta.24

1 year ago

0.0.0-beta.23

1 year ago

0.0.0-beta.17

1 year ago

0.0.0-beta.16

1 year ago

0.0.0-beta.19

1 year ago

0.0.0-beta.18

1 year ago

0.0.0-beta.9

1 year ago

0.0.0-beta.7

1 year ago

0.0.0-beta.8

1 year ago

0.0.0-beta.5

1 year ago

0.0.0-beta.6

1 year ago

0.0.0-beta.15

1 year ago

0.0.0-beta.14

1 year ago

0.0.0-beta.3

1 year ago

0.0.0-beta.4

1 year ago

0.0.0-beta.11

1 year ago

0.0.0-beta.10

1 year ago

0.0.0-beta.13

1 year ago

0.0.0-beta.12

1 year ago

0.0.0-beta.1

1 year ago

0.0.0-beta.2

1 year ago

0.0.0-beta.0

1 year ago