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

update to webpack 4, update dependencies, update node, fix some eslint warnings #95

Merged
merged 3 commits into from
Jul 15, 2019

Conversation

glebtv
Copy link
Contributor

@glebtv glebtv commented Jun 17, 2019

This change is Reviewable

Copy link
Member

@justin808 justin808 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glebtv Thank you! LGTM.

Before I merge:

  1. @glebtv can you tell me how you verified this fix works for supported versions of Webpack?
  2. Update https://github.com/shakacode/sass-resources-loader/blob/master/CHANGELOG.md. Is this a patch, minor, etc.?
  3. Fix CI

@alexfedoseev Any comments?

+(review needed)
+(waiting on submitter)

Reviewed 16 of 16 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @glebtv)


src/utils/rewriteImports.js, line 15 at r1 (raw file):

};

export default function (error, file, contents, moduleContext, callback) {

@glebtv Why is this changing?

Copy link
Member

@justin808 justin808 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glebtv can your updates include these or else close these as not relevant?

Bump diff from 3.3.1 to 3.5.0  dependencies
#94 opened 4 days ago by dependabot bot 
Bump is-my-json-valid from 2.16.1 to 2.20.0  dependencies
#93 opened 5 days ago by dependabot bot 
Bump handlebars from 4.0.10 to 4.1.2  dependencies
#92 opened 12 days ago by dependabot bot 
Bump sshpk from 1.13.1 to 1.16.1  dependencies
#90 opened 14 days ago by dependabot bot 

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @glebtv)

Copy link
Member

@justin808 justin808 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/shakacode/sass-resources-loader/pulls

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @glebtv)

@glebtv
Copy link
Contributor Author

glebtv commented Jun 18, 2019

  1. I updated all of the dependencies. yarn outdated is empty both in package and in example.
  2. Only tested on webpack 4 and node 12, tested on example from this repo and one medium-sized app.
  3. Updated eslint configs, all of the code style changes are from updated eslint configs
  4. Added a css-format test file, because in a real app I had a problem with CSS files (adding import directives to CSS file causes SASS to break for me with strange errors) - but was unable to reproduce in an example, solved for me by excluding *.css from this loader in my app.
  5. CI fail is due to eslint errors on current code and new versions of eslint configs, I am not really sure how to fix them (if you want, I can add eslint-ignore on them)

@justin808
Copy link
Member

Sounds good on the above! @glebtv

For the consistent-return, I think it's best to fix the code so it passes this. That means adding a few return undefined;

/home/travis/build/shakacode/sass-resources-loader/src/loader.js
  13:16  error  Expected to return a value at the end of function  consistent-return
  20:3   error  Unexpected dangling '_' in '__DEBUG__'             no-underscore-dangle
  75:2   error  Unnecessary semicolon                              no-extra-semi

Last one is easy.
2nd one maybe can be ignored.

/home/travis/build/shakacode/sass-resources-loader/src/utils/flattenArray.js
  1:36  error  Use the spread operator instead of '.apply()'  prefer-spread

https://eslint.org/docs/rules/prefer-spread

export default multidimensional => [].concat(...multidimensional);

/home/travis/build/shakacode/sass-resources-loader/src/utils/rewriteImports.js
15:16 error Expected to return a value at the end of function consistent-return
/home/travis/build/shakacode/sass-resources-loader/test/index.test.js
60:22 error Unexpected require() global-require
69:22 error Unexpected require() global-require
78:22 error Unexpected require() global-require
128:32 error Unexpected require() global-require


I think these should be ignored in the file.


@Judahmeek
Copy link
Contributor

@justin808 do you want me to complete this PR?

@glebtv
Copy link
Contributor Author

glebtv commented Jul 5, 2019

@justin808 Thank you for the feedback, I have fixed all the remaining ESLint problems.

Copy link
Member

@justin808 justin808 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-(review needed)
-(waiting on submitter)
:lgtm:

Reviewed 5 of 5 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @glebtv)

@justin808 justin808 merged commit 2e0afd9 into shakacode:master Jul 15, 2019
@justin808
Copy link
Member

@glebtv @Judahmeek Can the rest of these be closed: https://github.com/shakacode/sass-resources-loader/pulls ?

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

Successfully merging this pull request may close these issues.

3 participants