editorconfig/editorconfig-vscode 834
EditorConfig extension for Visual Studio Code
avajs/ava-docs 454
Localized docs for AVA
Awesome AVA resources
ESLint rules for AVA
kevva/brightness 182
Change screen brightness
Change the screen brightness
Symbol.observable ponyfill
Binary wrapper that makes your programs seamlessly available as local dependencies
avajs/atom-ava 102
Snippets for AVA and run tests directly in the editor
get-alex/SublimeLinter-contrib-alex 58
SublimeLinter plugin for Alex
Pull request review commentsindresorhus/p-throttle
Fixes #26: Throttle limit exceeded after a delay
test('main', async t => { })); }); +test('limits after pause', async t => {+ const limit = 10;+ const interval = 1010;+ const throttled = pThrottle({limit, interval})(() => Date.now());++ const promises = [];++ await throttled(0);++ await new Promise(resolve => {
Use yoctodelay
instead.
comment created time in 2 hours
issue commentsindresorhus/eslint-plugin-unicorn
Breaking something? What's the original and fixed?
comment created time in 3 hours
issue openedsindresorhus/eslint-plugin-unicorn
mergeWith(...rest, (destValue, srcValue, key, dest, src, stack) => {
if (!isArray(destValue) && !isArray(srcValue)) return
if (isArray(destValue)) {
// srcValue may be primitive value
_destValue = destValue.concat(srcValue)
} else if (isArray(srcValue)) {
_destValue = [...srcValue]
}
return _destValue
})
created time in 3 hours
issue commentsindresorhus/eslint-plugin-unicorn
Return null as JSX element (no-null with React + TS)
Or possibly return an empty React.Fragment. I do that instead of using null.
return isLoading
? <></>
: (
/* ... */
)
comment created time in 3 hours
issue openedsindresorhus/eslint-plugin-unicorn
<!-- 🍩 Please don't ignore this template -->
<!-- 1️⃣ Explain here why this rule would be beneficial --> Accessing a property inside an accessor with the same name will cause infinite recursion.
Fail
<!-- 2️⃣ Specify an example of code that should be detected -->
get foo() {
return this.foo;
}
set foo(v) {
this.foo = v;
}
Pass
<!-- 3️⃣ Specify an example of code that would be accepted in its place -->
get foo() {
return this._foo;
}
set foo(v) {
this._foo = v;
}
get bar() {
return that.bar;
}
set bar(v) {
that.bar = v;
}
created time in 4 hours
issue openedsindresorhus/eslint-plugin-unicorn
<!-- 🍩 Please don't ignore this template -->
<!-- 1️⃣ Explain here why this rule would be beneficial --> A switch statement is easier to read than multiple if statements with simple equality comparisons.
Fail
<!-- 2️⃣ Specify an example of code that should be detected -->
if (foo === bar) {
/* ... */
}
else if (foo === baz) {
/* ... */
}
else if (foo === arglebargl) {
/* ... */
}
else if (foo === glopglyph) {
/* ... */
}
Pass
<!-- 3️⃣ Specify an example of code that would be accepted in its place -->
if (foo === bar) {
/* ... */
}
else if (foo === baz) {
/* ... */
}
switch (foo) {
case bar:
/* ... */
break;
case baz:
/* ... */
break;
case arglebargl:
/* ... */
break;
case glopglyph:
/* ... */
break;
}
This could have a minimumCases
option, defaulting to 3.
created time in 5 hours
issue openedsindresorhus/eslint-plugin-unicorn
Disallow super() and .this in static methods
<!-- 🍩 Please don't ignore this template -->
<!-- 1️⃣ Explain here why this rule would be beneficial -->
The this
keyword on static methods refers the class instance (the constructor). This can be confusing.
Fail
<!-- 2️⃣ Specify an example of code that should be detected -->
class A {
static foo() {
doSomething()
}
static bar() {
this.foo() //ERROR: Unexpected 'this'.
}
}
class B extends A {
static foo() {
super.foo() //ERROR: Unexpected 'super'.
}
}
Pass
<!-- 3️⃣ Specify an example of code that would be accepted in its place -->
class A {
static foo() {
doSomething()
}
static bar() {
A.foo()
}
}
class B extends A {
static foo() {
A.foo()
}
}
created time in 5 hours
issue openedsindresorhus/conf
Lost ability to use "date-time" format in JSON Scheme (version 7.0.0)
HI,
I just upgraded to 7.0.0, but I get the following error when loading the store using a JSON scheme:
Error: unknown format "date-time" ignored in schema at path "#/properties/extra/properties/lastStartDate"
Nothing else has changed, just the packages upgrade. AM i missing something?
My JSON Scheme is the following:
const AppDatabaseSchema: Schema<AppDatabaseModel> = {
extra: {
type: 'object',
properties: {
lastStartDate: {
type: "string",
format: "date-time"
}
}
}
}
And I initialize it like this:
this.store = new Store<AppDatabaseModel>({
name: "appDatabase",
schema: AppDatabaseSchema,
clearInvalidConfig: true
});
Thank you
created time in 5 hours
Pull request review commentsindresorhus/query-string
Implement skips for stringify array format comma
test('array stringify representation with array commas and null value', t => { bar: [null] }, { arrayFormat: 'comma'- }), 'foo=a');+ }), 'bar=&foo=,a,,');
fg
}), 'bar=&foo=,a,,');
fdfgfdg
Can you add a test like this where the skipnull and skipemptystring options are set?
one test where both are involved, sure.
You also need to add some more tests to ensure the parse function can correctly handle this.
This fixes stringify(), are you trying to say me to fix its counter-part in parse()?
comment created time in 7 hours
issue commentsindresorhus/conf
Changing schema name causes `string` defaults to show up as undefined
Right, what I meant was the name of the schema variable, not the option name.
I just used schema
and Schema
in the initial issue to say that even a slight change in the schema variable name causes string defaults to be returned as undefined. (Notice: one has a lowercase s
, and the other has an uppercase S
)
So, this works:
const schema = {...some_schema_object}
const config = new Conf({schema}) // works as expected
But, the following examples don't work:
const someRandomVariableName = {...some_schema_object}
const config = new Conf({someRandomVariableName}) // does not work
or
const confSchema = {...some_schema_object}
const config = new Conf({confSchema}) // does not work
or
const Schema = {...some_schema_object}
const config = new Conf({Schema}) // does not work
comment created time in 9 hours
issue commentsindresorhus/ow
Add option to override/remove type label in error message
What about the option to call ow
without a type?
ow(5, ow.is(x => greaterThan(10, x)));
// => ArgumentError: Expected `5` to be greater than `10`
ow(5, 'custom label', ow.is(x => greaterThan(10, x)));
// => ArgumentError: (custom label) Expected `5` to be greater than `10`
comment created time in 10 hours
issue closedsindresorhus/eslint-plugin-unicorn
I had to disable (1091fdaaff82de2b9eac0f674a0dafc719a7bff7) some problematic rules in the default config until we manage to fix some issues with them:
custom-error-definition
- [x] #150
- [x] #90
- [ ] checking other problems(fisker)
no-fn-reference-in-iterator
- [x] #121
- [x] enable in #666
no-unsafe-regex
- [ ] #153
closed time in 10 hours
sindresorhusissue commentsindresorhus/eslint-plugin-unicorn
Closing in favor of https://github.com/sindresorhus/eslint-plugin-unicorn/pull/680.
comment created time in 10 hours
issue commentsindresorhus/eslint-plugin-unicorn
Rule proposal: `prefer-regexp-dot-all`
This is now accepted.
comment created time in 10 hours
issue commentsindresorhus/eslint-plugin-unicorn
Rule proposal: `prefer-private-class-fields`
This is now accepted.
But it's blocked by:
Does ESLint support this feature yet?
comment created time in 10 hours
push eventsindresorhus/eslint-plugin-unicorn
commit sha 37658070a61a900183016d3a64d1982429dda25f
27.0.0
push time in 10 hours
issue commentsindresorhus/ow
Add option to override/remove type label in error message
Any suggestions on how to best resolve this?
comment created time in 10 hours
pull request commentsindresorhus/rename-fn
Implemented .toString() modification
22d22b8
comment created time in 10 hours
Pull request review commentsindresorhus/debounce-fn
declare namespace debounceFn { */ readonly wait?: number; + /**+ Maximum time to wait until the `input` function is called.+ Only applies when after is true.
Why only when after
is true
?
comment created time in 10 hours
Pull request review commentsindresorhus/debounce-fn
declare namespace debounceFn { */ readonly wait?: number; + /**+ Maximum time to wait until the `input` function is called.
It would also be useful to include a use-case for this option (like you mention in the PR description).
comment created time in 10 hours
Pull request review commentsindresorhus/debounce-fn
declare namespace debounceFn { */ readonly wait?: number; + /**+ Maximum time to wait until the `input` function is called.
Also, make it clear that "time" is in milliseconds.
comment created time in 10 hours
Pull request review commentsindresorhus/debounce-fn
declare namespace debounceFn { */ readonly wait?: number; + /**+ Maximum time to wait until the `input` function is called.+ Only applies when after is true.
Only applies when the `after` option is `true`.
comment created time in 10 hours
Pull request review commentsindresorhus/debounce-fn
test('.cancel() method', async t => { t.is(debounced(3), undefined); t.is(count, 0); });++test('debounces a function with maxWait', async t => {
test('`maxWait` option', async t => {
comment created time in 10 hours
Pull request review commentsindresorhus/debounce-fn
declare namespace debounceFn { */ readonly wait?: number; + /**+ Maximum time to wait until the `input` function is called.
It needs a clearer description of how it's different from wait
.
comment created time in 10 hours
Pull request review commentsindresorhus/debounce-fn
declare namespace debounceFn { */ readonly wait?: number; + /**+ Maximum time to wait until the `input` function is called.
You also need to update the readme.
comment created time in 10 hours