1.1.8 • Published 2 months ago

@schoero/configs v1.1.8

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

2 months ago

1.1.7

3 months ago

1.1.6

3 months ago

1.1.5

4 months ago

1.1.4

4 months ago

1.1.1

4 months ago

1.1.0

4 months ago

1.1.3

4 months ago

1.1.2

4 months ago

1.0.40

4 months ago

1.0.37

4 months ago

1.0.36

4 months ago

1.0.35

4 months ago

1.0.39

4 months ago

1.0.38

4 months ago

1.0.19

6 months ago

1.0.18

6 months ago

1.0.17

6 months ago

1.0.16

6 months ago

1.0.22

6 months ago

1.0.21

6 months ago

1.0.20

6 months ago

1.0.26

5 months ago

1.0.25

6 months ago

1.0.24

6 months ago

1.0.23

6 months ago

1.0.29

5 months ago

1.0.28

5 months ago

1.0.27

5 months ago

1.0.33

4 months ago

1.0.32

4 months ago

1.0.31

4 months ago

1.0.30

4 months ago

1.0.34

4 months ago

1.0.15

6 months ago

1.0.14

6 months ago

1.0.13

7 months ago

1.0.12

7 months ago

1.0.9

7 months ago

1.0.8

7 months ago

1.0.11

7 months ago

1.0.10

7 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

10 months ago

0.0.0-beta.35

10 months ago

0.0.0-beta.34

10 months ago

0.0.0-beta.31

10 months ago

0.0.0-beta.33

10 months ago

0.0.0-beta.32

10 months ago

0.0.0-beta.30

10 months ago

0.0.0-beta.29

10 months ago

0.0.0-beta.27

11 months ago

0.0.0-beta.26

12 months ago

0.0.0-beta.25

12 months ago

0.0.0-beta.20

12 months ago

0.0.0-beta.22

12 months ago

0.0.0-beta.21

12 months ago

0.0.0-beta.24

12 months ago

0.0.0-beta.23

12 months 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