0
linter
とlinter-eslint
モジュールはアトムeslintは
にインストールされているネイティブプロジェクトを反応させる反応ネイティブプロジェクトを作成します
react-native init AwesomeApp
yarn add babel-eslint eslint-config-airbnb-base eslint-plugin-react eslint-plugin-react-native --dev
必要なノードモジュールをインストール.eslintrc
ファイルを作成します。 :
{
"parser": "babel-eslint",
"plugins": [
"react",
"react-native"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"modules": true
}
},
"extends" : [
"eslint:recommended",
"plugin:react/recommended",
"airbnb-base"
],
"rules" : {
"arrow-body-style" : 'warn'
}
}
私はアトムを開いたとき、私はここでエラー
を得るのdevのツールからのスタックトレースです:
/Volumes/Macintosh HD 3/.atom/packages/linter/lib/linter-registry.js:159 [Linter] Error running ESLint Error: Failed to load plugin react-native: Cannot find module 'eslint-plugin-react-native'
at Function.Module._resolveFilename (module.js:455:15)
at Function.resolve (internal/module.js:27:19)
at Object.load (/Volumes/Macintosh HD 3/.atom/packages/linter-eslint/node_modules/eslint/lib/config/plugins.js:134:29)
at Array.forEach (native)
at Object.loadAll (/Volumes/Macintosh HD 3/.atom/packages/linter-eslint/node_modules/eslint/lib/config/plugins.js:162:21)
at Object.load (/Volumes/Macintosh HD 3/.atom/packages/linter-eslint/node_modules/eslint/lib/config/config-file.js:541:21)
at loadConfig (/Volumes/Macintosh HD 3/.atom/packages/linter-eslint/node_modules/eslint/lib/config.js:63:33)
at new Config (/Volumes/Macintosh HD 3/.atom/packages/linter-eslint/node_modules/eslint/lib/config.js:229:42)
at CLIEngine.executeOnText (/Volumes/Macintosh HD 3/.atom/packages/linter-eslint/node_modules/eslint/lib/cli-engine.js:741:28)
at lintJob (/Volumes/Macintosh HD 3/.atom/packages/linter-eslint/lib/worker.js:50:51)
アトムは、最新の、私は1.18.0を実行していますよさx64
eslint-plugin-react-native
はプロジェクト内にインストールされています。私は何が欠けているすべてのアイデア?この行を削除する私にとっては