/configs

:gear: The config presets of me.

Primary LanguageJavaScriptMIT LicenseMIT

configs

Opinionable configs

ESLint config

pnpm add eslint typescript @ntnyq/eslint-config prettier @ntnyq/prettier-config -D

Configuration

Create a file .eslintrc.json in project root:

{
  "root": true,
  "extends": ["@ntnyq"]
}

Add lint scripts in package.json:

{
  "scripts": {
    "lint": "eslint ."
  }
}

Intergrated with VS Code:

{
  "prettier.enable": true,
  "eslint.enable": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "always"
  },
  "eslint.validate": [
    "vue",
    "html",
    "yaml",
    "json",
    "jsonc",
    "json5",
    "markdown",
    "javascript",
    "typescript",
    "javascriptreact",
    "typescriptreact"
  ]
}

Prettier config

pnpm add prettier @ntnyq/prettier-config -D

Configuration

Config in package.json:

{
  "prettier": "@ntnyq/prettier-config"
}

Prior Art

License

MIT License © 2020-PRESENT ntnyq