1- import tsdoc from "eslint-plugin-tsdoc" ;
2- import typescriptParser from "@typescript-eslint/parser" ;
3- import scwTypescript from '@scaleway/eslint-config-react/typescript' ;
4-
1+ import scwTypescript from '@scaleway/eslint-config-react/typescript'
2+ import typescriptParser from '@typescript-eslint/parser'
3+ import tsdoc from 'eslint-plugin-tsdoc'
54
65const scwPlugins = scwTypescript . reduce ( ( acc , config ) => {
7- return { ...acc , ...config . plugins } ;
8- } , { } ) ;
6+ return { ...acc , ...config . plugins }
7+ } , { } )
98
109export default [
1110 {
1211 ignores : [
13- "**/node_modules/" ,
14- "**/dist/" ,
15- "**/examples/" ,
16- "**/vite.config.ts" ,
17- "packages/clients/.eslintrc.cjs" ,
18- "packages/client/.eslintrc.cjs" ,
19- "eslint.config.mjs" ,
20- "packages/clients/src/vendor/base64/index.js" ,
21- "packages/client/src/vendor/base64/index.js" ,
22- "packages/configuration-loader/.eslintrc.cjs" ,
23-
12+ '**/node_modules/' ,
13+ '**/dist/' ,
14+ '**/examples/' ,
15+ '**/vite.config.ts' ,
16+ 'packages/clients/.eslintrc.cjs' ,
17+ 'packages/client/.eslintrc.cjs' ,
18+ 'eslint.config.mjs' ,
19+ 'packages/clients/src/vendor/base64/index.js' ,
20+ 'packages/client/src/vendor/base64/index.js' ,
21+ 'packages/configuration-loader/.eslintrc.cjs' ,
2422 ] ,
2523 } ,
2624 {
2725 languageOptions : {
2826 ecmaVersion : 5 ,
29- sourceType : " script" ,
27+ sourceType : ' script' ,
3028 parser : typescriptParser ,
3129 parserOptions : {
32- project : [ " tsconfig.json" ] ,
30+ project : [ ' tsconfig.json' ] ,
3331 } ,
3432 } ,
3533 plugins : {
3634 tsdoc,
3735 ...scwPlugins ,
3836 } ,
3937 rules : {
40- " tsdoc/syntax" : " warn" ,
41- " @typescript-eslint/naming-convention" : [
42- " error" ,
38+ ' tsdoc/syntax' : ' warn' ,
39+ ' @typescript-eslint/naming-convention' : [
40+ ' error' ,
4341 {
44- selector : " enumMember" ,
45- format : [ " PascalCase" ] ,
42+ selector : ' enumMember' ,
43+ format : [ ' PascalCase' ] ,
4644 } ,
4745 ] ,
48- " import/prefer-default-export" : " off" ,
49- " import/no-default-export" : " error" ,
50- " no-await-in-loop" : " off" ,
51- " @typescript-eslint/no-namespace" : " off" ,
46+ ' import/prefer-default-export' : ' off' ,
47+ ' import/no-default-export' : ' error' ,
48+ ' no-await-in-loop' : ' off' ,
49+ ' @typescript-eslint/no-namespace' : ' off' ,
5250 } ,
5351 } ,
5452
@@ -58,54 +56,50 @@ export default [
5856 rules : {
5957 ...config . rules ,
6058 //new rules
61- " no-restricted-syntax" : " warn" ,
62- " no-useless-escape" : " warn" ,
63- " max-classes-per-file" : " warn" ,
64- " no-underscore-dangle" : " warn" ,
65- " no-await-in-loop" : " warn" ,
66- " @typescript-eslint/no-unused-vars" : " warn" ,
67- " @typescript-eslint/consistent-type-definitions" : " warn" ,
68- " @typescript-eslint/ban-types" : " warn" ,
59+ ' no-restricted-syntax' : ' warn' ,
60+ ' no-useless-escape' : ' warn' ,
61+ ' max-classes-per-file' : ' warn' ,
62+ ' no-underscore-dangle' : ' warn' ,
63+ ' no-await-in-loop' : ' warn' ,
64+ ' @typescript-eslint/no-unused-vars' : ' warn' ,
65+ ' @typescript-eslint/consistent-type-definitions' : ' warn' ,
66+ ' @typescript-eslint/ban-types' : ' warn' ,
6967 } ,
70- } ) ) ,
68+ } ) ) ,
7169
7270 ...scwTypescript . map ( config => ( {
7371 ...config ,
7472 files : [
75- " ./packages/clients/src/scw/**/*.ts" ,
76- " ./packages/clients/src/internal/**/*.ts" ,
73+ ' ./packages/clients/src/scw/**/*.ts' ,
74+ ' ./packages/clients/src/internal/**/*.ts' ,
7775 ] ,
7876 rules : {
7977 ...config . rules ,
80- " @typescript-eslint/no-unused-vars" : " off" ,
81- " @typescript-eslint/consistent-type-definitions" : " off" ,
78+ ' @typescript-eslint/no-unused-vars' : ' off' ,
79+ ' @typescript-eslint/consistent-type-definitions' : ' off' ,
8280 } ,
83-
8481 } ) ) ,
8582
8683 ...scwTypescript . map ( config => ( {
8784 ...config ,
88- files : [ " **/*.test.ts" , " __tests__/**/*.ts" , " **/vite.config.ts" ] ,
85+ files : [ ' **/*.test.ts' , ' __tests__/**/*.ts' , ' **/vite.config.ts' ] ,
8986 rules : {
9087 ...config . rules ,
91- " import/no-extraneous-dependencies" : " off" ,
88+ ' import/no-extraneous-dependencies' : ' off' ,
9289 } ,
93-
9490 } ) ) ,
9591
9692 ...scwTypescript . map ( config => ( {
9793 ...config ,
98- files : [ " packages/clients/src/api/dedibox/v1/*.ts" ] ,
94+ files : [ ' packages/clients/src/api/dedibox/v1/*.ts' ] ,
9995 rules : {
10096 ...config . rules ,
101- " no-use-before-define" : " off" ,
102- " @typescript-eslint/no-use-before-define" : " off" ,
103- " @typescript-eslint/no-unused-vars" : " off" ,
104- " @typescript-eslint/consistent-type-definitions" : " off" ,
105- " max-classes-per-file" : " off" ,
106- " no-restricted-syntax" : " off" ,
97+ ' no-use-before-define' : ' off' ,
98+ ' @typescript-eslint/no-use-before-define' : ' off' ,
99+ ' @typescript-eslint/no-unused-vars' : ' off' ,
100+ ' @typescript-eslint/consistent-type-definitions' : ' off' ,
101+ ' max-classes-per-file' : ' off' ,
102+ ' no-restricted-syntax' : ' off' ,
107103 } ,
108-
109104 } ) ) ,
110-
111- ] ;
105+ ]
0 commit comments