moxystudio / eslint-config

MOXY eslint configuration to be used across several JavaScript projects
MIT License
13 stars 5 forks source link

feat: add import order rules #92

Closed ritazoliveira closed 4 years ago

ritazoliveira commented 4 years ago

In light of this RFC two rules were added to our config:

As for import/first, since we already happen to have import/order, which already orders the module's import, this could be turned off in certain cases but maybe it's best to ensure all imports are made at the top of the file.

codecov[bot] commented 4 years ago

Codecov Report

Merging #92 into master will not change coverage by %. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #92   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           33        33           
  Lines           42        42           
  Branches         1         1           
=========================================
  Hits            42        42           
Impacted Files Coverage Δ
packages/eslint-config-base/lib/modules/esm.js 100.00% <ø> (ø)

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 235f9b3...aa19ad4. Read the comment docs.

satazor commented 4 years ago

@ritazoliveira I would also consider enabling https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md.

ritazoliveira commented 4 years ago

Removed the mandatory new line after each import group and also added the newline-after-import rule.

satazor commented 4 years ago

This is a breaking change. @ritazoliveira next time don’t forget to sinal it in the commit message or body.

ritazoliveira commented 4 years ago

Fixed the commit to include BREAKING CHANGE in the body.