Skip to content

Commit 838d488

Browse files
wtusfoAlisher
andauthored
refactor: sort imports (#648)
* feature: add import sorting * remove redundant rule from eslint/imoprt * add command for fixing eslint issues * update changelog --------- Co-authored-by: Alisher <alisher@supertokens.com>
1 parent 89e9910 commit 838d488

File tree

270 files changed

+6147
-5654
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

270 files changed

+6147
-5654
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [unreleased]
99

10+
### Changes
11+
12+
- Add ordering for imports
13+
- Force consistent type imports
14+
1015
### Fixes
1116

1217
- Fixed all buttons to have pointer cursor on hover.

lib/.eslintrc.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
sourceType: "module",
2525
createDefaultProgram: true,
2626
},
27-
plugins: ["@typescript-eslint", "supertokens-auth-react", "react"],
27+
plugins: ["@typescript-eslint", "supertokens-auth-react", "react", "import"],
2828
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:react-hooks/recommended"],
2929
globals: {
3030
React: "readable",
@@ -66,6 +66,7 @@ module.exports = {
6666
"@typescript-eslint/semi": ["error", "always"],
6767
"@typescript-eslint/type-annotation-spacing": "error",
6868
"@typescript-eslint/no-floating-promises": "error",
69+
"@typescript-eslint/consistent-type-imports": "error",
6970
"brace-style": ["error", "1tbs"],
7071
"no-implicit-coercion": [
7172
2,
@@ -95,6 +96,17 @@ module.exports = {
9596
"comma-spacing": ["error"],
9697
"no-empty": ["error", { allowEmptyCatch: true }],
9798
"no-console": ["error", { allow: ["info", "error", "warn"] }],
99+
"import/order": [
100+
"error",
101+
{
102+
groups: ["builtin", "external", "internal", "parent", "sibling", "object", "type"],
103+
"newlines-between": "always",
104+
alphabetize: {
105+
order: "asc",
106+
caseInsensitive: true,
107+
},
108+
},
109+
],
98110
},
99111
overrides: [
100112
{

lib/build/authRecipe-shared.js

Lines changed: 40 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/components/componentOverride/componentOverride.d.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/components/componentOverride/componentOverrideContext.d.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/components/componentOverride/useComponentOverride.d.ts

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/components/errorBoundary.d.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/components/featureWrapper.d.ts

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/components/routingComponent.d.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/components/superTokensRoute.d.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)