Skip to content
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

ESLint regression build failing #708

Closed
ilyavolodin opened this issue Jul 26, 2016 · 6 comments
Closed

ESLint regression build failing #708

ilyavolodin opened this issue Jul 26, 2016 · 6 comments
Labels

Comments

@ilyavolodin
Copy link

ESLint core has a nightly regression build that runs unittests and lints a few popular projects with the latest master. For the last two days it's been failing on eslint-plugin-react unit tests. Not sure if it's a real problem or not.

  1) no-unused-vars invalid /*eslint jsx-uses-react:1*/ var React;:

      AssertionError: '\'React\' is defined but never used.' == '\'React\' is defined but never used'
      + expected - actual

      -'React' is defined but never used.
      +'React' is defined but never used

      at testInvalidTemplate (node_modules/eslint/lib/testers/rule-tester.js:407:36)
      at Context.<anonymous> (node_modules/eslint/lib/testers/rule-tester.js:463:25)

  2) no-unused-vars invalid /*eslint jsx-uses-react:1*/ /** @jsx Foo */ var React; <div />;:

      AssertionError: '\'React\' is defined but never used.' == '\'React\' is defined but never used'
      + expected - actual

      -'React' is defined but never used.
      +'React' is defined but never used

      at testInvalidTemplate (node_modules/eslint/lib/testers/rule-tester.js:407:36)
      at Context.<anonymous> (node_modules/eslint/lib/testers/rule-tester.js:463:25)

  3) no-unused-vars invalid /*eslint jsx-uses-react:1*/ var React; <div />;:

      AssertionError: '\'React\' is defined but never used.' == '\'React\' is defined but never used'
      + expected - actual

      -'React' is defined but never used.
      +'React' is defined but never used

      at testInvalidTemplate (node_modules/eslint/lib/testers/rule-tester.js:407:36)
      at Context.<anonymous> (node_modules/eslint/lib/testers/rule-tester.js:463:25)

  4) no-unused-vars invalid /*eslint jsx-uses-vars:1*/ var App;:

      AssertionError: '\'App\' is defined but never used.' == '\'App\' is defined but never used'
      + expected - actual

      -'App' is defined but never used.
      +'App' is defined but never used

      at testInvalidTemplate (node_modules/eslint/lib/testers/rule-tester.js:407:36)
      at Context.<anonymous> (node_modules/eslint/lib/testers/rule-tester.js:463:25)

  5) no-unused-vars invalid         /*eslint jsx-uses-vars:1*/        var App;        var unused;        React.render(<App unused=""/>);:

      AssertionError: '\'unused\' is defined but never used.' == '\'unused\' is defined but never used'
      + expected - actual

      -'unused' is defined but never used.
      +'unused' is defined but never used

      at testInvalidTemplate (node_modules/eslint/lib/testers/rule-tester.js:407:36)
      at Context.<anonymous> (node_modules/eslint/lib/testers/rule-tester.js:463:25)

  6) no-unused-vars invalid         /*eslint jsx-uses-vars:1*/        class unused {}:

      AssertionError: '\'unused\' is defined but never used.' == '\'unused\' is defined but never used'
      + expected - actual

      -'unused' is defined but never used.
      +'unused' is defined but never used

      at testInvalidTemplate (node_modules/eslint/lib/testers/rule-tester.js:407:36)
      at Context.<anonymous> (node_modules/eslint/lib/testers/rule-tester.js:463:25)

  7) no-unused-vars invalid         /*eslint jsx-uses-vars:1*/        class HelloMessage {          render() {            var HelloMessage = <div>Hello</div>;            return HelloMessage;          }        }:

      AssertionError: '\'HelloMessage\' is defined but never used.' == '\'HelloMessage\' is defined but never used'
      + expected - actual

      -'HelloMessage' is defined but never used.
      +'HelloMessage' is defined but never used

      at testInvalidTemplate (node_modules/eslint/lib/testers/rule-tester.js:407:36)
      at Context.<anonymous> (node_modules/eslint/lib/testers/rule-tester.js:463:25)

  8) no-unused-vars invalid         /*eslint jsx-uses-vars:1*/        class HelloMessage {          render() {            var HelloMessage = <div>Hello</div>;            return HelloMessage;          }        }:

      AssertionError: '\'HelloMessage\' is defined but never used.' == '\'HelloMessage\' is defined but never used'
      + expected - actual

      -'HelloMessage' is defined but never used.
      +'HelloMessage' is defined but never used

      at testInvalidTemplate (node_modules/eslint/lib/testers/rule-tester.js:407:36)
      at Context.<anonymous> (node_modules/eslint/lib/testers/rule-tester.js:463:25)

Let me know if you want/don't want me to post those issues in the future.

@ljharb
Copy link
Member

ljharb commented Jul 26, 2016

Did eslint change to add or remove a trailing period on error messages?

@ilyavolodin
Copy link
Author

Add: eslint/eslint#6739

@ljharb
Copy link
Member

ljharb commented Jul 26, 2016

@ilyavolodin Thanks - the regression build + issue post is awesome. Technically that change constitutes a breaking change, since our tests are now breaking.

However, eslint-plugin-react does not yet support eslint 3, and this is just tests. I'll try to update the test messages so they pass both with and without the periods - hopefully that will ensure there's no other failures.

@ljharb
Copy link
Member

ljharb commented Jul 26, 2016

Actually, it kind of seems like eslint's own RuleTester should maybe ignore trailing periods, since that's what we're using to validate this (or, accept a regex rather than a string)?

@ljharb ljharb added the eslint label Jul 26, 2016
@yannickcr
Copy link
Member

ESLint v3.2.0 was just published with this "breaking" change. I updated the dependencies and the tests to match with the new error message.

@ljharb
Copy link
Member

ljharb commented Jul 29, 2016

Linking to 19ece14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants