-
Notifications
You must be signed in to change notification settings - Fork 167
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
Standardize imports #2477
Draft
RichDom2185
wants to merge
37
commits into
source-academy:master
Choose a base branch
from
RichDom2185:23-summer/standardize-imports
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,240
−2,167
Draft
Standardize imports #2477
Changes from 10 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
40d96c0
Install ESLint plugin
RichDom2185 ff6f9d3
Use JS file for .eslintrc
RichDom2185 4fc7955
Enforce relative imports for non-test files
RichDom2185 9296077
Reformat files affected by ESLint rule change
RichDom2185 f81912f
Reformat files using Prettier
RichDom2185 b3ce480
Merge branch 'master' into 23-summer/standardize-imports
RichDom2185 7b65300
Merge branch 'master' into 23-summer/standardize-imports
RichDom2185 2a883fc
Merge branch 'master' into 23-summer/standardize-imports
RichDom2185 33c463a
Merge branch 'master' into 23-summer/standardize-imports
RichDom2185 89cd1ba
Merge branch 'master' into 23-summer/standardize-imports
RichDom2185 4391374
Merge branch 'master' of https://github.com/RichDom2185/source-academ…
RichDom2185 e3bf8de
Merge branch 'master' of https://github.com/RichDom2185/source-academ…
RichDom2185 9573aa0
Merge branch 'master' of https://github.com/RichDom2185/source-academ…
RichDom2185 30bf589
Reformat files post-merge
RichDom2185 e6d34ca
Merge branch 'master' into 23-summer/standardize-imports
RichDom2185 f22947c
Merge branch 'master' of https://github.com/RichDom2185/source-academ…
RichDom2185 00b6ea7
Reformat files post-merge
RichDom2185 e16a483
Merge branch 'master' of https://github.com/RichDom2185/source-academ…
RichDom2185 bbeac4f
Fix import post-merge
RichDom2185 849109f
Merge branch 'master' of https://github.com/RichDom2185/source-academ…
RichDom2185 a0bf2ac
Reformat imports post-merge
RichDom2185 40371e8
Remove unused import
RichDom2185 92c2161
Merge branch 'master' of https://github.com/RichDom2185/source-academ…
RichDom2185 fe8f660
Reformat imports post-merge
RichDom2185 f4cc673
Merge branch 'master' of https://github.com/RichDom2185/source-academ…
RichDom2185 195d484
Reformat imports post-merge
RichDom2185 a3395ff
Merge branch 'master' of https://github.com/RichDom2185/source-academ…
RichDom2185 9d1ef24
Merge branch 'master' of https://github.com/RichDom2185/source-academ…
RichDom2185 9f30767
Reformat imports post-merge
RichDom2185 fad20dd
Merge branch 'master' of https://github.com/RichDom2185/source-academ…
RichDom2185 4e106ee
Reformat imports post-merge
RichDom2185 04f7c44
Merge branch 'master' of https://github.com/RichDom2185/source-academ…
RichDom2185 ffef557
Reformat imports post-merge
RichDom2185 4ece47c
Merge branch 'master' of https://github.com/RichDom2185/source-academ…
RichDom2185 dfbc6de
Reformat imports post-merge
RichDom2185 f43ac9e
Merge branch 'master' of https://github.com/RichDom2185/source-academ…
RichDom2185 5c28f5a
Reformat imports post-merge
RichDom2185 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module.exports = { | ||
extends: ['react-app', 'plugin:@typescript-eslint/recommended'], | ||
plugins: ['no-relative-import-paths', 'simple-import-sort'], | ||
rules: { | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/camelcase': 'off', | ||
'@typescript-eslint/no-inferrable-types': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'warn', | ||
'@typescript-eslint/ban-types': 'off', | ||
'no-relative-import-paths/no-relative-import-paths': ['error', { allowSameFolder: true }], | ||
'simple-import-sort/imports': 'error' | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.ts', '*.tsx', '*.js', '*.jsx'].map(filename => `**/__tests__/**/${filename}`), | ||
rules: { | ||
'no-relative-import-paths/no-relative-import-paths': 'off' | ||
} | ||
} | ||
] | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 2 additions & 8 deletions
10
src/commons/achievement/control/achievementEditor/AchievementTemplate.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, given the motivation for this change, is there a reason why the
allowSameFolder
option is set to true? More specifically, why are relative import paths for imported files from the same folder allowed? Moving a file containing such relative import paths will result in these import statements changing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that it might encourage better organisation of code (e.g perhaps splitting a 1000+ line component into multiple files in the same folder, where applicable). Since this makes the distinction clear (whether the files are closely related or not), this might improve readability.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No strong preferences! Just wanted to know if there was a rationale (which you do have) because it would be good to state it somewhere for future reference.