SneakyLint VS Code Extension
Overview
SneakyLint is a VS Code extension designed to help developers identify and address hidden or suppressed issues in their codebase. It specifically focuses on detecting instances where linting violations have been suppressed, ensuring that potential code quality issues are not overlooked.
By surfacing these hidden violations, SneakyLint empowers teams to maintain higher code quality standards and fosters better collaboration by making code issues more transparent.
Features
- Detect ESLint Disable Comments: Automatically scans your code for
eslint-disable
comments and highlights them as warnings.
- Rule-Specific Documentation Links: Provides direct links to the documentation of the disabled rules for quick reference.
- Real-Time Feedback: Updates warnings dynamically as you edit your code.
- Warning Panel: Displays a consolidated view of all detected warnings for better visibility.
- Supports TypeScript: Fully compatible with TypeScript files.
Installation
- Open the Extensions view in VS Code (
Ctrl+Shift+X
or Cmd+Shift+X
on macOS).
- Search for "SneakyLint" in the marketplace.
- Click "Install" to add the extension to your VS Code environment.
Usage
- Open a TypeScript file in your workspace.
- SneakyLint will automatically scan the file for
eslint-disable
comments.
- Detected issues will appear as warnings in the Problems panel and inline in the editor
- Hover over a warning to view details, including a link to the rule's documentation.
- Detected issues together with it's code-owner will be visible in sneakyLint panel.
Properties
codeOwnersPath: Specifies the path to the code-owners.json
file.
- Type: String
- Default:
\code-owners.json
- Description:
- This property allows you to define the location of the
code-owners.json
file in your project. The file contains information about code ownership, such as team members, product owners, and file paths.
- SneakyLint uses this file to display code ownership details in the summary panel.
Example Configuration:
To specify the path to the code-owners.json
file, add the following to your .vscode/settings.json
file:
{
"sneakyLint.codeOwnersPath": "path/to/code-owners.json"
}
Note: The schema of the code owners file that is supported is the following:
{
"$schema": "http://json-schema.org/schema",
"id": "/CodeOwnersFileSchema",
"title": "Code owners",
"description": "Schema for validating the code-owners file in the Senses project",
"type": "object",
"properties": {
"teams": {
"type": "object",
"patternProperties": {
".+": {
"type": "object",
"properties": {
"productOwner": {
"description": "Email address/Name of Product Owner of the team",
"type": "string",
},
"functionalMailbox": {
"description": "Functional Mailbox email address of the team",
"type": "string",
},
"members": {
"description": "Email addresses/Name for each member of the team.",
"type": "array",
"items": {
"type": "string",
},
},
"paths": {
"description": "Paths to files or directories which are owned by the team.",
"type": "array",
"items": {
"type": "string",
},
}
}
}
}
}
}
}
dashboardLink: Specifies the organization's internal d dashboard link.
- Type: String
- Default:
""
(empty string, meaning no link is set by default)
- Description:
- This property allows you to define a link to your organization's internal dashboard. SneakyLint uses this link to provide quick access to additional resources or guidelines related to your organization.
Example Configuration:
To set the documentation link, add the following to your .vscode/settings.json
file:
{
"sneakyLint.dashboardLink": "https://myInternalDashboard/teams/"
}
showSummary: Controls whether the summary panel is displayed in the editor.
- Type: Boolean
- Default:
true
(the summary panel will be displayed by default)
- Description:
- If set to
true
, the summary panel will appear in the editor, showing detected issues and their corresponding code owners.
- If set to
false
, the summary panel will not be displayed.
Example Configuration:
To hide the summary panel, add the following to your .vscode/settings.json
file:
{
"sneakyLint.showSummary": false
}
documentationLink: Specifies the organization's internal documentation link.
- Type: String
- Default:
""
(empty string, meaning no link is set by default)
- Description:
- This property allows you to define a link to your organization's internal documentation. SneakyLint uses this link to provide quick access to additional resources or guidelines related to linting rules or code ownership.
Example Configuration:
To set the documentation link, add the following to your .vscode/settings.json
file:
{
"sneakyLint.documentationLink": "https://myInternalDocumentaion/"
}