No description
Find a file
2024-10-03 00:01:50 +13:00
configs 2.0.0 2024-10-03 00:01:50 +13:00
test Adding the original v1.0.0 release 2024-10-02 23:48:26 +13:00
.gitignore Added files 2024-10-01 19:04:25 +13:00
eslint.config.js 2.0.0 2024-10-03 00:01:50 +13:00
index.js Adding the original v1.0.0 release 2024-10-02 23:48:26 +13:00
LICENSE Initial commit 2024-09-30 19:44:33 -07:00
package.json 2.0.0 2024-10-03 00:01:50 +13:00
pnpm-lock.yaml 2.0.0 2024-10-03 00:01:50 +13:00
README.md Forgot to update the README file 2024-10-02 23:53:19 +13:00
tsconfig.json 2.0.0 2024-10-03 00:01:50 +13:00

@valkyriecoms/eslint-plugin

@valkyriecoms/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 @valkyriecoms/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:@valkyriecoms/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