@vcsuite/eslint-config

3.0.7 • Public • Published

eslint-config-vcs

A base eslint config to be used for all virtualcity packages.

  1. npm i -D eslint @vcsuite/eslint-config
  2. Add the following script sections to your package.json, e.g.
    "lint:js": "eslint . --ext .vue,.js,.cjs,.mjs,.ts,.cts,.mts",
    "lint:prettier": "prettier --check .",
    "lint": "npm run lint:js && npm run lint:prettier",
    "format": "prettier --write --list-different . && npm run lint:js -- --fix",
  1. Extend the vcs configuration for your environment, e.g. "eslintConfig": { "extends": "@vcsuite/eslint-config/env" } where env can be one of vue, vue3-ts, node, node-ts or mocha
  2. Typescript: Use the following section to add parserOptions as needed
 "eslintConfig": {
    "extends": [
      "@vcsuite/eslint-config/vue3-ts"
    ],
    "overrides": [
      {
        "files": [
          "*.ts",
          "*.vue"
        ],
        "parserOptions": {
          "project": [
            "./tsconfig.json"
          ]
        }
      }
    ]
  },
  1. use PRETTIER. Add "prettier": "@vcsuite/eslint-config/prettier.js" to package.json
  2. add .prettierignore as needed
  3. Change IDE Settings to run prettier on save
  4. Run npm run lint in CI/CD

Readme

Keywords

Package Sidebar

Install

npm i @vcsuite/eslint-config

Weekly Downloads

225

Version

3.0.7

License

MIT

Unpacked Size

12.2 kB

Total Files

18

Last publish

Collaborators

  • bkuster
  • jbolling