PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: lo1tuma/eslint-plugin-mocha (ts)
Issue: `no-setup-in-describe` triggers on `describe.skip`
```js
describe.skip( 'My test', () => {
  it( 'Something', () => {
    // Foo
  } );
} );
```

This should not trigger `no-setup-in-describe`, yet it does.

This can be worked around by moving the `skip` to each of the `it` calls.
Pull request description: Fix no-setup-in-describe to not flag describe.skip()
Fixes #249.

Patch:
diff --git a/lib/rules/no-setup-in-describe.js b/lib/rules/no-setup-in-describe.js
index 3a872f1..4383b69 100644
--- a/lib/rules/no-setup-in-describe.js
+++ b/lib/rules/no-setup-in-describe.js
@@ -83,7 +83,7 @@ module.exports = {
             },
 
             MemberExpression(node) {
-                if (isNestedInDescribeBlock()) {
+                if (!isDescribe(node.parent) && isNestedInDescribeBlock()) {
                     reportMemberExpression(node);
                 }
             },


Test patch:
diff --git a/test/rules/no-setup-in-describe.js b/test/rules/no-setup-in-describe.js
index 52915de..63139e5 100644
--- a/test/rules/no-setup-in-describe.js
+++ b/test/rules/no-setup-in-describe.js
@@ -19,6 +19,9 @@ ruleTester.run('no-setup-in-describe', rule, {
         'it("", function () { a[b]; })',
         'it("", function () { a["b"]; })',
         'describe("", function () { it(); })',
+        'describe.skip("", function () { it(); })',
+        'describe.only("", function () { it(); })',
+        'describe["only"]("", function () { it(); })',
         'describe("", function () { this.slow(1); it(); })',
         'describe("", function () { this.timeout(1); it(); })',
         'describe("", function () { this.retries(1); it(); })',
Repository: yargs/yargs (js)
Issue: .strict() allows extra args
Documentation states that in strict mode, extra arguments are reported as errors. However, none of the constructs allowed by yargs seems to demonstrate that behaviour. For example, the following configs:

```js
require("yargs")
  .command("foo <bar>")
  .strict()
  .argv
```
```js
require("yargs")
  .command("foo <bar>", "foo cmd", yargs => yargs.strict())
  .strict()
  .argv
```
```js
require("yargs")
  .command({
    command: "foo <bar>",
    builder: yargs => yargs.strict()
  })
  .command({
    command: "baz <qux>",
    builder: yargs => yargs.strict()
  })
  .demandCommand()
  .strict()
  .argv;
```
all result in commands like

```
$ ./cmd foo 123 extra
$ ./cmd bar 456 extra-1 extra-2
```

being accepted without any error.
Pull request description: fix!: do not allow additional positionals in strict mode
The test was disabled for commandless yargs, but as the validation is done on the innermost yargs, it was always disabled.

Closes #1313 

Patch:
diff --git a/lib/validation.js b/lib/validation.js
index e9bbb12..5cbe964 100644
--- a/lib/validation.js
+++ b/lib/validation.js
@@ -102,7 +102,7 @@ module.exports = function validation (yargs, usage, y18n) {
       }
     })
 
-    if (commandKeys.length > 0) {
+    if ((currentContext.commands.length > 0) || (commandKeys.length > 0)) {
       argv._.slice(currentContext.commands.length).forEach((key) => {
         if (commandKeys.indexOf(key) === -1) {
           unknown.push(key)


Test patch:
diff --git a/test/validation.js b/test/validation.js
index f704816..bd0bd1d 100644
--- a/test/validation.js
+++ b/test/validation.js
@@ -335,6 +335,18 @@ describe('validation tests', () => {
         .parse()
     })
 
+    it('fails in strict mode with extra positionals', (done) => {
+      yargs(['kangaroo', 'jumping', 'fast'])
+        .command('kangaroo <status>', 'kangaroo handlers')
+        .strict()
+        .fail((msg) => {
+          msg.should.equal('Unknown argument: fast')
+          return done()
+        })
+        .parse()
+      expect.fail('no parsing failure')
+    })
+
     it('does not fail in strict mode when no commands configured', () => {
       const argv = yargs('koala')
         .demand(1)
Repository: moment/luxon (js)
Issue: throwOnInvalid does not throw for invalid year
**Describe the bug**
When setting `Settings.throwOnInvalid`, Luxon does not seem to throw an error if the year is too large (both positive or negative), even though `dateTime.isValid` will return `false`.

**To Reproduce**

```ts
luxon.Settings.throwOnInvalid = true;

const dateTime = luxon.DateTime.fromObject({ year: 1000000 });
console.log(dateTime.isValid, dateTime.invalidReason);
```

**Actual vs Expected behavior**

Expected: An error is thrown

Actual: `false invalid input` is logged to the console

**Desktop:**

- OS: macOS 13.4
- Browser: Chrome 114
- Luxon version: 3.3.0
- Your timezone: Europe/Berlin

Thanks for looking into it!
Pull request description: fix: DateTime throws when year is invalid and throwOnInvalid is true
Fixes #1449.

### What I did

So the issue here is that whenever the year passed is too big, `DateTime.fromObject` goes all the way through execution and ends up returning the DateTime instance.

The instance, which is being instantiated [here](https://github.com/moment/luxon/blob/master/src/datetime.js#L798), is invalid. This is because DateTime's constructor checks on the year [here](https://github.com/moment/luxon/blob/master/src/datetime.js#L492) and assigns `invalid`. The problem is that, unlike other invalid cases, in this one (and probably others) we never go through `DateTime.invalid`, therefore we do not check on `throwIfInvalid` (and eventually throw).

So here I'm checking if the DateTime instance is invalid before returning, and if it is, i'm going through the same `DateTime.invalid` method. 

The good thing is that we're reusing the same logic for throwing. The not so good thing is that, should `throwIfInvalid` be `false`, we would be returning basically the same thing that we started with. But I think this is a good compromise!

I've also added a unit test.

Patch:
diff --git a/src/datetime.js b/src/datetime.js
index f98d183f..9472cb53 100644
--- a/src/datetime.js
+++ b/src/datetime.js
@@ -810,6 +810,10 @@ export default class DateTime {
       );
     }
 
+    if (!inst.isValid) {
+      return DateTime.invalid(inst.invalid);
+    }
+
     return inst;
   }
 


Test patch:
diff --git a/test/datetime/invalid.test.js b/test/datetime/invalid.test.js
index a776e185..d13fb864 100644
--- a/test/datetime/invalid.test.js
+++ b/test/datetime/invalid.test.js
@@ -72,3 +72,18 @@ test("throwOnInvalid throws", () => {
 test("DateTime.invalid throws if you don't provide a reason", () => {
   expect(() => DateTime.invalid()).toThrow();
 });
+
+test("throwOnInvalid throws if year is too big", () => {
+  try {
+    Settings.throwOnInvalid = true;
+    expect(() =>
+      DateTime.fromObject({
+        year: 9999999,
+        month: 5,
+        day: 25,
+      })
+    ).toThrow();
+  } finally {
+    Settings.throwOnInvalid = false;
+  }
+});
Repository: busyorg/busy (js)
Issue: Long topics break TopicSelector sort selector
#### Expected behavior

Long topics shouldn't cause sort selector to break. This should be taken care of for reasonable screen sizes and topic lengths.

#### Actual behavior

![image](https://user-images.githubusercontent.com/1968722/32371456-3a93065a-c091-11e7-8e6c-447d8d2a994d.png)

Sort selector renders improperly.

#### How to reproduce

Check feed with long topic on smaller screens below ~400px.
Pull request description: Update TopicSelector styles
Fixes #988.

This changes how TopicSelector behaves on smaller screens.
- TopicSelector items are now aligned in center
- "Sort by" and current sort now have white-space set to nowrap to prevent
breaking it.
- "Sort by" and current sort now have display set to inline-block to
cause them to split to two lines if there is no room.

**Before**:
![image](https://user-images.githubusercontent.com/1968722/32371940-23e779e8-c093-11e7-8ac2-5d6baa53cda7.png)
**After**:
![image](https://user-images.githubusercontent.com/1968722/32371964-37af2c00-c093-11e7-87f2-25a9671b3e37.png)

Patch:
diff --git a/src/components/TopicSelector.js b/src/components/TopicSelector.js
index f6655e05..20abefb4 100644
--- a/src/components/TopicSelector.js
+++ b/src/components/TopicSelector.js
@@ -53,7 +53,9 @@ class TopicSelector extends React.Component {
             )}
         </div>
         <div className="TopicSelector__sort">
-          <FormattedMessage id="sort_by" defaultMessage="Sort by" />
+          <span className="TopicSelector__sort__title">
+            <FormattedMessage id="sort_by" defaultMessage="Sort by" />
+          </span>
           <Popover
             trigger="click"
             visible={popoverVisible}
diff --git a/src/components/TopicSelector.less b/src/components/TopicSelector.less
index 75c88e99..352c1ae3 100644
--- a/src/components/TopicSelector.less
+++ b/src/components/TopicSelector.less
@@ -3,6 +3,7 @@
 .TopicSelector {
   display: flex;
   justify-content: space-between;
+  align-items: center;
   margin-bottom: 16px;
   padding: 0 @mobile-padding;
 
@@ -20,11 +21,18 @@
 
   &__sort {
     color: #99aab5;
+    text-align: right;
+
+    &__title {
+      display: inline-block;
+      white-space: nowrap;
+    }
 
     &__current {
       cursor: pointer;
       margin-left: 8px;
       font-weight: 500;
+      white-space: nowrap;
 
       & > .iconfont {
         margin-left: 4px;


Test patch:
diff --git a/src/stories/__snapshots__/stories.test.js.snap b/src/stories/__snapshots__/stories.test.js.snap
index 26b2dc45..62f85d38 100644
--- a/src/stories/__snapshots__/stories.test.js.snap
+++ b/src/stories/__snapshots__/stories.test.js.snap
@@ -2792,8 +2792,12 @@ exports[`Storyshots Topic selector Topic selector 1`] = `
     <div
       className="TopicSelector__sort"
     >
-      <span>
-        Sort by
+      <span
+        className="TopicSelector__sort__title"
+      >
+        <span>
+          Sort by
+        </span>
       </span>
       <span
         className="TopicSelector__sort__current"