You need to install eslint and some other config libs.
yarn add eslint prettier eslint-config-prettier eslint-plugin-prettier -D
yarn eslint --init
.eslintrc.js
| code --install-extension 1yib.nodejs-bundle | |
| code --install-extension 1yib.svelte-bundle | |
| code --install-extension aaron-bond.better-comments | |
| code --install-extension adpyke.codesnap | |
| code --install-extension adrianwilczynski.add-reference | |
| code --install-extension adrianwilczynski.asp-net-core-switcher | |
| code --install-extension adrianwilczynski.blazor-snippet-pack | |
| code --install-extension adrianwilczynski.csharp-to-typescript | |
| code --install-extension adrianwilczynski.libman | |
| code --install-extension adrianwilczynski.namespace |
| { | |
| "dart.lineLength": 80, | |
| "docwriter.hotkey.mac": "⌥ + .", | |
| "editor.formatOnSave": true, | |
| "editor.formatOnPaste": true, | |
| "editor.fontFamily": "JetBrains Mono", | |
| "explorer.fileNesting.patterns": { | |
| "pubspec.yaml": ".flutter-plugins, .packages, .dart_tool, .flutter-plugins-dependencies, .metadata, .packages, pubspec.lock, build.yaml, analysis_options.yaml, all_lint_rules.yaml", | |
| ".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*", | |
| "readme.*": "authors, backers.md, changelog*, citation*, code_of_conduct.md, codeowners, contributing.md, contributors, copying, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors.md", |
| 0legg.flutter-create-helper | |
| aaron-bond.better-comments | |
| achil.vscode-javascript-repl | |
| adpyke.codesnap | |
| afractal.node-essentials | |
| akamud.vscode-theme-onedark | |
| aksharpatel47.vscode-flutter-helper | |
| alexisvt.flutter-snippets | |
| amandeepmittal.expressjs | |
| ardenivanov.svelte-intellisense |
| selectAll => (: ")(.*?)(?:") |
| { | |
| "Magic number": { | |
| "scope": "dart", | |
| "prefix": "hwaMagicNumber", | |
| "body": "static const $1 = $2;", | |
| "description": "Hwa Magic Number Create" | |
| }, | |
| "Singleton Eager": { | |
| "scope": "dart", | |
| "prefix": "hwaEager", |
| # This script copies the right firebase configuration ( GoogleService-Info.plist file ) for the running flavor. | |
| # It must be run as a Build Phase. It assumes three flavors: "dev", "stage" and "prod". | |
| if [ "${CONFIGURATION}" == "Debug-prod" ] || [ "${CONFIGURATION}" == "Release-prod" ] || [ "${CONFIGURATION}" == "Profile-prod" ]; | |
| then | |
| cp -r "${PROJECT_DIR}/Runner/Firebase/prod/GoogleService-Info.plist" "${PROJECT_DIR}/Runner/GoogleService-Info.plist" | |
| elif [ "${CONFIGURATION}" == "Debug-stage" ] || [ "${CONFIGURATION}" == "Release-stage" ] || [ "${CONFIGURATION}" == "Profile-stage" ]; | |
| then | |
| cp -r "${PROJECT_DIR}/Runner/Firebase/stage/GoogleService-Info.plist" "${PROJECT_DIR}/Runner/GoogleService-Info.plist" | |
| elif [ "${CONFIGURATION}" == "Debug-dev" ] || [ "${CONFIGURATION}" == "Release-dev" ] || [ "${CONFIGURATION}" == "Profile-dev" ]; |
| static var httpClient = new HttpClient(); | |
| Future<File> _downloadFile(String url, String filename) async { | |
| var request = await httpClient.getUrl(Uri.parse(url)); | |
| var response = await request.close(); | |
| var bytes = await consolidateHttpClientResponseBytes(response); | |
| String dir = (await getApplicationDocumentsDirectory()).path; | |
| File file = new File('$dir/$filename'); | |
| await file.writeAsBytes(bytes); | |
| return file; | |
| } |
Author: Chris Lattner