1- {
2- "plugins" : [" jest" , " @typescript-eslint" ],
3- "extends" : [" plugin:github/recommended" ],
4- "parser" : " @typescript-eslint/parser" ,
5- "parserOptions" : {
6- "ecmaVersion" : 9 ,
7- "sourceType" : " module" ,
8- "project" : " ./tsconfig.json"
1+ import github from 'eslint-plugin-github' ;
2+ import jestPlugin from 'eslint-plugin-jest' ;
3+ import * as tseslint from 'typescript-eslint' ;
4+ import globals from 'globals' ;
5+
6+ export default [
7+ // Base configurations
8+ ...tseslint . configs . recommended ,
9+ ...tseslint . configs . stylistic ,
10+
11+ // GitHub plugin configurations
12+ github . getFlatConfigs ( ) . recommended ,
13+
14+ // TypeScript-specific linting configuration
15+ {
16+ files : [ '**/*.ts' ] ,
17+ languageOptions : {
18+ parser : tseslint . parser ,
19+ parserOptions : {
20+ ecmaVersion : 2020 ,
21+ sourceType : 'module' ,
22+ project : './tsconfig.json'
23+ } ,
24+ globals : {
25+ ...globals . node ,
26+ ...globals . es2015
27+ }
928 } ,
10- "rules" : {
29+ plugins : {
30+ jest : jestPlugin ,
31+ '@typescript-eslint' : tseslint . plugin
32+ } ,
33+ rules : {
1134 "i18n-text/no-en" : "off" ,
1235 "eslint-comments/no-use" : "off" ,
36+ "camelcase" : "off" ,
37+ "sort-imports" : "off" ,
38+ "semi" : [ "error" , "never" ] ,
1339 "import/no-namespace" : "off" ,
1440 "no-unused-vars" : "off" ,
1541 "filenames/match-regex" : "off" ,
42+ "import/no-unresolved" : "off" ,
1643 "@typescript-eslint/no-unused-vars" : "error" ,
1744 "@typescript-eslint/explicit-member-accessibility" : [ "error" , { "accessibility" : "no-public" } ] ,
1845 "@typescript-eslint/no-require-imports" : "error" ,
1946 "@typescript-eslint/array-type" : "error" ,
2047 "@typescript-eslint/await-thenable" : "error" ,
2148 "@typescript-eslint/ban-ts-comment" : "error" ,
22- "camelcase" : " off" ,
2349 "@typescript-eslint/consistent-type-assertions" : "error" ,
2450 "@typescript-eslint/explicit-function-return-type" : [ "error" , { "allowExpressions" : true } ] ,
25- "@typescript-eslint/func-call-spacing" : [" error" , " never" ],
2651 "@typescript-eslint/no-array-constructor" : "error" ,
2752 "@typescript-eslint/no-empty-interface" : "error" ,
2853 "@typescript-eslint/no-explicit-any" : "error" ,
3257 "@typescript-eslint/no-misused-new" : "error" ,
3358 "@typescript-eslint/no-namespace" : "error" ,
3459 "@typescript-eslint/no-non-null-assertion" : "warn" ,
35- "@typescript-eslint/no-unnecessary-qualifier" : " error" ,
3660 "@typescript-eslint/no-unnecessary-type-assertion" : "error" ,
3761 "@typescript-eslint/no-useless-constructor" : "error" ,
3862 "@typescript-eslint/no-var-requires" : "error" ,
4266 "@typescript-eslint/prefer-string-starts-ends-with" : "error" ,
4367 "@typescript-eslint/promise-function-async" : "error" ,
4468 "@typescript-eslint/require-array-sort-compare" : "error" ,
45- "@typescript-eslint/restrict-plus-operands" : " error" ,
46- "semi" : " off" ,
47- "@typescript-eslint/semi" : [" error" , " never" ],
48- "@typescript-eslint/type-annotation-spacing" : " error" ,
49- "@typescript-eslint/unbound-method" : " error" ,
50- "sort-imports" : " off"
51- },
52- "env" : {
53- "node" : true ,
54- "es6" : true ,
55- "jest/globals" : true
69+ "@typescript-eslint/restrict-plus-operands" : "error"
70+ }
71+ } ,
72+
73+ // Test files configuration
74+ {
75+ files : [ '**/*.test.ts' ] ,
76+ languageOptions : {
77+ globals : jestPlugin . environments . globals . globals
5678 }
57- }
79+ }
80+ ] ;
0 commit comments