1.4.1 • Published 2 years ago

eslint-plugin-lvksh v1.4.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Javascript Style Guide

The Official lvkdotsh javascript/typescript style-guide and linting rules.

Installation

Using npm:

npm install --save-dev eslint eslint-plugin-lvksh

or if you prefer to use the yarn package manager:

yarn add -D eslint eslint-plugin-lvksh

Usage

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

npm.io

LICENSE

This package is licensed under the MIT.