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