1+ import { defineConfig , globalIgnores } from "eslint/config" ;
2+ import typescriptEslint from "@typescript-eslint/eslint-plugin" ;
3+ import globals from "globals" ;
4+ import tsParser from "@typescript-eslint/parser" ;
5+ import github from 'eslint-plugin-github'
6+ import stylistic from '@stylistic/eslint-plugin'
7+
8+ export default defineConfig ( [
9+ github . getFlatConfigs ( ) . browser ,
10+ github . getFlatConfigs ( ) . recommended ,
11+ github . getFlatConfigs ( ) . react ,
12+ ...github . getFlatConfigs ( ) . typescript ,
13+ globalIgnores ( [ "**/dist/" , "**/lib/" , "**/node_modules/" , "**/jest.config.js" ] ) ,
14+ {
15+ plugins : {
16+ "@typescript-eslint" : typescriptEslint ,
17+ '@stylistic' : stylistic ,
18+ } ,
19+
20+ languageOptions : {
21+ globals : {
22+ ...globals . node ,
23+ } ,
24+
25+ parser : tsParser ,
26+ ecmaVersion : 9 ,
27+ sourceType : "module" ,
28+
29+ parserOptions : {
30+ project : "./tsconfig.json" ,
31+ } ,
32+ } ,
33+
34+ rules : {
35+ "i18n-text/no-en" : "off" ,
36+ "eslint-comments/no-use" : "off" ,
37+ "import/no-namespace" : "off" ,
38+ "import/no-nodejs-modules" : "off" ,
39+ "no-unused-vars" : "off" ,
40+
41+ "@typescript-eslint/no-unused-vars" : [ "error" , {
42+ argsIgnorePattern : "^_" ,
43+ varsIgnorePattern : "^_" ,
44+ caughtErrorsIgnorePattern : "^_" ,
45+ } ] ,
46+
47+ "@typescript-eslint/explicit-member-accessibility" : [ "error" , {
48+ accessibility : "no-public" ,
49+ } ] ,
50+
51+ "@typescript-eslint/no-require-imports" : "error" ,
52+ "@typescript-eslint/array-type" : "error" ,
53+ "@typescript-eslint/await-thenable" : "error" ,
54+ "@typescript-eslint/ban-ts-comment" : "error" ,
55+ camelcase : "off" ,
56+ "@typescript-eslint/consistent-type-assertions" : "error" ,
57+
58+ "@typescript-eslint/explicit-function-return-type" : [ "error" , {
59+ allowExpressions : true ,
60+ } ] ,
61+
62+ "@stylistic/func-call-spacing" : [ "error" , "never" ] ,
63+ semi : "off" ,
64+ "@stylistic/semi" : [ "error" , "never" ] ,
65+ "@stylistic/type-annotation-spacing" : "error" ,
66+ "@typescript-eslint/no-array-constructor" : "error" ,
67+ "@typescript-eslint/no-empty-interface" : "error" ,
68+ "@typescript-eslint/no-explicit-any" : "error" ,
69+ "@typescript-eslint/no-extraneous-class" : "error" ,
70+ "@typescript-eslint/no-for-in-array" : "error" ,
71+ "@typescript-eslint/no-inferrable-types" : "error" ,
72+ "@typescript-eslint/no-misused-new" : "error" ,
73+ "@typescript-eslint/no-namespace" : "error" ,
74+ "@typescript-eslint/no-non-null-assertion" : "warn" ,
75+ "no-shadow" : "off" ,
76+ "@typescript-eslint/no-shadow" : [ "error" ] ,
77+ "@typescript-eslint/no-unnecessary-qualifier" : "error" ,
78+ "@typescript-eslint/no-unnecessary-type-assertion" : "error" ,
79+ "@typescript-eslint/no-useless-constructor" : "error" ,
80+ "@typescript-eslint/no-var-requires" : "error" ,
81+ "@typescript-eslint/prefer-for-of" : "warn" ,
82+ "@typescript-eslint/prefer-function-type" : "warn" ,
83+ "@typescript-eslint/prefer-includes" : "error" ,
84+ "@typescript-eslint/prefer-string-starts-ends-with" : "error" ,
85+ "@typescript-eslint/promise-function-async" : "error" ,
86+ "@typescript-eslint/require-array-sort-compare" : "error" ,
87+ "@typescript-eslint/restrict-plus-operands" : "error" ,
88+ "@typescript-eslint/unbound-method" : "error" ,
89+ } ,
90+ } ,
91+ ] ) ;
0 commit comments