-
Notifications
You must be signed in to change notification settings - Fork 5
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
Linting Standardisation: Import Sort Order, Member Order, Member Accessibility, Type Imports, Spaced Comment, Usage of fs #272
Comments
Rule explanation is here: https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md I've added in the minimal amount of configuration that I think can work. |
Missed one rule for "import/order": [
"error",
{
"groups": [
"type",
"builtin",
"external",
"internal",
"index",
"sibling",
"parent",
"object"
],
"pathGroups": [
{
"pattern": "@",
"group": "internal"
},
{
"pattern": "@/**",
"group": "internal"
}
]
}
], |
This can now be done. Should squeeze it in quick so that everybody's imports can be in the right order. |
Might as well bundle:
|
Supporting work - can be quickly added and checked once Gitlab MR is merged. |
Also this: |
Renamed issue to indicate all the linting standardisation we want to use. |
Also discovered this problem: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-throw-literal.md Forgot to do |
For https://gitlab.com/MatrixAI/Engineering/Polykey/js-polykey/-/merge_requests/213
|
The node plugin is not needed to control imports. In fact we may need to import |
For access modifiers, we can do this when we update the typescript-eslint and use this:
That will do auto fixing. But we won't add it yet. |
With the merging of https://gitlab.com/MatrixAI/Engineering/Polykey/js-polykey/-/merge_requests/213. All of this is done except:
Both cannot be done for now because they are not autofixable until we upgrade our eslint dependencies. I think this is acceptable for now so we're going to close this issue. |
Incorporate the new import sort order standard from MatrixAI/TypeScript-Demo-Lib@393bc34
This should ensure that our imports are always aligned in the same order.
This should be done after the loose ends are merged from #240 and #259 as they involve some changes that could screw them up. Instead this will affect likely all the files.
Tasks
eslint-plugin-import
NPM dependencynpm run lintfix
All the rules that will be useful here:
The text was updated successfully, but these errors were encountered: