No description
Find a file
2025-07-01 22:26:34 +12:00
configs Update configs/typescript.js 2025-07-01 22:00:59 +12:00
test Adding the original v1.0.0 release 2024-10-02 23:48:26 +13:00
.gitignore fix reflect @typescript-eslint/func-call-spacing deprecation 2025-07-01 22:00:02 +12:00
eslint.config.js Final fix for 2.0.0 2024-10-03 00:14:11 +13:00
index.js 2.0.3 2024-10-03 00:31:32 +13:00
LICENSE fix reflect @typescript-eslint/func-call-spacing deprecation 2025-07-01 22:00:02 +12:00
package.json I had the wrong name in the package.json file. 2025-07-01 22:16:15 +12:00
pnpm-lock.yaml Fixed some versioning mismatch. 2025-07-01 22:09:18 +12:00
README.md Updated README.md 2025-07-01 22:26:34 +12:00
tsconfig.json 2.0.0 2024-10-03 00:01:50 +13:00

@valkyrie-dev/eslint-plugin

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

Installation

First, install the plugin using npm.

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

Usage

Create eslint.config.js file and write as follows

import pluginValkyrie from '@valkyrie-dev/eslint-plugin';
import tsParser from '@typescript-eslint/parser';

export default [
	...pluginValkyrie.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