1+ module . exports = {
2+ root : true , // Don't look outside this project for inherited configs
3+ parser : "@typescript-eslint/parser" , // Specifies the ESLint parser
4+ parserOptions : {
5+ ecmaVersion : 2020 , // Allows for the parsing of modern ECMAScript features
6+ sourceType : "module" , // Allows for the use of imports
7+ project : "./tsconfig.json" ,
8+ } ,
9+ extends : [
10+ "plugin:@typescript-eslint/recommended" , // Uses the recommended rules from the @typescript -eslint/eslint-plugin
11+ ] ,
12+ plugins : [ ] ,
13+ rules : {
14+ "indent" : "off" ,
15+ "@typescript-eslint/indent" : [
16+ "error" ,
17+ 4 ,
18+ {
19+ "SwitchCase" : 1
20+ }
21+ ] ,
22+ "quotes" : [
23+ "error" ,
24+ "double" ,
25+ {
26+ "avoidEscape" : true ,
27+ "allowTemplateLiterals" : true
28+ }
29+ ] ,
30+ "@typescript-eslint/no-parameter-properties" : "off" ,
31+ "@typescript-eslint/no-explicit-any" : "off" ,
32+ "@typescript-eslint/no-use-before-define" : [
33+ "error" ,
34+ {
35+ functions : false ,
36+ typedefs : false ,
37+ classes : false ,
38+ } ,
39+ ] ,
40+ "@typescript-eslint/no-unused-vars" : [
41+ "error" ,
42+ {
43+ ignoreRestSiblings : true ,
44+ argsIgnorePattern : "^_" ,
45+ } ,
46+ ] ,
47+ "@typescript-eslint/explicit-function-return-type" : [
48+ "warn" ,
49+ {
50+ allowExpressions : true ,
51+ allowTypedFunctionExpressions : true ,
52+ } ,
53+ ] ,
54+ "@typescript-eslint/no-object-literal-type-assertion" : "off" ,
55+ "@typescript-eslint/interface-name-prefix" : "off" ,
56+ "@typescript-eslint/no-non-null-assertion" : "off" , // This is necessary for Map.has()/get()!
57+ "no-var" : "error" ,
58+ "prefer-const" : "error" ,
59+ "no-trailing-spaces" : "error" ,
60+ } ,
61+ overrides : [
62+ {
63+ files : [ "*.test.ts" ] ,
64+ rules : {
65+ "@typescript-eslint/explicit-function-return-type" : "off" ,
66+ } ,
67+ } ,
68+ ] ,
69+ } ;
0 commit comments