ワン:はじめに
...最近、私はWebStromを使用することを好むが、少し古いので、プロジェクトを見てみることを一連の操作をトリガしているため、新たな枠組みは角学習、ビットWebを再学習:
次のようにすべてのバラ色のああではなく、実際にそれが赤バグではありません、私はVSコードの本プロジェクトを開きました。
プログラマは、トップの上に悪いのバーストです.....................
II:ロード・ソリューション
Ⅰは、VSのコードを使用して
ピットの父VSコードに問題があり、自動導入(輸入)問題、長い時間のためのBaiduの検索、そして最後に呼ばれる「自動インポート」のプラグインが存在しているはずが、インストールされています。
しかし、私は、予期せぬバグが見つかりました:
カスタムクラスは、自動インポートが自動的に参照を追加し使用することができますが、そのような自動参照としてFormsModuleを見つけることができませんでしたが、私はこのプラグインはまだ大きな音で使用することはありません、この謎の読者が私に教えて知ってください。
Ⅱ、WebStrom続けます
WebStrom Alt_Enter中は常に自動的にBaiduの検索で参照されている、私の愛用されていて、最終的には赤1は、爆発の原因を知っています。
Tslint.jsonにおける一部プロファイル、Gitの(バージョン)コントロールで部分。
①、Tslint.json(角プロジェクトのルートディレクトリ)
各種コード仕様Tslint.jsonの規定はなく、規定が今解決すべきああ不快な各種の結果として、あまりにも厳しい決定..:
1、赤パケットタイプ、次
余分である:(文字列の単語)と言うには、プログラマが文字列型の言葉のように定義されるようにすることができます「Aoaudly」の言葉は、言葉の文字列に基づいている変数の値を決定するということです!
ソリューション:
2、シングル/二重引用符レッドパケット、以下の
TSlint.jsonデフォルトでは、厳密に単一/二重引用符の使用を制限します
ソリューション:
3、赤新聞のスペース、次のように
スペースの使用のTsLint.jsonデフォルト厳しい規則
ソリューション:
図4に示すように、パケットの赤の特殊なタイプ、次のように
ソリューション:
結果を見てください:
② , Git(版本)控制
在 settings -> Version Control中
三 : 大结局
四 : Tslint.json的配置
{ "extends": "tslint:recommended", "rulesDirectory": [ "codelyzer" ], "rules": { "array-type": false, "arrow-parens": false, "deprecation": { "severity": "warn" }, "import-blacklist": [ true, "rxjs/Rx" ], "interface-name": false, "max-classes-per-file": false, "max-line-length": [ true, 140 ], "member-access": false, "member-ordering": [ false, { "order": [ "static-field", "instance-field", "static-method", "instance-method" ] } ], "no-consecutive-blank-lines": false, "no-console": [ true, "debug", "info", "time", "timeEnd", "trace" ], "no-empty": false, "no-inferrable-types": [ true, "ignore-params", "ignore-properties" ], "no-non-null-assertion": true, "no-redundant-jsdoc": true, "no-switch-case-fall-through": true, "no-use-before-declare": true, "no-var-requires": false, "object-literal-key-quotes": [ true, "as-needed" ], "object-literal-sort-keys": false, "ordered-imports": false, "quotemark": [ false, "single" ], "trailing-comma": false, "no-output-on-prefix": true, "use-input-property-decorator": true, "use-output-property-decorator": true, "use-host-property-decorator": true, "no-input-rename": true, "no-output-rename": true, "use-life-cycle-interface": true, "use-pipe-transform-interface": true, "component-class-suffix": true, "directive-class-suffix": true, "class-name" : false, "variable-name" : false, "one-line" : true, "no-boolean-literal-compare" : false, "no-angle-bracket-type-assertion" : false, "binary-expression-operand-order" : false, "arrow-return-shorthand" : false, "jsdoc-format" : false, "interface-over-type-literal" : false, "no-irregular-whitespace" : false, "number-literal-format" : false, "whitespace" : false, "curly" : false, "typedef-whitespace":[ false, { "call-signature": "nospace", "index-signature": "nospace", "parameter": "nospace", "property-declaration": "nospace", "variable-declaration": "nospace" }, { "call-signature": "onespace", "index-signature": "onespace", "parameter": "onespace", "property-declaration": "onespace", "variable-declaration": "onespace" } ], "ban-types": [ false, [ "Object", "Use {} instead." ], ["String"] ], "prefer-const": false, "no-trailing-whitespace": false, "comment-format": false } }
ます。https://blog.51cto.com/aonaufly/2404302で再現