Eslintは以下のセットアップで動作しますが、エラーはほとんどありません。わかりません。私はmeteor npm run lint
NPMは以下のエラーがスローされます実行したときにあなたが見ることができるようにeslintスクリプトがmeteor run npm eslintで失敗する
。それは糸くずを完了し、それが完了に失敗したと言いますか? --UPDATE--この問題は、exit 0属性を追加して、eslitプロセスを正常に終了するように修正しました。あなたが同じ問題に遭遇するなら、私のpackage.json行を見てください。
"lint": "eslint .;exit 0",
これを修正するには。参照のためにこれを残す問題は、流星からのインポートを無視する方法を私は確信していません。私は
eslint-plugin-meteor
で試して、インポートリゾルバの流星を有効にするが、それは動作していないようです。 --UPDATE--以下の問題が修正されるまで、私はhttps://github.com/clayne11/eslint-import-resolver-meteor/issues/11]が/Users/kimmo/Documents/carecity/server/main.js 参照のためにこれを残して[、以下の質問に.eslintrcファイルにエラーを沈黙1:1エラー 'meteor'はプロジェクトの依存関係に表示されるべきです。 1:24エラーモジュール「meteor/meteor」のインポート/未解決のパスを解決できません
✖2問題(2エラー、エラー、 0警告)
npm ERR!ダーウィン14.5.0 npm ERR! argv "/Users/kimmo/.meteor/packages/meteor-tool/.1.4.1_1.1ugzqvs++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/ノード "" /Users/kimmo/.meteor/packages/meteor-tool/.1.4.1_1.1ugzqvs++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm ""実行 "" lint " npm ERR!ノードv4.5.0 npm ERR! npm v3.10.6 npm ERR!コードELIFECYCLE npm ERR!ケアシティ@ lint:
eslint .
npm ERR!終了ステータス1 npm ERR! npm ERR! carecity @ lintスクリプト 'eslint'で失敗しました。 npm ERR! node.jsとnpmの最新バージョンがインストールされていることを確認してください。 npm ERR!そうした場合、これはケアシティパッケージの問題である可能性が最も高いです。 npm ERR! npm自体ではありません。 npm ERR!あなたのシステムでこれが失敗することを作者に伝えてください: npm ERR! eslint。 npm ERR!このプロジェクトの問題を開く方法に関する情報は、 npm ERR! npmバグのケアシティ npm ERR!それが利用できない場合は、 npm ERR!経由で情報を入手できます。 npmオーナーlsケアシティ npm ERR!上記のログ出力が追加される可能性があります。npm ERR!サポートリクエストに以下のファイルを含めてください: npm ERR! /Users/kimmo/Documents/carecity/npm-debug.log
下のマイpackage.jsonファイル>
{
"name": "carecity",
"private": true,
"scripts": {
"start": "meteor run",
"lint": "eslint .;exit 0",
"pretest": "npm run lint --silent"
},
"eslintConfig": {
"parser": "babel-eslint",
"parserOptions": {
"allowImportExportEverywhere": true
},
"plugins": [
"meteor"
],
"extends": [
"airbnb",
"plugin:meteor/recommended"
],
"settings": {
"import/resolver": "meteor"
},
"rules": {}
},
"dependencies": {
"algoliasearch": "^3.18.1",
"instantsearch.js": "^1.8.5",
"material-icons": "^0.1.0",
"material-ui": "^0.15.4",
"meteor-node-stubs": "~0.2.0",
"react": "^15.3.1",
"react-addons-pure-render-mixin": "^15.3.1",
"react-dom": "^15.3.1",
"react-router": "^2.8.0",
"react-tap-event-plugin": "^1.0.0",
"roboto-fontface": "^0.6.0"
},
"devDependencies": {
"babel-eslint": "^6.1.2",
"eslint": "^3.5.0",
"eslint-config-airbnb": "^11.1.0",
"eslint-import-resolver-meteor": "^0.3.3",
"eslint-plugin-import": "^1.14.0",
"eslint-plugin-jsx-a11y": "^2.2.1",
"eslint-plugin-meteor": "^4.0.0",
"eslint-plugin-react": "^6.2.0",
"faker": "^3.1.0",
"getstorybook": "^1.4.5"
}
}
マイ.eslintrcファイル>
// Temporary fix for errors caused by airbnb rules https://github.com/airbnb/javascript/issues/978
// "import/no-extraneous-dependencies": "off" and "settings": { "import/core-modules": [ "meteor/meteor" ] }
// added temperatery to to silence meteor import warning see issue > https://github.com/clayne11/eslint-import-resolver-meteor/issues/11
{
"extends": "airbnb",
"rules": {
"react/require-extension": "off",
"import/no-extraneous-dependencies": "off"
},
"settings": {
"import/core-modules": [ "meteor/meteor" ]
}
}
更新するだけで、私は上記の問題を解決しました –