I have been searching Github and Stack Overflow for the past hour with no answer on how to fix this problem with ES-Lint.
.eslintrc.json
{
"parser": "babel-eslint",
"extends": ["airbnb", "prettier"],
"plugins": ["prettier", "flowtype"],
"rules": {
"prettier/prettier": ["error"],
"no-unused-expressions": 0,
"react/jsx-filename-extension": 0,
"class-methods-use-this": 0,
"default-case": 0,
"import/no-unresolved": 0,
"react/prefer-stateless-function": 0,
"import/no-named-as-default": 0
},
"parserOptions": {
"sourceType": "module",
"import/extensions": [".jsx", ".js"],
"allowImportExportEverywhere": true
}
}
devDependencies
"devDependencies": {
"@babel/plugin-transform-runtime": "^7.1.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.7.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^3.1.0",
"eslint-plugin-flowtype": "^2.34.1",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-prettier": "^3.0.0",
"eslint-plugin-react": "^7.11.1",
"flow-bin": "0.78.0",
"jest": "23.5.0",
"jest-react-native": "18.0.0",
"metro-react-native-babel-preset": "^0.45.0",
"prettier": "1.14.1",
"react-native-debugger-open": "0.3.17",
"react-test-renderer": "16.0.0-alpha.12",
"schedule": "0.4.0",
"semver": "5.5.0"
},
All of the linter options are working which is great, but there is no way I can let other people use this config if I am getting errors for every single import statement throughout the entire app.
Does anyone have any idea what could be going on?
These steps might work:
path
to path.ts
path
Just disable that rule to rrsolve this issue insted of uninstalling ESLint
"Unfortunately, React + Redux is the most common scenario. However, there are lots of other cases where HOCs will force developers to shut down this rule."
https://github.com/benmosher/eslint-plugin-import/issues/544
https://github.com/reactjs/react-redux/issues/119
https://github.com/18F/calc/pull/1235
.eslintrc
"rules": {
"import/no-named-as-default": 0
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With