@@ -6,95 +6,107 @@ module.exports = {
66 worker : true ,
77 } ,
88 extends : [
9- 'eslint:recommended' ,
10- 'plugin:@typescript-eslint/eslint-recommended' ,
11- 'plugin:@typescript-eslint/recommended' ,
12- 'plugin:react/recommended' ,
13- 'plugin:react/jsx-runtime' ,
14- 'plugin:import/recommended' ,
15- 'plugin:import/typescript' ,
16- 'plugin:jsx-a11y/recommended' ,
17- 'plugin:playwright/playwright-test' ,
18- 'plugin:sonarjs/recommended' ,
19- 'plugin:typescript-sort-keys/recommended' ,
9+ "eslint:recommended" ,
10+ "plugin:@typescript-eslint/eslint-recommended" ,
11+ "plugin:@typescript-eslint/recommended" ,
12+ "plugin:@typescript-eslint/recommended-requiring-type-checking" ,
13+ "plugin:@typescript-eslint/strict" ,
14+ "plugin:react/recommended" ,
15+ "plugin:react/jsx-runtime" ,
16+ "plugin:import/recommended" ,
17+ "plugin:import/typescript" ,
18+ "plugin:jsx-a11y/recommended" ,
19+ "plugin:playwright/playwright-test" ,
20+ "plugin:sonarjs/recommended" ,
21+ "plugin:typescript-sort-keys/recommended" ,
2022 // HINT: prettier must be the last extension to work
21- ' plugin:prettier/recommended' ,
23+ " plugin:prettier/recommended" ,
2224 ] ,
23- ignorePatterns : [ ' build' , ' docker' , ' node_modules' , ' openshift' , ' public' ] ,
25+ ignorePatterns : [ " build" , "dev-dist" , "dist" , " docker" , " node_modules" , " openshift" , " public" ] ,
2426 overrides : [
2527 {
26- files : [ ' *.ts' , ' *.tsx' ] ,
28+ files : [ " *.ts" , " *.tsx" ] ,
2729 rules : {
28- ' no-undef' : ' off' ,
29- ' no-unused-vars' : ' off' ,
30+ " no-undef" : " off" ,
31+ " no-unused-vars" : " off" ,
3032 } ,
3133 } ,
3234 ] ,
33- parser : '@typescript-eslint/parser' ,
35+ parser : "@typescript-eslint/parser" ,
36+ parserOptions : {
37+ project : [ "./tsconfig.json" ] ,
38+ tsconfigRootDir : __dirname ,
39+ } ,
3440 plugins : [
35- '@typescript-eslint' ,
36- 'jsx-a11y' ,
37- 'react-hooks' ,
38- 'react' ,
39- 'sonarjs' ,
40- 'sort-keys-fix' ,
41- 'typescript-sort-keys' ,
42- 'no-type-assertion' ,
41+ "@typescript-eslint" ,
42+ "jsx-a11y" ,
43+ "react-hooks" ,
44+ "react" ,
45+ "sonarjs" ,
46+ "sort-keys-fix" ,
47+ "typescript-sort-keys" ,
4348 // HINT: prettier must be the last plugin to work
44- ' prettier' ,
49+ " prettier" ,
4550 ] ,
4651 rules : {
47- '@typescript-eslint/no-unused-vars' : [
48- 'warn' ,
52+ "@typescript-eslint/consistent-type-definitions" : [ "error" , "type" ] ,
53+ "@typescript-eslint/no-floating-promises" : [ "error" , { ignoreVoid : true } ] ,
54+ "@typescript-eslint/no-misused-promises" : [
55+ "error" ,
56+ {
57+ checksVoidReturn : false ,
58+ } ,
59+ ] ,
60+ "@typescript-eslint/no-unused-vars" : [
61+ "warn" ,
4962 {
50- argsIgnorePattern : '^_' ,
51- caughtErrorsIgnorePattern : '^_' ,
52- varsIgnorePattern : '^_' ,
63+ argsIgnorePattern : "^_" ,
64+ caughtErrorsIgnorePattern : "^_" ,
65+ varsIgnorePattern : "^_" ,
5366 } ,
5467 ] ,
55- ' @typescript-eslint/sort-type-union-intersection-members' : ' error' ,
56- camelcase : ' warn' ,
57- curly : ' error' ,
58- ' import/no-unused-modules' : [
59- ' error' ,
68+ " @typescript-eslint/sort-type-union-intersection-members" : " error" ,
69+ camelcase : " warn" ,
70+ curly : " error" ,
71+ " import/no-unused-modules" : [
72+ " error" ,
6073 {
6174 ignoreExports : [
62- ' playwright/index.ts' ,
63- ' src/index.tsx' ,
64- ' src/**/*.d.ts' ,
65- ' src/**/*.{spec,test}.{ts,tsx}' ,
66- ' *.{js,ts}' , // mostly configuration files
75+ " playwright/index.ts" ,
76+ " src/index.tsx" ,
77+ " src/**/*.d.ts" ,
78+ " src/**/*.{spec,test}.{ts,tsx}" ,
79+ " *.{js,ts}" , // mostly configuration files
6780 ] ,
6881 missingExports : true ,
69- src : [ '.' ] ,
82+ src : [ "." ] ,
7083 unusedExports : true ,
7184 } ,
7285 ] ,
73- ' import/order' : [
74- ' error' ,
86+ " import/order" : [
87+ " error" ,
7588 {
7689 alphabetize : {
7790 caseInsensitive : true ,
78- order : ' asc' ,
91+ order : " asc" ,
7992 } ,
80- groups : [ ' builtin' , ' external' , ' internal' ] ,
93+ groups : [ " builtin" , " external" , " internal" ] ,
8194 pathGroups : [
8295 {
83- group : ' external' ,
84- pattern : ' react' ,
85- position : ' before' ,
96+ group : " external" ,
97+ pattern : " react" ,
98+ position : " before" ,
8699 } ,
87100 ] ,
88- pathGroupsExcludedImportTypes : [ ' react' ] ,
101+ pathGroupsExcludedImportTypes : [ " react" ] ,
89102 } ,
90103 ] ,
91- 'import/prefer-default-export' : 'off' ,
92- 'no-console' : [ 'warn' , { allow : [ 'warn' , 'error' ] } ] ,
93- 'no-type-assertion/no-type-assertion' : 'error' ,
94- 'prettier/prettier' : 'error' ,
95- 'react/jsx-sort-default-props' : 'error' ,
96- 'react/jsx-sort-props' : [
97- 'error' ,
104+ "import/prefer-default-export" : "off" ,
105+ "no-console" : [ "warn" , { allow : [ "warn" , "error" ] } ] ,
106+ "prettier/prettier" : "error" ,
107+ "react/jsx-sort-default-props" : "error" ,
108+ "react/jsx-sort-props" : [
109+ "error" ,
98110 {
99111 callbacksLast : true ,
100112 ignoreCase : true ,
@@ -104,34 +116,34 @@ module.exports = {
104116 shorthandLast : false ,
105117 } ,
106118 ] ,
107- ' react-hooks/exhaustive-deps' : ' error' ,
108- ' react-hooks/rules-of-hooks' : ' error' ,
109- ' sort-imports' : [
110- ' error' ,
119+ " react-hooks/exhaustive-deps" : " error" ,
120+ " react-hooks/rules-of-hooks" : " error" ,
121+ " sort-imports" : [
122+ " error" ,
111123 {
112124 ignoreCase : true ,
113125 ignoreDeclarationSort : true ,
114126 ignoreMemberSort : false ,
115127 } ,
116128 ] ,
117129 // Required to fix sort-keys automatically, since this is not done by default.
118- ' sort-keys-fix/sort-keys-fix' : [
119- ' error' ,
120- ' asc' ,
130+ " sort-keys-fix/sort-keys-fix" : [
131+ " error" ,
132+ " asc" ,
121133 {
122134 caseSensitive : false ,
123135 natural : true ,
124136 } ,
125137 ] ,
126138 } ,
127139 settings : {
128- ' import/resolver' : {
140+ " import/resolver" : {
129141 typescript : {
130142 alwaysTryTypes : true ,
131143 } ,
132144 } ,
133145 react : {
134- version : ' detect' ,
146+ version : " detect" ,
135147 } ,
136148 } ,
137149} ;
0 commit comments