@@ -2,9 +2,20 @@ module.exports = {
22 'extends' : [
33 'airbnb' ,
44 'plugin:react-hooks/recommended' ,
5+ 'eslint:recommended' ,
6+ 'plugin:@typescript-eslint/recommended' ,
7+ 'plugin:@typescript-eslint/recommended-requiring-type-checking'
58 ] ,
9+ 'parser' : '@typescript-eslint/parser' ,
10+ 'plugins' : [ '@typescript-eslint' , 'jest' , 'import' ] ,
611 'rules' : {
12+ 'react/jsx-filename-extension' : [ 2 , { 'extensions' : [ '.js' , '.jsx' , '.ts' , '.tsx' ] } ] ,
13+ 'no-use-before-define' : [ 0 ] ,
14+ '@typescript-eslint/no-use-before-define' : [ 1 ] ,
15+ 'no-tabs' : 'off' , // enable it later stage
716 'import/no-extraneous-dependencies' : 'off' ,
17+ 'import/no-unresolved' : 'off' ,
18+ 'import/extensions' : 'off' ,
819 'no-trailing-spaces' : 'off' ,
920 'react/jsx-indent' : 'off' ,
1021 'no-unused-vars' : 'off' ,
@@ -28,9 +39,39 @@ module.exports = {
2839 'brace-style' : [ 'error' , 'stroustrup' ] ,
2940 'no-plusplus' : 'off' ,
3041 'object-curly-newline' : 'off' ,
42+ '@typescript-eslint/no-var-requires' : 'off' ,
43+ '@typescript-eslint/restrict-template-expressions' : 'off' ,
44+ '@typescript-eslint/restrict-plus-operands' : 'off' ,
45+ '@typescript-eslint/no-explicit-any' : 'off' , // enable this later stage
46+ '@typescript-eslint/ban-types' : 'off' , // enable this later stage
47+ '@typescript-eslint/no-unsafe-assignment' : 'off' , // enable this later stage
48+ '@typescript-eslint/no-unsafe-member-access' : 'off' , // enable this later stage
49+ '@typescript-eslint/explicit-module-boundary-types' : 'off' , // enable this later stage
50+ '@typescript-eslint/no-unsafe-return' : 'off' , // enable this later stage
51+ '@typescript-eslint/no-unsafe-call' : 'off' , // enable this later stage
52+ '@typescript-eslint/no-unused-vars' : 'off' // enable this later stage
53+ } ,
54+ 'settings' : {
55+ react : {
56+ version : 'detect' // Tells eslint-plugin-react to automatically detect the version of React to use
57+ } ,
58+ 'import/resolver' : {
59+ node : {
60+ extensions : [ '.js' , '.jsx' , '.ts' , '.tsx' ] ,
61+ paths : [ './src' , './src/types' ]
62+ }
63+ } ,
64+ } ,
65+ 'parserOptions' : {
66+ ecmaVersion : 2020 , // Allows for the parsing of modern ECMAScript features
67+ sourceType : 'module' , // Allows for the use of imports
68+ ecmaFeatures : {
69+ jsx : true , // Allows for the parsing of JSX
70+ legacyDecorators : true
71+ } ,
72+ project : './tsconfig.json'
3173 } ,
32- 'parser' : 'babel-eslint' ,
3374 'env' : {
34- 'jest/globals' : true ,
75+ 'jest/globals' : true
3576 } ,
3677} ;
0 commit comments