1+ // https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project
2+ module . exports = {
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+ ecmaFeatures : {
8+ jsx : true // Allows for the parsing of JSX
9+ }
10+ } ,
11+ settings : {
12+ react : {
13+ version : "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use
14+ }
15+ } ,
16+ extends : [
17+ "eslint:recommended" ,
18+ "plugin:react/recommended" , // Uses the recommended rules from @eslint -plugin-react
19+ "plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript -eslint/eslint-plugin
20+ ] ,
21+ rules : {
22+ // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
23+ "default-case" : "off" ,
24+ "jsx-a11y/alt-text" : "off" ,
25+ "jsx-a11y/iframe-has-title" : "off" ,
26+ "no-undef" : "off" ,
27+ "no-unused-vars" : "off" ,
28+ "no-extend-native" : "off" ,
29+ "no-throw-literal" : "off" ,
30+ "no-useless-concat" : "off" ,
31+ "no-mixed-operators" : "off" ,
32+ "no-prototype-builtins" : "off" ,
33+ "no-mixed-spaces-and-tabs" : 0 ,
34+ "prefer-const" : "off" ,
35+ "prefer-rest-params" : "off" ,
36+ "@typescript-eslint/no-unused-vars" : "off" ,
37+ "@typescript-eslint/no-explicit-any" : "off" ,
38+ "@typescript-eslint/no-inferrable-types" : "off" ,
39+ "@typescript-eslint/no-useless-constructor" : "off" ,
40+ "@typescript-eslint/no-use-before-define" : "off" ,
41+ "@typescript-eslint/no-non-null-assertion" : "off" ,
42+ "@typescript-eslint/interface-name-prefix" : "off" ,
43+ "@typescript-eslint/prefer-namespace-keyword" : "off" ,
44+ "@typescript-eslint/explicit-function-return-type" : "off" ,
45+ "@typescript-eslint/explicit-module-boundary-types" : "off"
46+ } ,
47+ "overrides" : [
48+ {
49+ "files" : [ "*.ts" , "*.tsx" ] ,
50+ "rules" : {
51+ "default-case" : "off" ,
52+ "jsx-a11y/alt-text" : "off" ,
53+ "jsx-a11y/iframe-has-title" : "off" ,
54+ "no-var" : "off" ,
55+ "no-undef" : "off" ,
56+ "no-unused-vars" : "off" ,
57+ "no-extend-native" : "off" ,
58+ "no-throw-literal" : "off" ,
59+ "no-useless-concat" : "off" ,
60+ "no-mixed-operators" : "off" ,
61+ "no-mixed-spaces-and-tabs" : 0 ,
62+ "no-prototype-builtins" : "off" ,
63+ "prefer-const" : "off" ,
64+ "prefer-rest-params" : "off" ,
65+ "@typescript-eslint/no-unused-vars" : "off" ,
66+ "@typescript-eslint/no-explicit-any" : "off" ,
67+ "@typescript-eslint/no-inferrable-types" : "off" ,
68+ "@typescript-eslint/no-useless-constructor" : "off" ,
69+ "@typescript-eslint/no-use-before-define" : "off" ,
70+ "@typescript-eslint/no-non-null-assertion" : "off" ,
71+ "@typescript-eslint/interface-name-prefix" : "off" ,
72+ "@typescript-eslint/prefer-namespace-keyword" : "off" ,
73+ "@typescript-eslint/explicit-function-return-type" : "off" ,
74+ "@typescript-eslint/explicit-module-boundary-types" : "off"
75+ }
76+ }
77+ ]
78+ } ;
0 commit comments