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

fix: remove duplicate import and no relative import #4015

Merged
merged 8 commits into from
Feb 15, 2020
Merged

fix: remove duplicate import and no relative import #4015

merged 8 commits into from
Feb 15, 2020

Conversation

maze-runnar
Copy link
Contributor

Fixes #3940
fixing es-lint warning for duplicate import and relative parent imports

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@auto-label auto-label bot added the fix label Feb 6, 2020
@kushthedude
Copy link
Member

Isnt @snitin315 working on it ?

@snitin315
Copy link
Member

@maze-runnar you should have notified before making PR as per the guidelines. Its ok for this issue . Hope you won't repeat this again in future.

@maze-runnar
Copy link
Contributor Author

@maze-runnar you should have notified before making PR as per the guidelines. Its ok for this issue . Hope you won't repeat this again in future.

Sorry , i just missed that for the first and last time, i will definitily take care of this in future.

@iamareebjamal
Copy link
Member

Status?

@maze-runnar
Copy link
Contributor Author

Status?

completed...i think 😐 . is there anything remaining?

import QUnit from 'qunit';
import config from '../config/environment';
import config from 'open-event-frontend/config/environment';
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure this is correct way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@snitin315 , can you please pull these changes to test. it's working as far i tested for everyone's concern if you once please check it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are you sure this is correct way?

I think it is, other files of project used this type of import.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure , but I think somewhere I read that. In ember.js the project-name/ refers to the app folder by default. Please check if the statement is correct .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@snitin315 app.js uses same kind of import -

import Application from '@ember/application';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from 'open-event-frontend/config/environment';

const App = Application.extend({
  modulePrefix    : config.modulePrefix,
  podModulePrefix : config.podModulePrefix,
  Resolver
});

loadInitializers(App, config.modulePrefix);

export default App;

Copy link
Contributor Author

@maze-runnar maze-runnar Feb 15, 2020

Choose a reason for hiding this comment

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

Check This

Screenshot from 2020-02-15 17-03-24

import Application from '@ember/application';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from 'open-event-frontend/config/environment';
const App = Application.extend({
modulePrefix : config.modulePrefix,
podModulePrefix : config.podModulePrefix,
Resolver
});
loadInitializers(App, config.modulePrefix);
export default App;

when life is unfair 😕 :

@kushthedude
Copy link
Member

kushthedude commented Feb 15, 2020 via email

@iamareebjamal
Copy link
Member

iamareebjamal commented Feb 15, 2020

completed...i think 😐 . is there anything remaining?

Considering that the build is failing, yes

@kushthedude
Copy link
Member

kushthedude commented Feb 15, 2020 via email

@maze-runnar
Copy link
Contributor Author

Does this even work on your local? Is site running after this changes ?

yes, it's running with same code.

@iamareebjamal
Copy link
Member

The only issue is in the test loader

@maze-runnar
Copy link
Contributor Author

The only issue is in the test loader

How to resolve this?

@iamareebjamal
Copy link
Member

By fixing it

@codecov
Copy link

codecov bot commented Feb 15, 2020

Codecov Report

Merging #4015 into development will increase coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #4015      +/-   ##
===============================================
+ Coverage        21.73%   21.80%   +0.07%     
===============================================
  Files              452      451       -1     
  Lines             4726     4724       -2     
===============================================
+ Hits              1027     1030       +3     
+ Misses            3699     3694       -5     
Impacted Files Coverage Δ
app/app.js 100.00% <0.00%> (ø) ⬆️
app/helpers/currency-symbol.js 100.00% <0.00%> (ø) ⬆️
app/services/raven.js
app/services/auth-manager.js 53.44% <0.00%> (+1.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0456445...327a6ea. Read the comment docs.

@maze-runnar
Copy link
Contributor Author

By fixing it

@iamareebjamal , Done!

@iamareebjamal iamareebjamal merged commit 3ce9b50 into fossasia:development Feb 15, 2020
@maze-runnar maze-runnar deleted the patch-10 branch February 15, 2020 12:14
@kushthedude
Copy link
Member

Why there another app.js was added ?

@maze-runnar
Copy link
Contributor Author

maze-runnar commented Feb 15, 2020

Why there another app.js was added ?

https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-relative-parent-imports.md
first approach from the given link.

@kushthedude So this link is telling wrong appraoch about how to remove relative imports.

@iamareebjamal
Copy link
Member

Didn't see that. Reverting

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

Successfully merging this pull request may close these issues.

Remove duplicated imports and Apply no-relative-imports
4 participants