Skip to content

Commit be0bad7

Browse files
committed
feat: Add dotenv support and update ESLint configuration
1 parent 73b5767 commit be0bad7

4 files changed

Lines changed: 675 additions & 570 deletions

File tree

eslint.config.mjs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
2+
import globals from "globals";
3+
import tsParser from "@typescript-eslint/parser";
4+
import path from "node:path";
5+
import { fileURLToPath } from "node:url";
6+
import js from "@eslint/js";
7+
import { FlatCompat } from "@eslint/eslintrc";
8+
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = path.dirname(__filename);
11+
const compat = new FlatCompat({
12+
baseDirectory: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
allConfig: js.configs.all
15+
});
16+
17+
export default [
18+
...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
19+
{
20+
plugins: {
21+
"@typescript-eslint": typescriptEslint,
22+
},
23+
24+
languageOptions: {
25+
globals: {
26+
...globals.browser,
27+
...globals.commonjs,
28+
},
29+
30+
parser: tsParser,
31+
ecmaVersion: "latest",
32+
sourceType: "script",
33+
},
34+
35+
rules: {},
36+
},
37+
];

0 commit comments

Comments
 (0)