forked from winglang/wing
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(repo): eslint Wing CLI source code (winglang#4381)
I was running into some bugs working on the CLI that took me a while to find because I had forgotten to `await` some promises (that eslint would have caught!) so this felt worth adding. The `eslint` config is copied from the `vscode-wing` package. ## Checklist - [ ] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [ ] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
- Loading branch information
Showing
30 changed files
with
878 additions
and
370 deletions.
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,134 @@ | ||
{ | ||
"env": { | ||
"jest": true, | ||
"node": true | ||
}, | ||
"root": true, | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"import", | ||
"prettier" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module", | ||
"project": "./tsconfig.json" | ||
}, | ||
"extends": [ | ||
"plugin:import/typescript", | ||
"prettier", | ||
"plugin:prettier/recommended" | ||
], | ||
"settings": { | ||
"import/parsers": { | ||
"@typescript-eslint/parser": [ | ||
".ts", | ||
".tsx" | ||
] | ||
}, | ||
"import/resolver": { | ||
"node": {}, | ||
"typescript": { | ||
"project": "./tsconfig.json", | ||
"alwaysTryTypes": true | ||
} | ||
} | ||
}, | ||
"ignorePatterns": [ | ||
"*.js", | ||
"*.d.ts", | ||
"node_modules/", | ||
"*.generated.ts", | ||
"coverage", | ||
"!.projenrc.ts", | ||
"!projenrc/**/*.ts" | ||
], | ||
"rules": { | ||
"prettier/prettier": [ | ||
"error" | ||
], | ||
"@typescript-eslint/no-require-imports": [ | ||
"error" | ||
], | ||
"import/no-extraneous-dependencies": [ | ||
"error", | ||
{ | ||
"devDependencies": [ | ||
"**/test/**", | ||
"**/build-tools/**", | ||
"src/**", | ||
".projenrc.ts", | ||
"projenrc/**/*.ts" | ||
], | ||
"optionalDependencies": false, | ||
"peerDependencies": true | ||
} | ||
], | ||
"import/no-unresolved": [ | ||
"error" | ||
], | ||
"import/order": [ | ||
"warn", | ||
{ | ||
"groups": [ | ||
"builtin", | ||
"external" | ||
], | ||
"alphabetize": { | ||
"order": "asc", | ||
"caseInsensitive": true | ||
} | ||
} | ||
], | ||
"no-duplicate-imports": [ | ||
"error" | ||
], | ||
"no-shadow": [ | ||
"off" | ||
], | ||
"@typescript-eslint/no-shadow": [ | ||
"error" | ||
], | ||
"key-spacing": [ | ||
"error" | ||
], | ||
"no-multiple-empty-lines": [ | ||
"error" | ||
], | ||
"@typescript-eslint/no-floating-promises": [ | ||
"error" | ||
], | ||
"no-return-await": [ | ||
"off" | ||
], | ||
"@typescript-eslint/return-await": [ | ||
"error" | ||
], | ||
"no-trailing-spaces": [ | ||
"error" | ||
], | ||
"dot-notation": [ | ||
"error" | ||
], | ||
"no-bitwise": [ | ||
"error" | ||
], | ||
"@typescript-eslint/member-ordering": [ | ||
"error", | ||
{ | ||
"default": [ | ||
"public-static-field", | ||
"public-static-method", | ||
"protected-static-field", | ||
"protected-static-method", | ||
"private-static-field", | ||
"private-static-method", | ||
"field", | ||
"constructor", | ||
"method" | ||
] | ||
} | ||
] | ||
} | ||
} |
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.