Gleb Urvanov 4 лет назад
Родитель
Сommit
e288eab98e

+ 25 - 7
devops/eslint-config/index.js

@@ -43,12 +43,30 @@ module.exports = {
     // should prefer using 'debug' package at least to allow control of
     // output verbosity if logging to console.
     'no-console': 'off',
+    '@typescript-eslint/camelcase': 'off',
+    '@typescript-eslint/naming-convention': [
+      'error',
+      {
+        selector: 'default',
+        format: ['camelCase'],
+      },
+      {
+        selector: 'variable',
+        format: ['camelCase', 'UPPER_CASE'],
+      },
+      {
+        selector: 'typeLike',
+        format: ['PascalCase'],
+      },
+      {
+        selector: 'property',
+        format: [], // Don't force format of object properties, so they can be ie.: { "Some thing": 123 }, { some_thing: 123 } etc.
+      },
+      {
+        selector: 'enumMember',
+        format: ['PascalCase'],
+      },
+    ],
   },
-  plugins: [
-    'standard',
-    '@typescript-eslint',
-    'react',
-    'react-hooks',
-    'prettier',
-  ],
+  plugins: ['standard', '@typescript-eslint', 'react', 'react-hooks', 'prettier'],
 }

+ 7 - 7
tests/network-tests/src/nicaea/dto/fillOpeningParameters.ts

@@ -63,18 +63,18 @@ export class FillOpeningParameters {
 
   public getRewardPolicy() {
     return {
-      'amount_per_payout': this.amountPerPayout,
-      'next_payment_at_block': this.nextPaymentAtBlock,
-      'payout_interval': this.payoutInterval,
+      amount_per_payout: this.amountPerPayout,
+      next_payment_at_block: this.nextPaymentAtBlock,
+      payout_interval: this.payoutInterval,
     }
   }
 
   public getFillOpeningParameters() {
     return {
-      'opening_id': this.openingId,
-      'successful_application_id': this.successfulApplicationId,
-      'reward_policy': this.getRewardPolicy(),
-      'working_group': this.workingGroup,
+      opening_id: this.openingId,
+      successful_application_id: this.successfulApplicationId,
+      reward_policy: this.getRewardPolicy(),
+      working_group: this.workingGroup,
     }
   }
 }