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

v6.10.1 breaks v6.10.0 builds (related to jsx-indent) #1117

Closed
diegohaz opened this issue Mar 19, 2017 · 14 comments · Fixed by singapore/lint-condo#262
Closed

v6.10.1 breaks v6.10.0 builds (related to jsx-indent) #1117

diegohaz opened this issue Mar 19, 2017 · 14 comments · Fixed by singapore/lint-condo#262
Assignees
Labels

Comments

@diegohaz
Copy link

diegohaz commented Mar 19, 2017

Error:

103:11  error  Expected indentation of 8 space characters but found 10  react/jsx-indent

Code from 103:11:
https://github.com/diegohaz/arc/blob/84ef1227b18f3d80ac6a297345ccc007ab191015/src/components/molecules/Modal/index.js#L103

On v6.10.0 it doesn't occur.

@ljharb
Copy link
Member

ljharb commented Mar 19, 2017

This also is breaking react-dates react-dates/react-dates#383

yanivefraim added a commit to wix/eslint-config-wix that referenced this issue Mar 19, 2017
@yannickcr
Copy link
Member

yannickcr commented Mar 19, 2017

Looking at it.

@ljharb
Copy link
Member

ljharb commented Mar 19, 2017

@yannickcr i'm afraid this still isn't fixed.

This code is still warning on jsx-indent, newly in 6.10+.

@ljharb ljharb reopened this Mar 19, 2017
ljharb added a commit to react-dates/react-dates that referenced this issue Mar 19, 2017
@ljharb
Copy link
Member

ljharb commented Mar 20, 2017

