Socket
Book a DemoInstallSign in
Socket

@misskey-dev/eslint-plugin

Package Overview
Dependencies
Maintainers
6
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@misskey-dev/eslint-plugin

An ESLint plugin designed for Misskey developers

2.1.0
latest
Source
npmnpm
Version published
Weekly downloads
4.3K
-6.77%
Maintainers
6
Weekly downloads
 
Created
Source

@misskey-dev/eslint-plugin

@misskey-dev/eslint-plugin is an ESLint plugin designed for Misskey developers. This plugin helps you write code that adheres to the coding style and best practices of the Misskey project.

Installation

First, install the plugin using npm.

npm install --save-dev eslint @misskey-dev/eslint-plugin @typescript-eslint/parser

Usage

Create eslint.config.js file and write as follows

import pluginMisskey from '@misskey-dev/eslint-plugin';
import tsParser from '@typescript-eslint/parser';

export default [
	...pluginMisskey.configs['recommended'],
	{
		files: ['**/*.js', '**/*.jsx'],
		languageOptions: {
			parserOptions: {
				ecmaVersion: 'latest',
				sourceType: 'module',
			},
		},
	},
	{
		files: ['**/*.ts', '**/*.tsx'],
		languageOptions: {
			parserOptions: {
				ecmaVersion: 'latest',
				parser: tsParser,
				project: ['./tsconfig.json'],
				sourceType: 'module',
				tsconfigRootDir: import.meta.dirname,
			},
		},
	},
];

In tsconfig, strictNullChecks must be true.

{
	"compilerOptions": {
		// ...
		"strictNullChecks": true,
		// ...
	},
}

Add the eslint task to package.json

{
	"scripts": {
		"eslint": "eslint './**/*.{js,jsx,ts,tsx}'"
	},
}

Run the task

npm run eslint

License

MIT License

Keywords

eslint

FAQs

Package last updated on 24 Jan 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.