1.4.1 • Published 4 years ago
eslint-plugin-lvksh v1.4.1
Javascript Style Guide
The Official lvkdotsh javascript/typescript style-guide and linting rules.
Installation
Using npm:
npm install --save-dev eslint eslint-plugin-lvkshor if you prefer to use the yarn package manager:
yarn add -D eslint eslint-plugin-lvkshUsage
Recommended .eslintrc.json:
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2021
},
"extends": [
"plugin:lvksh/recommended"
],
"ignorePatterns": ["!**/*"],
"plugins": ["lvksh"],
"env": {
"node": true
},
"rules": {}
}The linting command you probably want to use. (Add this to your scripts section)
"lint": "eslint -c .eslintrc.json --ext .ts ./src"Or if your project also has tests
"lint": "eslint -c .eslintrc.json --ext .ts ./src ./tests"You might also have to install @typescript-eslint/parser, and probably typescript.
In addition to the above a .prettierrc file is also recommended with the following contents.
{
"tabWidth": 4,
"useTabs": false,
"singleQuote": true
}Contributors
LICENSE
This package is licensed under the MIT.