1.1.8 • Published 1 month ago

@schoero/configs v1.1.8

Weekly downloads
-
License
MIT
Repository
-
Last release
1 month 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

1 month ago

1.1.7

2 months ago

1.1.6

2 months ago

1.1.5

2 months ago

1.1.4

2 months ago

1.1.1

3 months ago

1.1.0

3 months ago

1.1.3

3 months ago

1.1.2

3 months ago

1.0.40

3 months ago

1.0.37

3 months ago

1.0.36

3 months ago

1.0.35

3 months ago

1.0.39

3 months ago

1.0.38

3 months ago

1.0.19

5 months ago

1.0.18

5 months ago

1.0.17

5 months ago

1.0.16

5 months ago

1.0.22

5 months ago

1.0.21

5 months ago

1.0.20

5 months ago

1.0.26

4 months ago

1.0.25

4 months ago

1.0.24

4 months ago

1.0.23

4 months ago

1.0.29

4 months ago

1.0.28

4 months ago

1.0.27

4 months ago

1.0.33

3 months ago

1.0.32

3 months ago

1.0.31

3 months ago

1.0.30

3 months ago

1.0.34

3 months ago

1.0.15

5 months ago

1.0.14

5 months ago

1.0.13

6 months ago

1.0.12

6 months ago

1.0.9

6 months ago

1.0.8

6 months ago

1.0.11

6 months ago

1.0.10

6 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago

0.0.0-beta.35

8 months ago

0.0.0-beta.34

9 months ago

0.0.0-beta.31

9 months ago

0.0.0-beta.33

9 months ago

0.0.0-beta.32

9 months ago

0.0.0-beta.30

9 months ago

0.0.0-beta.29

9 months ago

0.0.0-beta.27

10 months ago

0.0.0-beta.26

11 months ago

0.0.0-beta.25

11 months ago

0.0.0-beta.20

11 months ago

0.0.0-beta.22

11 months ago

0.0.0-beta.21

11 months ago

0.0.0-beta.24

11 months ago

0.0.0-beta.23

11 months ago

0.0.0-beta.17

11 months ago

0.0.0-beta.16

11 months ago

0.0.0-beta.19

11 months ago

0.0.0-beta.18

11 months ago

0.0.0-beta.9

11 months ago

0.0.0-beta.7

11 months ago

0.0.0-beta.8

11 months ago

0.0.0-beta.5

11 months ago

0.0.0-beta.6

11 months ago

0.0.0-beta.15

11 months ago

0.0.0-beta.14

11 months ago

0.0.0-beta.3

11 months ago

0.0.0-beta.4

11 months ago

0.0.0-beta.11

11 months ago

0.0.0-beta.10

11 months ago

0.0.0-beta.13

11 months ago

0.0.0-beta.12

11 months ago

0.0.0-beta.1

11 months ago

0.0.0-beta.2

11 months ago

0.0.0-beta.0

11 months ago