Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-annotation

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-annotation

Lint rules to validate and auto-correct annotation-based policies

  • 1.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
decreased by-10.12%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-annotation

NPM version Build Status

An ESLint plugin that collects rules to exceptionally validate and autocorrect code with annotations in comments.

annotation/sortannotation/sort-keys
sortsort-keys

Installation

You’ll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-annotation:

npm i eslint-plugin-annotation --save-dev

Usage

Here’s a suggested ESLint configuration that:

{
  "parserOptions": { ... }, // Nothing changed
  "plugins": [..., "annotation"], // Add 'annotation' next to old plugins
  "rules": {
    ...
    // Add below rules next to old rules 
    'annotation/format-date': 'error',
    'annotation/sort-keys': 'error',
    'annotation/sort': 'error',
  }
}

Supported Rules

다음은 @format-date, @sort-keys, @sort 어노테이션을 표로 정리한 것입니다. @sort-keys@sort는 자동 수정을 지원하고, @format-date는 자동 수정을 지원하지 않음을 아이콘으로 표시했습니다.

eslint-plugin-annotation

RuleDescriptionAutofix
format-dateEnsure dates in strings match the specified @format-date annotation
sort-keysSort interface properties or object keys if has @sort-keys annotation✔️
sortSort array values if has @sort annotation✔️

License

BSD License

Keywords

FAQs

Package last updated on 24 May 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc