This repository has been archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Upgrade Prettier to ^1.9.2 (arrowParens: always) 🎉 & update dependencies #63
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
72eb9b1
Upgrade dependencies
kaelig 7045707
Set prettier config arrowParens to 'always'
kaelig 28bd698
Prettify source files
kaelig c0d84c5
Add prettier script to package.json
kaelig 8cad0ce
Update changelog.md
kaelig d04c552
Set up new rules and explicitly turn them off when applicable
kaelig dc2952f
Link to updates details in changelog
kaelig 422b9d3
Upgrade eslint and eslint-plugin-flowtype
kaelig 0be388b
Set new flowtype rule to off flowtype/no-flow-fix-me-comments
kaelig d2172cb
Move new script Changelog entry under 'Added'
kaelig d9d4a5f
Merge branch 'master' into prettier-upgrade
kaelig 9497035
Merge branch 'master' of github.com:Shopify/eslint-plugin-shopify int…
kaelig 2a9eb04
Upgrade babel-eslint to 8.2.1
kaelig ce57c0a
Prettify files
kaelig f3f2bab
Merge branch 'prettier-upgrade' of github.com:Shopify/eslint-plugin-s…
kaelig 237d042
Set new rules to sensible error defaults
kaelig 8353b87
Document all new rules in changelog
kaelig 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 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,5 +1,6 @@ | ||
{ | ||
"singleQuote": true, | ||
"bracketSpacing": false, | ||
"trailingComma": "es5" | ||
"trailingComma": "es5", | ||
"arrowParens": "always" | ||
} |
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
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 | ||||
---|---|---|---|---|---|---|
|
@@ -10,15 +10,21 @@ module.exports = { | |||||
// enforces interface names are prefixed. (interface-name from TSLint) | ||||||
'typescript/interface-name-prefix': 'off', | ||||||
|
||||||
// enforces naming conventions for class members by visibility. | ||||||
'typescript/member-naming': 'off', | ||||||
|
||||||
// enforces /// <reference /> is not used. (no-reference from TSLint) | ||||||
'typescript/no-triple-slash-reference': 'error', | ||||||
|
||||||
// enforces the any type is not used. (no-any from TSLint) | ||||||
'typescript/no-explicit-any': 'off', | ||||||
// disallow generic Array constructors | ||||||
'typescript/no-array-constructor': 'error', | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is set to 'error' (and not turned off), to replicate this ESLint rule: eslint-plugin-shopify/lib/config/rules/stylistic-issues.js Lines 85 to 86 in 9c33d00
ESLint original rule: https://eslint.org/docs/rules/no-array-constructor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add this to the CHANGELOG, please. |
||||||
|
||||||
// enforces the use of as Type assertions instead of <Type> assertions. (no-angle-bracket-type-assertion from TSLint) | ||||||
'typescript/no-angle-bracket-type-assertion': 'error', | ||||||
|
||||||
// enforces the any type is not used. (no-any from TSLint) | ||||||
'typescript/no-explicit-any': 'off', | ||||||
|
||||||
// disallows the use of custom TypeScript modules and namespaces | ||||||
'typescript/no-namespace': 'off', | ||||||
|
||||||
|
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
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
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.
Our config uses
trailingComma: 'all'
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.
Ha, is that something we should also standardize? Looks like not all codebases use it like that.
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.
Pretty sure it is consistent, our listing rules have always enforced trailing commas.
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.
Which code bases don't use it? They should be, unless they have a good reason not too.
In the case of
eslint-plugin-shopify
, the repo itself uses es5 so we don't break consumers who may be on older versions of node. (eg. u2). We could add a build step in this repo to solve that, but don't think it's worth the effort.