Skip to content

updated code to modern standards and lint fixes #80

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"workbench.editor.scrollToSwitchTabs": true,
"workbench.editor.limit.enabled": true,
"dart.closingLabels": false,
// copied from: https://dartcode.org/docs/recommended-settings/
// Causes the debug view to automatically appear when a breakpoint is hit. This
// setting is global and not configurable per-language.
"debug.openDebug": "openOnDebugBreak",
"[yaml]": {
"editor.formatOnSave": true
},
"[dart]": {
// "editor.formatOnType": true,
// Disables built-in highlighting of words that match your selection. Without
// this, all instances of the selected text will be highlighted, interfering
// with Dart's ability to highlight only exact references to the selected variable.
"editor.selectionHighlight": false,
// By default, VS Code prevents code completion from popping open when in
// "snippet mode" (editing placeholders in inserted code). Setting this option
// to `false` stops that and allows completion to open as normal, as if you
// weren't in a snippet placeholder.
"editor.suggest.snippetsPreventQuickSuggestions": false,
// By default, VS Code will pre-select the most recently used item from code
// completion. This is usually not the most relevant item.
//
// "first" will always select top item
// "recentlyUsedByPrefix" will filter the recently used items based on the
// text immediately preceeding where completion was invoked.
"editor.suggestSelection": "first",
// Allows pressing <TAB> to complete snippets such as `for` even when the
// completion list is not visible.
"editor.tabCompletion": "onlySnippets",
// By default, VS Code will populate code completion with words found in the
// current file when a language service does not provide its own completions.
// This results in code completion suggesting words when editing comments and
// strings. This setting will prevent that.
"editor.wordBasedSuggestions": "off"
},
"editor.bracketPairColorization.enabled": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit",
"quickfix.insertSemicolon": "explicit",
"source.fixAll.eslint": "explicit"
},
"editor.formatOnSave": true,
"prettier.singleQuote": true,
"prettier.trailingComma": "all",
"dart.runPubGetOnPubspecChanges": "never",
"xmlTools.splitXmlnsOnFormat": false,
"xmlTools.splitAttributesOnFormat": true,
"arb-editor.suppressedWarnings": "all"
}
3 changes: 1 addition & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include: package:flutter_lints/flutter.yaml

include: package:dfc_lints/rules.yaml
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
6 changes: 2 additions & 4 deletions example/assets/code.dart
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import 'package:flutter/foundation.dart';

class ReEditor {
ReEditor(this.foo, this.bar);

final String foo;
final String bar;

ReEditor(this.foo, this.bar);

void hello(String name) {
if (kDebugMode) {
print('hello $name');
}
}

}
}
Loading