logologo

Notes

Quick notes / tips

.eslintrc

2022/06/09

Install

pnpm add -D eslint @antfu/eslint-config

Configuration

{
  "extends": "@antfu",
  "rules": {
    "no-undef": "off",
    "comma-dangle": [
      "warn",
      "never"
    ],
    "@typescript-eslint/comma-dangle": "off",
    "arrow-parens": [
      "warn",
      "as-needed"
    ],
    "no-console": "off",
    "vue/max-attributes-per-line": ["error", {
    "singleline": {
      "max": 3
    },
    "multiline": {
      "max": 3
    }
  }]
  }
}

package.json

{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}

.prettierrc

2022/01/13

{
  "semi": false,
  "singleQuote": true,
  "trailingComma": "none",
  "arrowParens": "avoid"
}
CC BY-NC-SA 4.0 2021-PRESENT © MerlinAlex