@misskey-dev/eslint-plugin

1.0.0 • Public • Published

@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/eslint-plugin @typescript-eslint/parser eslint-plugin-import

Usage

Create .eslintrc.cjs file and write as follows

module.exports = {
	root: true,
	parserOptions: {
		tsconfigRootDir: __dirname,
		project: ['./tsconfig.json'],
	},
	ignorePatterns: ['**/.eslintrc.cjs'],
	extends: [
		'plugin:@misskey-dev/recommended',
	],
};

In tsconfig, strictNullChecks must be true.

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

Add the eslint task to package.json

{
  "scripts": {
    "eslint": "eslint . --ext .js,.jsx,.ts,.tsx"
  },
}

Run the task

npm run eslint

License

MIT License

Package Sidebar

Install

npm i @misskey-dev/eslint-plugin

Weekly Downloads

2,748

Version

1.0.0

License

MIT

Unpacked Size

6.82 kB

Total Files

5

Last publish

Collaborators

  • samunohito
  • kakkokari-gtyih
  • anatawa12
  • acid-chicken
  • syuilo
  • aqz