eslint-plugin-resulto
v2.1.2
Published
ESLint plugin for resulto
Readme
eslint-plugin-resulto
Installation
npm install --save-dev eslint @eslint/js typescript typescript-eslint eslint-plugin-resultoConfiguration
- Create/modify your
tsconfig.json.
{
"compilerOptions": {
"strict": true
}
}- Create/modify your
ESLintconfiguration file, i.e.eslint.config.mjs.
import js from "@eslint/js";
import resulto from "eslint-plugin-resulto";
import ts from "typescript-eslint";
export default ts.config(
js.configs.recommended,
...ts.configs.recommended,
resulto.configs.recommended,
);See typescript-eslint docs for more info.
Hint
In Rust it is idiomatic to assign a must-used value to a variable named _ when
you want to purposely discard this value.
To make this work in TypeScript without making ESLint or tsc angry you need to:
- Add this rule to your
ESLintconfiguration file, i.e.eslint.config.mjs
export default ts.config({
rules: {
"@typescript-eslint/no-unused-vars": [
"warn",
{
varsIgnorePattern: "^_",
},
],
},
});- Make sure you do not have
noUnusedLocalsset totrueintsconfig.json
