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

eslint-plugin-ckeditor5-rules

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-ckeditor5-rules

CKEditor 5 ESLint preset.

  • 8.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12K
increased by7.31%
Maintainers
1
Weekly downloads
 
Created
Source

CKEditor 5 ESLint plugins

npm version Dependency Status

A set of plugins used by the CKEditor 5 team for Eslint

By default this plugin is added to our eslint-config-ckeditor5 preset.

Usage

npm i --save-dev eslint-plugin-ckeditor5-rules

Configure ESLint with a .eslintrc file using the following contents:

{
	// ...
	plugins: [
		// ...
		'ckeditor5-rules' // Add the plugin to the linter.
	],
	rules: {
		'ckeditor5-rules/no-relative-imports': 'error',
		'ckeditor5-rules/license-header': [ 'error', {
			headerLines: [
				'/**',
				' * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.',
				' * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license',
				' */'
			]
		} ]
		// ...
	}
	// ...
}

Rules

no-relative-imports

A rule that inspects for relative imports to other CKEditor 5's packages:

// Incorrect import:
import Position from '../../ckeditor5-engine/src/model/position';

// Will be fixed to:
import Position from '@ckeditor/ckeditor5-engine/src/model/position';

license-header

This rule checks if each file starts with proper @license block comment. It requires configuration:

rules: {
	'ckeditor5-rules/license-header': [ 'error', {
		headerLines: [
			'/**',
			' * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.',
			' * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license',
			' */'
		]
	} ]
}

Keywords

FAQs

Package last updated on 15 Oct 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