-
Notifications
You must be signed in to change notification settings - Fork 18
Changes from all commits
ad4ab04
5fba90b
3cc8e84
7f4932a
5aa3b35
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| test/fixtures/* | ||
| coverage/** | ||
| .nyc_output/** |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| 'use strict'; | ||
|
Member
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. I'd prefer we use Prettier without any settings as we offload any decision making to that team (see version Prettier 2 changes) and I don't believe there's an easy way to share a Prettier config across repos, which means we have to keep them in sync manually.
Member
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.
Scratch that: https://prettier.io/docs/en/configuration.html#sharing-configurations If the general consensus is to define our own settings then let's pull them out into
Member
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. Pull request pending at stylelint/prettier-config#1 |
||
|
|
||
| // https://prettier.io/docs/en/options.html | ||
| module.exports = { | ||
| arrowParens: 'always', | ||
| endOfLine: 'lf', | ||
| printWidth: 100, | ||
| singleQuote: true, | ||
| useTabs: true, | ||
| overrides: [ | ||
| { | ||
| files: ['package.json', 'package-lock.json', '*.md'], | ||
| options: { | ||
| printWidth: 80, | ||
| singleQuote: false, | ||
| tabWidth: 2, | ||
| trailingComma: 'none', | ||
| useTabs: false, | ||
| }, | ||
| }, | ||
| ], | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,13 @@ | ||
| "use strict"; | ||
| function camelCase (str) { | ||
| return str.replace(/[\w-]+/g, (s) => ( | ||
| 'use strict'; | ||
|
|
||
| function camelCase(str) { | ||
| return str.replace(/[\w-]+/g, (s) => | ||
| /^-?[a-z]+(?:-[a-z]+)+$/.test(s) | ||
| ? s.replace( | ||
| /^-(ms|moz|khtml|epub|(\w+-?)*webkit)(?=-)/i, | ||
| "$1" | ||
| ).replace( | ||
| /-\w/g, | ||
| s => ( | ||
| s[1].toUpperCase() | ||
| ) | ||
| ) | ||
| ? s | ||
| .replace(/^-(ms|moz|khtml|epub|(\w+-?)*webkit)(?=-)/i, '$1') | ||
| .replace(/-\w/g, (s) => s[1].toUpperCase()) | ||
| : s | ||
| )); | ||
| ); | ||
| } | ||
|
|
||
| module.exports = camelCase; |
Uh oh!
There was an error while loading. Please reload this page.
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.
I'll create a follow-up PR to move to a
files: []whitelisting approach.