Last active
July 27, 2024 20:50
-
-
Save PaulRBerg/350d170175a97cccd192e42afc3e5af1 to your computer and use it in GitHub Desktop.
Experimental flat config `eslint.config.js` for my TypeScript template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import js from "@eslint/js"; | |
import globals from "globals"; | |
import prettierConfig from "eslint-config-prettier"; | |
import typescriptEslintRecommended from "@typescript-eslint/eslint-plugin/configs/recommended"; | |
import typescriptEslint from "@typescript-eslint/eslint-plugin"; | |
export default [ | |
js.configs.recommended, | |
typescriptEslintRecommended, | |
prettierConfig, | |
{ | |
files: ["src/**/*.ts"], | |
languageOptions: { | |
globals: globals.node, | |
parser: "@typescript-eslint/parser", | |
parserOptions: { | |
project: "tsconfig.json", | |
}, | |
}, | |
plugins: { | |
"@typescript-eslint": typescriptEslint, | |
}, | |
rules: { | |
"@typescript-eslint/no-floating-promises": [ | |
"error", | |
{ | |
ignoreIIFE: true, | |
ignoreVoid: true, | |
}, | |
], | |
"@typescript-eslint/no-inferrable-types": "off", | |
"@typescript-eslint/no-unused-vars": [ | |
"error", | |
{ | |
argsIgnorePattern: "_", | |
varsIgnorePattern: "_", | |
}, | |
], | |
}, | |
}, | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment