-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prettier introduced + eslint cleanup (#54)
- Loading branch information
Showing
38 changed files
with
8,188 additions
and
7,421 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,51 @@ | ||
module.exports = { | ||
parser : '@typescript-eslint/parser', | ||
parserOptions : { | ||
ecmaVersion : 'latest', // Allows the use of modern ECMAScript features | ||
sourceType : 'module', // Allows for the use of imports | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 'latest', // Allows the use of modern ECMAScript features | ||
sourceType: 'module', // Allows for the use of imports | ||
}, | ||
plugins: [ | ||
'@typescript-eslint', | ||
'todo-plz' // for enforcing TODO formatting to require "github.com/TBD54566975/dwn-server/issues/" | ||
'prettier', | ||
'todo-plz', // for enforcing TODO formatting to require "github.com/TBD54566975/dwn-server/issues/" | ||
], | ||
env: { | ||
node : true, // Enable Node.js global variables | ||
browser : true | ||
node: true, // Enable Node.js global variables | ||
browser: true, | ||
}, | ||
rules: { | ||
'curly' : ['error', 'all'], | ||
'no-console' : 'off', | ||
'indent' : [ | ||
'error', | ||
2 | ||
], | ||
'object-curly-spacing' : ['error', 'always'], | ||
'linebreak-style' : [ | ||
'error', | ||
'unix' | ||
], | ||
'quotes': [ | ||
'error', | ||
'single', | ||
{ 'allowTemplateLiterals': true } | ||
], | ||
'@typescript-eslint/semi' : ['error', 'always'], | ||
'semi' : ['off'], | ||
'no-multi-spaces' : ['error'], | ||
'no-trailing-spaces' : ['error'], | ||
'max-len' : ['error', { 'code': 150, 'ignoreStrings': true }], | ||
'key-spacing' : [ | ||
'prettier/prettier': 'error', | ||
curly: ['error', 'all'], | ||
'no-console': 'off', | ||
'@typescript-eslint/explicit-function-return-type': ['error'], | ||
// enforce `import type` when an import is not used at runtime, allowing transpilers/bundlers to drop imports as an optimization | ||
'@typescript-eslint/consistent-type-imports': 'error', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
'align': { | ||
'beforeColon' : true, | ||
'afterColon' : true, | ||
'on' : 'colon' | ||
} | ||
} | ||
vars: 'all', | ||
args: 'after-used', | ||
ignoreRestSiblings: true, | ||
argsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
}, | ||
], | ||
'keyword-spacing' : ['error', { 'before': true, 'after': true }], | ||
'@typescript-eslint/explicit-function-return-type' : ['error'], | ||
'no-unused-vars' : 'off', | ||
// enforce `import type` when an import is not used at runtime, allowing transpilers/bundlers to drop imports as an optimization | ||
'@typescript-eslint/consistent-type-imports' : 'error', | ||
'@typescript-eslint/no-unused-vars' : [ | ||
'prefer-const': ['error', { destructuring: 'all' }], | ||
'sort-imports': [ | ||
'error', | ||
{ | ||
'vars' : 'all', | ||
'args' : 'after-used', | ||
'ignoreRestSiblings' : true, | ||
'argsIgnorePattern' : '^_', | ||
'varsIgnorePattern' : '^_' | ||
} | ||
ignoreCase: true, | ||
ignoreDeclarationSort: false, | ||
ignoreMemberSort: false, | ||
memberSyntaxSortOrder: ['none', 'all', 'single', 'multiple'], | ||
allowSeparatedGroups: true, | ||
}, | ||
], | ||
'prefer-const' : ['error', { 'destructuring': 'all' }], | ||
'sort-imports' : ['error', { | ||
'ignoreCase' : true, | ||
'ignoreDeclarationSort' : false, | ||
'ignoreMemberSort' : false, | ||
'memberSyntaxSortOrder' : ['none', 'all', 'single', 'multiple'], | ||
'allowSeparatedGroups' : true | ||
}], | ||
// enforce github issue reference for every TO-DO comment | ||
'todo-plz/ticket-ref': ['error', { 'commentPattern': '.*github\.com\/TBD54566975\/dwn-server\/issues\/.*' }], | ||
} | ||
}; | ||
'todo-plz/ticket-ref': [ | ||
'error', | ||
{ commentPattern: '.*github.com/TBD54566975/dwn-server/issues/.*' }, | ||
], | ||
}, | ||
extends: ['prettier'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"enable-source-maps": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/*.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,66 +2,66 @@ | |
|
||
<!-- TOC --> | ||
|
||
* [Contributors](#contributors) | ||
* [Maintainers](#maintainers) | ||
* [Governance Committee](#governance-committee) | ||
- [Contributors](#contributors) | ||
- [Maintainers](#maintainers) | ||
- [Governance Committee](#governance-committee) | ||
|
||
<!-- /TOC --> | ||
|
||
## Contributors | ||
|
||
Anyone may be a contributor to TBD projects. Contribution may take the form of: | ||
|
||
* Asking and answering questions on the development forums | ||
* Filing an issue | ||
* Offering a feature or bug fix via a Pull Request | ||
* Suggesting documentation improvements | ||
* ...and more! | ||
- Asking and answering questions on the development forums | ||
- Filing an issue | ||
- Offering a feature or bug fix via a Pull Request | ||
- Suggesting documentation improvements | ||
- ...and more! | ||
|
||
Anyone with a GitHub account may use the project issue trackers and communications channels. We welcome newcomers, so don't hesitate to say hi! | ||
|
||
## Maintainers | ||
|
||
Maintainers have write access to GitHub repositories and act as project administrators. They approve and merge pull requests, cut releases, and guide collaboration with the community. They have: | ||
|
||
* Commit access to their project's repositories | ||
* Write access to continuous integration (CI) jobs | ||
- Commit access to their project's repositories | ||
- Write access to continuous integration (CI) jobs | ||
|
||
Both maintainers and non-maintainers may propose changes to | ||
Both maintainers and non-maintainers may propose changes to | ||
source code. The mechanism to propose such a change is a GitHub pull request. Maintainers review and merge (_land_) pull requests. | ||
|
||
If a maintainer opposes a proposed change, then the change cannot land. The exception is if the Governance Committee (GC) votes to approve the change despite the opposition. Usually, involving the GC is unnecessary. | ||
|
||
See: | ||
|
||
* [List of maintainers - `MAINTAINERS.md`](./MAINTAINERS.md) | ||
* [Contribution Guide - `CONTRIBUTING.md`](./CONTRIBUTING.md) | ||
- [List of maintainers - `MAINTAINERS.md`](./MAINTAINERS.md) | ||
- [Contribution Guide - `CONTRIBUTING.md`](./CONTRIBUTING.md) | ||
|
||
### Maintainer activities | ||
|
||
* Helping users and novice contributors | ||
* Contributing code and documentation changes that improve the project | ||
* Reviewing and commenting on issues and pull requests | ||
* Participation in working groups | ||
* Merging pull requests | ||
- Helping users and novice contributors | ||
- Contributing code and documentation changes that improve the project | ||
- Reviewing and commenting on issues and pull requests | ||
- Participation in working groups | ||
- Merging pull requests | ||
|
||
## Governance Committee | ||
|
||
The TBD Open Source Governance Committee (GC) has final authority over this project, including: | ||
|
||
* Technical direction | ||
* Project governance and process (including this policy) | ||
* Contribution policy | ||
* GitHub repository hosting | ||
* Conduct guidelines | ||
* Maintaining the list of maintainers | ||
- Technical direction | ||
- Project governance and process (including this policy) | ||
- Contribution policy | ||
- GitHub repository hosting | ||
- Conduct guidelines | ||
- Maintaining the list of maintainers | ||
|
||
The current GC members are: | ||
|
||
* Angie Jones, Head of Developer Relations, TBD | ||
* Julie Kim, Head of Legal, TBD | ||
* Nidhi Nahar, Head of Patents and Open Source, Block | ||
* Andrew Lee Rubinger, Head of Open Source, TBD | ||
* Max Sills, Counsel for Intellectual Property, Block | ||
- Angie Jones, Head of Developer Relations, TBD | ||
- Julie Kim, Head of Legal, TBD | ||
- Nidhi Nahar, Head of Patents and Open Source, Block | ||
- Andrew Lee Rubinger, Head of Open Source, TBD | ||
- Max Sills, Counsel for Intellectual Property, Block | ||
|
||
Members are not to be contacted individually. The GC may be reached through `[email protected]` and is an available resource in mediation or for sensitive cases beyond the scope of project maintainers. It operates as a "Self-appointing council or board" as defined by Red Hat: [Open Source Governance Models](https://www.redhat.com/en/blog/understanding-open-source-governance-models). | ||
Members are not to be contacted individually. The GC may be reached through `[email protected]` and is an available resource in mediation or for sensitive cases beyond the scope of project maintainers. It operates as a "Self-appointing council or board" as defined by Red Hat: [Open Source Governance Models](https://www.redhat.com/en/blog/understanding-open-source-governance-models). |
Oops, something went wrong.