@vcsuite/eslint-config
v3.0.8
Published
a vcs defined set of eslint rules for eslint and prettier
Downloads
4,939
Readme
eslint-config-vcs
A base eslint config to be used for all virtualcity
packages.
npm i -D eslint @vcsuite/eslint-config
- 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",
- Extend the vcs configuration for your environment, e.g.
"eslintConfig": { "extends": "@vcsuite/eslint-config/env" }
whereenv
can be one ofvue
,vue3-ts
,node
,node-ts
ormocha
- 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"
]
}
}
]
},
- use PRETTIER. Add
"prettier": "@vcsuite/eslint-config/prettier.js"
to package.json - add
.prettierignore
as needed - Change IDE Settings to run prettier on save
- Run npm run lint in CI/CD