运行lint script "lint": "eslint --ext .js ."时,会出现以下错误:

错误:.eslintrc»eslint config airbnb»//node_modules/eslint config airbnb base/index.js»//node_modules/eslint config airbnb base/rules/imports.js:

包裹json:

 "devDependencies": {
    "@babel/core": "7.9.0",
    "@babel/runtime": "7.9.2",
    "@babel/parser": "7.11.5",
    "@react-native-community/eslint-config": "1.0.0",
    "babel-eslint": "10.1.0",
    "babel-jest": "25.2.3",
    "babel-plugin-module-resolver": "4.0.0",
    "babel-preset-react-native": "4.0.1",
    "bluebird": "3.7.2",
    "catharsis": "0.8.11",
    "cross-env": "7.0.2",
    "escape-string-regexp": "2.0.0",
    "eslint": "6.8.0",
    "eslint-config-airbnb": "18.1.0",
    "eslint-config-react-native": "4.0.0",
    "eslint-plugin-import": "2.20.1",
    "eslint-plugin-jsx-a11y": "6.2.3",
    "eslint-plugin-react": "7.19.0",
    "eslint-plugin-react-hooks": "3.0.0",
    "eslint-plugin-react-native": "3.8.1",
    "husky": "4.2.3",
    "jest": "25.2.3",
    "jest-fetch-mock": "3.0.3",
    "jest-junit": "10.0.0",
    "jest-transform-stub": "2.0.0",
    "js2xmlparser": "4.0.1",
    "jsdoc": "3.6.6",
    "klaw": "3.0.0",
    "markdown-it": "10.0.0",
    "markdown-it-anchor": "5.2.7",
    "marked": "0.8.2",
    "metro-react-native-babel-preset": "0.59.0",
    "mkdirp": "1.0.4",
    "node": "12.10.0",
    "npm-check": "5.9.2",
    "react-test-renderer": "16.13.1",
    "redux-mock-store": "1.5.4",
    "requizzle": "0.2.3",
    "strip-json-comments": "3.1.0",
    "taffydb": "2.6.2",
    "underscore": "1.10.2"
  },

推荐答案

根据这条线索

您需要将eslint-plugin-import更新为^2.22.1,支持值.

React-native相关问答推荐

FlatList有时不会在数据更改时重新呈现

expo 日历应用因权限问题而崩溃

如何在 react native 中以 redux 形式设置隐藏字段?

如何在 React-Native 中创建检测自动位置的map

在根项目ReactNativeStarter中找不到任务installRelease

检索元素的父项时出错:找不到与给定名称android:TextAppearance.Material.Widget.Button.Colored匹配的资源

React-native android 样式化 textInput

迷失在 Ionic、Cordova 等混合应用程序框架中

在 UIManager 中找不到RNCSafeAreaView

没有找到 `React-fishhook` 的 podspec

如何使用特定目标运行 react-native run-ios

是否需要使用 StyleSheet.create?

Xcode 12 - 没有要编译的架构(ONLY_ACTIVE_ARCH=YES,active arch=x86_64,VALID_ARCHS=arm64e armv7s arm64 arm7)

尽管 TypeScript 编译器错误,为什么我的 React Native 应用程序构建成功?

如何在android studio中导入react native元素

当前未启用语法nullishCoalescingOperator

降级 react-native 的适当机制

Mapping children of a parent component

无法读取未定义的属性 string| React.PropTypes | LayoutPropTypes.js

NavigationActions.reset 不是函数吗?