(there's a number of other examples in that repo; clone at this sha and run npm install && npm run lint to see the errors)

@yannickcr
Copy link
Member

yannickcr commented Mar 20, 2017

Crap, you're right. Seems to be another issue with multi-line tags. I'll made another patch release shortly. but there is a good chance it will be done tomorrow (it's getting late here).

@atkinchris
Copy link

atkinchris commented Mar 20, 2017

We're still experiencing this bug with 6.10.2, with the following JSX.

<div>
    {myText} of {myOtherText} completed before something else
</div>

// Expected indentation of 12 space characters but found 1  react/jsx-indent

ks888 added a commit to ks888/LambStatus that referenced this issue Mar 20, 2017
It seems 6.10.1-2 has the bug, so temporarily fix the version (jsx-eslint/eslint-plugin-react#1117)
cjwatson added a commit to canonical-web-and-design/build.snapcraft.io that referenced this issue Mar 20, 2017
@vlcr
Copy link

vlcr commented Mar 20, 2017

@atkinchris I'm still experiencing problems as well.

My sample:

  <div>
    {var &&
      <span className="text">{var}</span>                                //this line works fine
    }
    {var &&
      <span className="text">{var}
      </span>                                  //this line works fine, even though it shouldn't
    }
    {var &&
      <img                              //line that throws an error, but I believe it shouldn't
        className="picture"
        alt="image"
        src={var}
      />
    }
  </div>

error Expected indentation of 8 space characters but found 10 react/jsx-indent

@freak3dot
Copy link

freak3dot commented Mar 20, 2017

Still seeing the issue with version 6.10.2 also.

Reverting to 6.9.0 works. Reverting for now.

@ljharb
Copy link
Member

ljharb commented Mar 20, 2017

@yannickcr #1118 has some extra test cases.

@shawnmcknight
Copy link

shawnmcknight commented Mar 20, 2017

The docs at https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md appear to be indicating that this is the default behavior. Tracing through version history, it looks to me like indentLogicalExpressions was added as an option at 6.10.1 and the default setting of "false" would elicit the behavior reported in this thread. I have changed my eslintrc.json file to contain:
'react/jsx-indent': ['error', 2, {indentLogicalExpressions: true}],'

and the behavior reverts to this not being an error (as expected based on the documentation).

Since making "false" the default behavior appears to introduce a breaking change, perhaps making "true" the default behavior would not?

mAiNiNfEcTiOn pushed a commit to Travix-International/travix-ui-kit that referenced this issue Mar 20, 2017
Adds the Calendar component

Updates the example to show the dates (not final)

Changes the DaysPanel to export directly the class

Makes the code more explicit on the calendar.js

Makes the styles customizable

Fixes the _default.yaml to be able to build

Fixes SCSS to build :D

Changes the builder to actually output (and colorize) when an error happens

Adds classNames to elements to make them more specific

Fixes bug where an error would be triggered when the initialDates attribute was not set. Also resets the minLimit to the passed one when provided via attributes or to null when none is available

Hides the nav button when not enabled

Changes the _default.yaml to have decent colors for the rendering :P

Adds the function leftPad() to the helpers to do left padding of the months and days

Improves the code based on the reviews' feedback. Also makes it more testable and fixes some bugs detected when developing the unit tests

Converts the DaysPanel to a stateless component with no mods (for now)

Improves the code based on reviews' feedback. Also makes it more testable and introduces a new method to merge the locale definitions

Removes the enzyme-to-json package and brings jest-serializdr-enzyme which is then configured in the jest config

Reverts the removal to give time to migrate the other unit tests. Adds the serializer configuration to the jest.config.json

Adds the unit tests and its snapshots

Updates the tests for UTC

Removes the mods and the dataAttrs from the 'defaultProps'.

Updates the snapshots

Attempt to set some colors matching the defined color pattern

Updates the snapshots

Adds some aria-labels to increase accessibility

Adds updated snapshots

Fixes a lint error :P

Adds a function to normalize the dates on the time

Changes the code to use the newly added function

Updates the tests to use the normalizeDate() and updates the snapshots

Moves the 'bind' to its own declaration, to prevent warnings from linting

Changed the 'extraClasses' variable to be named 'mods'

Changes the 'npm test' to set the testing to be always UTC (to solve CI issues)

Also added the TZ=utc to the update-snapshots script

Adds a function processProps() to be used by both the constructor and the componentWillReceiveProps() from the Calendar component

Adds a wrapper component to make the test of the props being changed. Also adds a test to verify the componentWillReceiveProps. Updates the snapshots

Improves coverage of the componentWillReceiveProps

Downgraded eslint-plugin-react due to a bug on the jsx-indent rule: jsx-eslint/eslint-plugin-react#1117

Fixes the issue with the eslint-plugin-react's version, enabling the indentLogicalExpressions

Adds the possibility to override the display text in the navigation buttons, as well as the aria-label attribute
@yannickcr
Copy link
Member

yannickcr commented Mar 20, 2017

Reverted #1058 since it introduced this issue.
I got caught by the [Fix] label. I thought it was only a bugfix, but it also introduce a new indentLogicalExpressions option and is not backward compatible.

I'll publish the updated version and I'll work on a patch to get this properly fixed.

@yannickcr
Copy link
Member

yannickcr commented Mar 20, 2017

v6.10.3 is now published. @ljharb I tested it on react-dates and it seems fixed.

ljharb added a commit to react-dates/react-dates that referenced this issue Mar 20, 2017
@ljharb
Copy link
Member

ljharb commented Mar 20, 2017

Thanks, all fixed!

@jesstelford
Copy link

jesstelford commented Mar 20, 2017

Massive props to @yannickcr for the quick turn around time - thank you so much for the hard work you put into this module 🎉

mAiNiNfEcTiOn added a commit to Travix-International/travix-ui-kit that referenced this issue Mar 21, 2017
* Changes the builder to use the util.inspect() to output the error

Adds the Calendar component

Updates the example to show the dates (not final)

Changes the DaysPanel to export directly the class

Makes the code more explicit on the calendar.js

Makes the styles customizable

Fixes the _default.yaml to be able to build

Fixes SCSS to build :D

Changes the builder to actually output (and colorize) when an error happens

Adds classNames to elements to make them more specific

Fixes bug where an error would be triggered when the initialDates attribute was not set. Also resets the minLimit to the passed one when provided via attributes or to null when none is available

Hides the nav button when not enabled

Changes the _default.yaml to have decent colors for the rendering :P

Adds the function leftPad() to the helpers to do left padding of the months and days

Improves the code based on the reviews' feedback. Also makes it more testable and fixes some bugs detected when developing the unit tests

Converts the DaysPanel to a stateless component with no mods (for now)

Improves the code based on reviews' feedback. Also makes it more testable and introduces a new method to merge the locale definitions

Removes the enzyme-to-json package and brings jest-serializdr-enzyme which is then configured in the jest config

Reverts the removal to give time to migrate the other unit tests. Adds the serializer configuration to the jest.config.json

Adds the unit tests and its snapshots

Updates the tests for UTC

Removes the mods and the dataAttrs from the 'defaultProps'.

Updates the snapshots

Attempt to set some colors matching the defined color pattern

Updates the snapshots

Adds some aria-labels to increase accessibility

Adds updated snapshots

Fixes a lint error :P

Adds a function to normalize the dates on the time

Changes the code to use the newly added function

Updates the tests to use the normalizeDate() and updates the snapshots

Moves the 'bind' to its own declaration, to prevent warnings from linting

Changed the 'extraClasses' variable to be named 'mods'

Changes the 'npm test' to set the testing to be always UTC (to solve CI issues)

Also added the TZ=utc to the update-snapshots script

Adds a function processProps() to be used by both the constructor and the componentWillReceiveProps() from the Calendar component

Adds a wrapper component to make the test of the props being changed. Also adds a test to verify the componentWillReceiveProps. Updates the snapshots

Improves coverage of the componentWillReceiveProps

Downgraded eslint-plugin-react due to a bug on the jsx-indent rule: jsx-eslint/eslint-plugin-react#1117

Fixes the issue with the eslint-plugin-react's version, enabling the indentLogicalExpressions

Adds the possibility to override the display text in the navigation buttons, as well as the aria-label attribute

* Adds the examples with a normal calendar with all props set and a range calendar with all props set

* Fixes issue where renderDate was not between the min and max limits, so needed to be readjusted

* Fixes issue where in the edge-months (0 and 11) we were doing improper math :D

* Updates the snapshots and the tests to cover properly with the new changes

* Fixes poor configuration on the .eslintrc

* Improved readability on the ternary operator of the handling of the renderDate
omerzach pushed a commit to omerzach/eslint-plugin-react that referenced this issue Mar 21, 2017
froskie pushed a commit to Travix-International/ui that referenced this issue Feb 14, 2018
* Changes the builder to use the util.inspect() to output the error

Adds the Calendar component

Updates the example to show the dates (not final)

Changes the DaysPanel to export directly the class

Makes the code more explicit on the calendar.js

Makes the styles customizable

Fixes the _default.yaml to be able to build

Fixes SCSS to build :D

Changes the builder to actually output (and colorize) when an error happens

Adds classNames to elements to make them more specific

Fixes bug where an error would be triggered when the initialDates attribute was not set. Also resets the minLimit to the passed one when provided via attributes or to null when none is available

Hides the nav button when not enabled

Changes the _default.yaml to have decent colors for the rendering :P

Adds the function leftPad() to the helpers to do left padding of the months and days

Improves the code based on the reviews' feedback. Also makes it more testable and fixes some bugs detected when developing the unit tests

Converts the DaysPanel to a stateless component with no mods (for now)

Improves the code based on reviews' feedback. Also makes it more testable and introduces a new method to merge the locale definitions

Removes the enzyme-to-json package and brings jest-serializdr-enzyme which is then configured in the jest config

Reverts the removal to give time to migrate the other unit tests. Adds the serializer configuration to the jest.config.json

Adds the unit tests and its snapshots

Updates the tests for UTC

Removes the mods and the dataAttrs from the 'defaultProps'.

Updates the snapshots

Attempt to set some colors matching the defined color pattern

Updates the snapshots

Adds some aria-labels to increase accessibility

Adds updated snapshots

Fixes a lint error :P

Adds a function to normalize the dates on the time

Changes the code to use the newly added function

Updates the tests to use the normalizeDate() and updates the snapshots

Moves the 'bind' to its own declaration, to prevent warnings from linting

Changed the 'extraClasses' variable to be named 'mods'

Changes the 'npm test' to set the testing to be always UTC (to solve CI issues)

Also added the TZ=utc to the update-snapshots script

Adds a function processProps() to be used by both the constructor and the componentWillReceiveProps() from the Calendar component

Adds a wrapper component to make the test of the props being changed. Also adds a test to verify the componentWillReceiveProps. Updates the snapshots

Improves coverage of the componentWillReceiveProps

Downgraded eslint-plugin-react due to a bug on the jsx-indent rule: jsx-eslint/eslint-plugin-react#1117

Fixes the issue with the eslint-plugin-react's version, enabling the indentLogicalExpressions

Adds the possibility to override the display text in the navigation buttons, as well as the aria-label attribute

* Adds the examples with a normal calendar with all props set and a range calendar with all props set

* Fixes issue where renderDate was not between the min and max limits, so needed to be readjusted

* Fixes issue where in the edge-months (0 and 11) we were doing improper math :D

* Updates the snapshots and the tests to cover properly with the new changes

* Fixes poor configuration on the .eslintrc

* Improved readability on the ternary operator of the handling of the renderDate
froskie pushed a commit to Travix-International/ui that referenced this issue Feb 20, 2018
* Changes the builder to use the util.inspect() to output the error

Adds the Calendar component

Updates the example to show the dates (not final)

Changes the DaysPanel to export directly the class

Makes the code more explicit on the calendar.js

Makes the styles customizable

Fixes the _default.yaml to be able to build

Fixes SCSS to build :D

Changes the builder to actually output (and colorize) when an error happens

Adds classNames to elements to make them more specific

Fixes bug where an error would be triggered when the initialDates attribute was not set. Also resets the minLimit to the passed one when provided via attributes or to null when none is available

Hides the nav button when not enabled

Changes the _default.yaml to have decent colors for the rendering :P

Adds the function leftPad() to the helpers to do left padding of the months and days

Improves the code based on the reviews' feedback. Also makes it more testable and fixes some bugs detected when developing the unit tests

Converts the DaysPanel to a stateless component with no mods (for now)

Improves the code based on reviews' feedback. Also makes it more testable and introduces a new method to merge the locale definitions

Removes the enzyme-to-json package and brings jest-serializdr-enzyme which is then configured in the jest config

Reverts the removal to give time to migrate the other unit tests. Adds the serializer configuration to the jest.config.json

Adds the unit tests and its snapshots

Updates the tests for UTC

Removes the mods and the dataAttrs from the 'defaultProps'.

Updates the snapshots

Attempt to set some colors matching the defined color pattern

Updates the snapshots

Adds some aria-labels to increase accessibility

Adds updated snapshots

Fixes a lint error :P

Adds a function to normalize the dates on the time

Changes the code to use the newly added function

Updates the tests to use the normalizeDate() and updates the snapshots

Moves the 'bind' to its own declaration, to prevent warnings from linting

Changed the 'extraClasses' variable to be named 'mods'

Changes the 'npm test' to set the testing to be always UTC (to solve CI issues)

Also added the TZ=utc to the update-snapshots script

Adds a function processProps() to be used by both the constructor and the componentWillReceiveProps() from the Calendar component

Adds a wrapper component to make the test of the props being changed. Also adds a test to verify the componentWillReceiveProps. Updates the snapshots

Improves coverage of the componentWillReceiveProps

Downgraded eslint-plugin-react due to a bug on the jsx-indent rule: jsx-eslint/eslint-plugin-react#1117

Fixes the issue with the eslint-plugin-react's version, enabling the indentLogicalExpressions

Adds the possibility to override the display text in the navigation buttons, as well as the aria-label attribute

* Adds the examples with a normal calendar with all props set and a range calendar with all props set

* Fixes issue where renderDate was not between the min and max limits, so needed to be readjusted

* Fixes issue where in the edge-months (0 and 11) we were doing improper math :D

* Updates the snapshots and the tests to cover properly with the new changes

* Fixes poor configuration on the .eslintrc

* Improved readability on the ternary operator of the handling of the renderDate
froskie pushed a commit to Travix-International/ui that referenced this issue Feb 20, 2018
* Changes the builder to use the util.inspect() to output the error

Adds the Calendar component

Updates the example to show the dates (not final)

Changes the DaysPanel to export directly the class

Makes the code more explicit on the calendar.js

Makes the styles customizable

Fixes the _default.yaml to be able to build

Fixes SCSS to build :D

Changes the builder to actually output (and colorize) when an error happens

Adds classNames to elements to make them more specific

Fixes bug where an error would be triggered when the initialDates attribute was not set. Also resets the minLimit to the passed one when provided via attributes or to null when none is available

Hides the nav button when not enabled

Changes the _default.yaml to have decent colors for the rendering :P

Adds the function leftPad() to the helpers to do left padding of the months and days

Improves the code based on the reviews' feedback. Also makes it more testable and fixes some bugs detected when developing the unit tests

Converts the DaysPanel to a stateless component with no mods (for now)

Improves the code based on reviews' feedback. Also makes it more testable and introduces a new method to merge the locale definitions

Removes the enzyme-to-json package and brings jest-serializdr-enzyme which is then configured in the jest config

Reverts the removal to give time to migrate the other unit tests. Adds the serializer configuration to the jest.config.json

Adds the unit tests and its snapshots

Updates the tests for UTC

Removes the mods and the dataAttrs from the 'defaultProps'.

Updates the snapshots

Attempt to set some colors matching the defined color pattern

Updates the snapshots

Adds some aria-labels to increase accessibility

Adds updated snapshots

Fixes a lint error :P

Adds a function to normalize the dates on the time

Changes the code to use the newly added function

Updates the tests to use the normalizeDate() and updates the snapshots

Moves the 'bind' to its own declaration, to prevent warnings from linting

Changed the 'extraClasses' variable to be named 'mods'

Changes the 'npm test' to set the testing to be always UTC (to solve CI issues)

Also added the TZ=utc to the update-snapshots script

Adds a function processProps() to be used by both the constructor and the componentWillReceiveProps() from the Calendar component

Adds a wrapper component to make the test of the props being changed. Also adds a test to verify the componentWillReceiveProps. Updates the snapshots

Improves coverage of the componentWillReceiveProps

Downgraded eslint-plugin-react due to a bug on the jsx-indent rule: jsx-eslint/eslint-plugin-react#1117

Fixes the issue with the eslint-plugin-react's version, enabling the indentLogicalExpressions

Adds the possibility to override the display text in the navigation buttons, as well as the aria-label attribute

* Adds the examples with a normal calendar with all props set and a range calendar with all props set

* Fixes issue where renderDate was not between the min and max limits, so needed to be readjusted

* Fixes issue where in the edge-months (0 and 11) we were doing improper math :D

* Updates the snapshots and the tests to cover properly with the new changes

* Fixes poor configuration on the .eslintrc

* Improved readability on the ternary operator of the handling of the renderDate
froskie pushed a commit to Travix-International/ui that referenced this issue Mar 22, 2018
* Changes the builder to use the util.inspect() to output the error

Adds the Calendar component

Updates the example to show the dates (not final)

Changes the DaysPanel to export directly the class

Makes the code more explicit on the calendar.js

Makes the styles customizable

Fixes the _default.yaml to be able to build

Fixes SCSS to build :D

Changes the builder to actually output (and colorize) when an error happens

Adds classNames to elements to make them more specific

Fixes bug where an error would be triggered when the initialDates attribute was not set. Also resets the minLimit to the passed one when provided via attributes or to null when none is available

Hides the nav button when not enabled

Changes the _default.yaml to have decent colors for the rendering :P

Adds the function leftPad() to the helpers to do left padding of the months and days

Improves the code based on the reviews' feedback. Also makes it more testable and fixes some bugs detected when developing the unit tests

Converts the DaysPanel to a stateless component with no mods (for now)

Improves the code based on reviews' feedback. Also makes it more testable and introduces a new method to merge the locale definitions

Removes the enzyme-to-json package and brings jest-serializdr-enzyme which is then configured in the jest config

Reverts the removal to give time to migrate the other unit tests. Adds the serializer configuration to the jest.config.json

Adds the unit tests and its snapshots

Updates the tests for UTC

Removes the mods and the dataAttrs from the 'defaultProps'.

Updates the snapshots

Attempt to set some colors matching the defined color pattern

Updates the snapshots

Adds some aria-labels to increase accessibility

Adds updated snapshots

Fixes a lint error :P

Adds a function to normalize the dates on the time

Changes the code to use the newly added function

Updates the tests to use the normalizeDate() and updates the snapshots

Moves the 'bind' to its own declaration, to prevent warnings from linting

Changed the 'extraClasses' variable to be named 'mods'

Changes the 'npm test' to set the testing to be always UTC (to solve CI issues)

Also added the TZ=utc to the update-snapshots script

Adds a function processProps() to be used by both the constructor and the componentWillReceiveProps() from the Calendar component

Adds a wrapper component to make the test of the props being changed. Also adds a test to verify the componentWillReceiveProps. Updates the snapshots

Improves coverage of the componentWillReceiveProps

Downgraded eslint-plugin-react due to a bug on the jsx-indent rule: jsx-eslint/eslint-plugin-react#1117

Fixes the issue with the eslint-plugin-react's version, enabling the indentLogicalExpressions

Adds the possibility to override the display text in the navigation buttons, as well as the aria-label attribute

* Adds the examples with a normal calendar with all props set and a range calendar with all props set

* Fixes issue where renderDate was not between the min and max limits, so needed to be readjusted

* Fixes issue where in the edge-months (0 and 11) we were doing improper math :D

* Updates the snapshots and the tests to cover properly with the new changes

* Fixes poor configuration on the .eslintrc

* Improved readability on the ternary operator of the handling of the renderDate
devs-cloud pushed a commit to devs-cloud/react-date that referenced this issue Dec 27, 2019
devs-cloud pushed a commit to devs-cloud/react-date that referenced this issue Dec 27, 2019
MarcoAntonioAG added a commit to MarcoAntonioAG/React-dates that referenced this issue Mar 31, 2022
MarcoAntonioAG added a commit to MarcoAntonioAG/React-dates that referenced this issue Mar 31, 2022
seniorprodev added a commit to seniorprodev/react_date that referenced this issue Jul 31, 2022
seniorprodev added a commit to seniorprodev/react_date that referenced this issue Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

8 participants