Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lvjiaxuan/vscode-eslint-disable
Intelligently disable ESLint rules for VS Code.
https://github.com/lvjiaxuan/vscode-eslint-disable
eslint eslint-disable vscode vscode-extension
Last synced: about 1 month ago
JSON representation
Intelligently disable ESLint rules for VS Code.
- Host: GitHub
- URL: https://github.com/lvjiaxuan/vscode-eslint-disable
- Owner: lvjiaxuan
- License: mit
- Created: 2022-08-17T08:13:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-14T07:46:53.000Z (4 months ago)
- Last Synced: 2024-09-14T19:04:52.854Z (4 months ago)
- Topics: eslint, eslint-disable, vscode, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=lvjiaxuan.vscode-eslint-disable
- Size: 1.42 MB
- Stars: 19
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Intelligently disable ESLint rules for VS Code.
![](https://github.com/lvjiaxuan/vscode-eslint-disable/actions/workflows/ci.yml/badge.svg)
[![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/lvjiaxuan.vscode-eslint-disable?color=%232ba1f1&logo=visual-studio-code&logoColor=%232ba1f1)
](https://marketplace.visualstudio.com/items?itemName=lvjiaxuan.vscode-eslint-disable)
[![Visual Studio Marketplace Installs](https://img.shields.io/visual-studio-marketplace/azure-devops/installs/total/lvjiaxuan.vscode-eslint-disable?label=Installs&logo=visualstudiocode&logoColor=%232ba1f1)
](https://marketplace.visualstudio.com/items?itemName=lvjiaxuan.vscode-eslint-disable)
[![GitHub Repo stars](https://img.shields.io/github/stars/lvjiaxuan/vscode-eslint-disable)](https://github.com/lvjiaxuan/vscode-eslint-disable)## Usage
1. Place the cursor on the problem line at any position.
2. Press `ctrl + alt + d` to insert `// eslint-disable-next-line "explicit rule(s)"`.For multiple lines, it inserts block comments:
```js
/* eslint-disable no-console */
console.log('hello')
console.log('world')
/* eslint-enable no-console */
```> [!TIP]
> For multiple lines, you don't need to select the full text of lines. Just ensure the selection ranges cover the problem lines.### More usages
1. `ctrl + alt + e`: disable rule(s) of line(s) for entire file.
2. `ctrl + alt + a`: disable all rule(s) for entire file.## Motivation
The official ESLint extension has few steps to disable rules as:
1. Place cursor on the problem line - (It doesn't support for multiple lines.).
2. Press `ctrl + .` to open the *Quick Fix* menu.
3. Select which rule to disable - (It doesn't support for multiple rules).With this ext, you can disable multiple rules for multiple lines with one step.
## Preview
Single line.
![single](assets/1.gif)
Multiple lines, you can press `ctrl + d` to select another pair of rule(s) on the other side.
![multiple](assets/2.gif)