Skip to content

Naming conventions altered for typescript code#976

Merged
mnaamani merged 5 commits intoJoystream:nicaeafrom
gleb-urvanov:feature/naming-convention
Jul 22, 2020
Merged

Naming conventions altered for typescript code#976
mnaamani merged 5 commits intoJoystream:nicaeafrom
gleb-urvanov:feature/naming-convention

Conversation

@gleb-urvanov
Copy link
Contributor

Applied @Lezek123 suggestion from #970

"error",
{
selector: 'default',
format: ['camelCase'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to understand the naming-conventions rules:
Is the format array listing what is allowed or considered and error?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are allowed

@mnaamani
Copy link
Member

mnaamani commented Jul 22, 2020

I presume since these new rules are in #1001 it works as you want. But why did we make an exception for the types library? Can't we have a set of rules that works for the types library and the consuming apps?

@mnaamani
Copy link
Member

The changes are introducing some linter errors in storage node:

/Users/mokhtar/joystream/joystream/storage-node/packages/colossus/bin/cli.js
   13:7  error  Variable name _ must match one of the following formats: camelCase, UPPER_CASE, PascalCase  @typescript-eslint/naming-convention
  131:5  error  Method name resolve_content_id must match one of the following formats: camelCase           @typescript-eslint/naming-convention

/Users/mokhtar/joystream/joystream/storage-node/packages/colossus/lib/middleware/validate_responses.js
  45:17  error  Parameter name _ must match one of the following formats: camelCase  @typescript-eslint/naming-convention

/Users/mokhtar/joystream/joystream/storage-node/packages/discovery/discover.js
  182:16  error  Function name _discover must match one of the following formats: camelCase  @typescript-eslint/naming-convention

/Users/mokhtar/joystream/joystream/storage-node/packages/storage/storage.js
   35:7  error  Variable name _ must match one of the following formats: camelCase, UPPER_CASE, PascalCase  @typescript-eslint/naming-convention
   94:3  error  Method name _transform must match one of the following formats: camelCase                   @typescript-eslint/naming-convention
  121:3  error  Method name _flush must match one of the following formats: camelCase                       @typescript-eslint/naming-convention
  211:3  error  Method name _init must match one of the following formats: camelCase                        @typescript-eslint/naming-convention

/Users/mokhtar/joystream/joystream/storage-node/packages/storage/test/storage.js
  66:5  error  Method name resolve_content_id must match one of the following formats: camelCase  @typescript-eslint/naming-convention

/Users/mokhtar/joystream/joystream/storage-node/packages/util/lru.js
  87:3  error  Method name _prune must match one of the following formats: camelCase  @typescript-eslint/naming-convention

Let me add add a CI check for the storage node, and do some fixes there before we merge these new rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants