Last active
August 7, 2025 17:19
-
-
Save br4instormer/50a2b3d1dda30ea275d95f0672620947 to your computer and use it in GitHub Desktop.
ESLint 9 config file
This file contains hidden or 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 { globalIgnores } from "eslint/config"; | |
| import js from "@eslint/js"; | |
| import ts from "typescript-eslint"; | |
| import globals from "globals"; | |
| import stylistic from "@stylistic/eslint-plugin"; | |
| export default ts.config([ | |
| globalIgnores(["dist/**/*.js"]), | |
| js.configs.recommended, | |
| ts.configs.strict, | |
| ts.configs.recommended, | |
| ts.configs.stylistic, | |
| { | |
| files: ["src/**/*.ts"], | |
| languageOptions: { | |
| ecmaVersion: "latest", | |
| sourceType: "module", | |
| globals: globals.node, | |
| }, | |
| rules: { | |
| "no-empty": [ | |
| "error", | |
| { | |
| allowEmptyCatch: true, | |
| }, | |
| ], | |
| "@typescript-eslint/explicit-function-return-type": "warn", | |
| "@typescript-eslint/no-unused-vars": [ | |
| "error", | |
| { | |
| caughtErrorsIgnorePattern: "^_+$", | |
| }, | |
| ], | |
| }, | |
| }, | |
| { | |
| files: ["public/**/*.js"], | |
| languageOptions: { | |
| ecmaVersion: "latest", | |
| sourceType: "module", | |
| globals: { | |
| ...globals.browser, | |
| ...globals.es2026, | |
| }, | |
| }, | |
| }, | |
| stylistic.configs.customize({ | |
| indent: 2, | |
| semi: true, | |
| quotes: "double", | |
| severity: "error", | |
| braceStyle: "1tbs", | |
| }), | |
| ]); |
Author
br4instormer
commented
Aug 7, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment