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

chore: fix CSS import order ESLint rule #7852

Merged
merged 3 commits into from
Jul 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,19 @@ module.exports = {
{pattern: '@site/**', group: 'internal'},
{pattern: '@theme-init/**', group: 'internal'},
{pattern: '@theme-original/**', group: 'internal'},
// always put css import to the last
// see more: https://github.com/import-js/eslint-plugin-import/issues/1239
{
pattern: '*.+(css|sass|less|scss|pcss|styl)',
group: 'unknown',
patternOptions: {matchBase: true},
position: 'after',
},
],
pathGroupsExcludedImportTypes: [],
// it's even better for understanding import layers at first glance
// see more: https://github.com/import-js/eslint-plugin-import/blob/v2.26.0/docs/rules/order.md#newlines-between-ignorealwaysalways-and-inside-groupsnever
// {"newlines-between": "always-and-inside-groups"}
},
],
'import/prefer-default-export': OFF,
Expand Down
2 changes: 2 additions & 0 deletions project-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ paraiso
pathinfo
pathnames
pbcopy
pcss
peaceiris
philpl
photoshop
Expand Down Expand Up @@ -307,6 +308,7 @@ subsubsubfolder
sucipto
supabase
svgr
styl
swizzlable
teik
templating
Expand Down