1+ import { defineConfig , globalIgnores } from "eslint/config" ;
2+ import typescriptEslintEslintPlugin from "@typescript-eslint/eslint-plugin" ;
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 defineConfig ( [ globalIgnores ( [ "*" , "!src" , "src/__tests__" ] ) , {
18+ extends : compat . extends ( "prettier" ) ,
19+
20+ plugins : {
21+ "@typescript-eslint" : typescriptEslintEslintPlugin ,
22+ } ,
23+
24+ languageOptions : {
25+ parser : tsParser ,
26+ ecmaVersion : 5 ,
27+ sourceType : "script" ,
28+
29+ parserOptions : {
30+ project : "./tsconfig.json" ,
31+ } ,
32+ } ,
33+
34+ rules : {
35+ "@typescript-eslint/explicit-function-return-type" : "off" ,
36+ "@typescript-eslint/no-explicit-any" : "off" ,
37+ "@typescript-eslint/no-empty-function" : "warn" ,
38+ "@typescript-eslint/no-namespace" : "off" ,
39+ "@typescript-eslint/no-use-before-define" : "off" ,
40+ } ,
41+ } , {
42+ files : [ "./src/configs.ts" , "./src/utils/Jagex.ts" , "./src/lib/RuneScape.ts" ] ,
43+
44+ rules : {
45+ "@typescript-eslint/camelcase" : "off" ,
46+ } ,
47+ } ] ) ;
0 commit comments