-
Notifications
You must be signed in to change notification settings - Fork 90
Feature/eslint #831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Feature/eslint #831
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
7028300
Integrate EsLint + Prettier
jason-fox 206886c
Add CNR
jason-fox a5334ea
Fixing test expectations
jason-fox e4df205
Fixing test expectations
jason-fox 433dd6c
Merge commit 'd9c5ac9af583e7610eaafa5baa0f4abb1aead5c2' into feature/…
jason-fox 7bf4d03
Merge commit '25b690aa97059ba3e2306f300ca3647486134c18' into feature/…
jason-fox cd9475a
Add editorconfig
jason-fox cbe8e4d
Update coding guidelines to include eslint and editorconfig
jason-fox 876ca4b
Amending text
jason-fox 0bd74e7
Capitalize ESLint
jason-fox 5e839d9
Update .editorconfig
jason-fox 325aaab
Merge branch 'master' into feature/eslint
jason-fox 288a22e
Merge branch 'master' into feature/eslint
jason-fox 4820c76
Remove package lock.
jason-fox 61bcd0a
Merge branch 'master' into feature/eslint
jason-fox 9f261d9
Merge branch 'master' into feature/eslint
jason-fox fe6f3dc
Re-add CNR
jason-fox 113b4ac
Merge commit '2f6509ba67eca09486161092fcef9ab0430f75a3' into feature/…
jason-fox 14e64a0
Remove package lock
jason-fox ee7b6a0
Merge commit '4519d15018205914941decac4bc44ae2f2bc6c73' into feature/…
jason-fox 20868dd
Merge branch 'master' into feature/eslint
jason-fox c35b0ba
Fix broken test from merge
jason-fox 818d8a1
Merge branch 'master' into feature/eslint
jason-fox c0a6b96
Run prettier, fix docs.
jason-fox 05ebe3f
Merge branch 'master' into feature/eslint
jason-fox c7e663c
Merge commit 'master' into feature/eslint
jason-fox e96a17c
Merge branch 'master' into feature/eslint
jason-fox bdc61e1
Merge branch 'master' into feature/eslint
jason-fox aabb4ea
Merge branch 'master' into feature/eslint
jason-fox 8de0be2
Increase timeout
jason-fox 32e84af
Merge 'master' into feature/eslint
jason-fox dfce339
Merge branch 'master' into feature/eslint
jason-fox 6b4c511
Merge commit 'master' into feature/eslint
jason-fox 924c3a9
Merge branch 'master' into feature/eslint
jason-fox 68cebf8
Update CHANGES_NEXT_RELEASE
jason-fox ae4416e
Fix typo
jason-fox ea6d399
Update documentation.
jason-fox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,18 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
insert_final_newline = true | ||
|
||
[*.{json,yml,md,babelrc,eslintrc,remarkrc}] | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
|
||
[*.{js}] | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true |
This file contains hidden or 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,12 @@ | ||
{ | ||
"extends": "tamia", | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"no-shadow": 0, | ||
"valid-jsdoc": 0 | ||
} | ||
} |
This file contains hidden or 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 |
---|---|---|
|
@@ -13,4 +13,5 @@ | |
.project | ||
.metadata | ||
npm-debug.log | ||
.eslintcache | ||
|
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,9 @@ | ||
{ | ||
"arrowParens": "always", | ||
"bracketSpacing": true, | ||
"singleQuote": true, | ||
"parser": "flow", | ||
"printWidth": 120, | ||
"trailingComma": "none", | ||
"tabWidth": 4 | ||
} |
This file contains hidden or 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,7 @@ | ||
Update codebase to use ES6 | ||
- Remove JSHint and jshint overrides | ||
- Add esLint using standard tamia presets | ||
- Replace var with let/const | ||
- Fix or disable eslint errors | ||
Add prettier code formatting | ||
Add husky and lint-staged |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comparing with the .eslintrc.json file in IOTA-JSON
.eslintrc.jsonrepo, this setting has been added here.Which effect does it have in the eslint rules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same reasoning it was added here - the latest version of eslint complains about Telefonica style callbacks in the code (it wants the
callback
variable name to be unique) hence the shadowed variable name rule must be dropped. This is only due to the updates to a more modern EslintThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification.
So, I understand that
"no-shadow": 0
is the desired setting and the repos not using it (if any) should be fixed. Out of the scope of this PR, of course.NTC