🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

coc-tighten-lint

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coc-tighten-lint

tlint (Tighten linter for Laravel) extension for coc.nvim

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

coc-tighten-lint

tlint (Tighten linter for Laravel) extension for coc.nvim.

coc-tighten-lint-demo

Install

CocInstall:

:CocInstall coc-tighten-lint

vim-plug:

Plug 'yaegassy/coc-tighten-lint', {'do': 'yarn install --frozen-lockfile'}

Features

  • Linter by tlint lint
  • CodeAction (autoFix) by tlint format
  • Built-in installer
  • Supports tlint.json configuration file

Detect tool: tlint

  • tighten-lint.toolPath setting
  • vendor/bin/tlint (project)
  • builtin (Installation commands are also provided)
    • Mac/Linux: ~/.config/coc/extensions/coc-tighten-lint-data/tlint/vendor/bin/tlint
    • Windows: ~/AppData/Local/coc/extensions/coc-tighten-lint-data/tlint/vendor/bin/tlint

Bult-in install

:CocComannd tighten-lint.install

Activation Events

  • "onLanguage:php"
  • "onLanguage:blade"

Configuration options

  • tighten-lint.enable: Enable coc-tighten-lint extension, default: true
  • tighten-lint.toolPath: The path to the tlint (Absolute path), default: ""
  • tighten-lint.lintOnOpen: Lint file on opening, default: true
  • tighten-lint.lintOnChange: Lint file on change, default: true
  • tighten-lint.lintOnSave: Lint file on save, default: true
  • tighten-lint.defaultSeverity: Severity of violations, valid option "error", "warning", "info", "hint", default: "error"
  • tighten-lint.severities: Source to severity mappings, default: {}
  • tighten-lint.only: Policies to include, default: []

Example Configuration ("coc-settings.json" or ".vim/coc-settings.json")

{
  // ...snip
  "tighten-lint.defaultSeverity": "warning",
  "tighten-lint.only": [
      "AlphabeticalImports",
      "NoInlineVarDocs",
      "ImportFacades"
  ],
  "tighten-lint.severities": {
      "NoInlineVarDocs": "info"
  },
  // ...snip
}

tlint.json configuration file

If you wish to use a configuration file you should place the tlint.json file in the root of your project folder in the required format e.g.

example: tslint.json

{
    "preset": "laravel",
    "disabled": ["NoInlineVarDocs"],
    "excluded": ["tests/"]
}

Commands

  • tighten-lint.install: Install tlint

Code Actions

  • Run: tighten-lint.autoFix

Thanks

License

MIT

This extension is built with create-coc-extension

Keywords

coc.nvim

FAQs

Package last updated on 07 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts