Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update eslint and babel-eslint #12

Open
grantglidewell opened this issue Nov 13, 2019 · 3 comments
Open

Update eslint and babel-eslint #12

grantglidewell opened this issue Nov 13, 2019 · 3 comments

Comments

@grantglidewell
Copy link
Contributor

likely other deps need attention, this will make the package compatible with CRA

@grantglidewell
Copy link
Contributor Author

Failed to load plugin 'import' declared in '.eslintrc.json
error is due to incompatibility with eslint-config-airbnb and eslint6.x

@grantglidewell
Copy link
Contributor Author

possible replacement

{
  "settings": {
    "eslint.packageManager": "yarn"
  },
  "env": {
    "browser": true,
    "node": true,
    "es6": true
  },
  "plugins": ["prettier", "react-hooks"],
  "extends": ["airbnb", "plugin:prettier/recommended", "prettier/react"],
  "rules": {
    "arrow-parens": "off",
    "implicit-arrow-linebreak": "off",
    "import/order": [
      "warn",
      {
        "newlines-between": "always"
      }
    ],
    "no-console": 1,
    "no-confusing-arrow": "off",
    "no-unused-vars": 1,
    "no-use-before-define": 1,
    "prettier/prettier": "warn",
    "react/forbid-prop-types": 0,
    "react/prop-types": 1,
    "react/require-default-props": 1,
    "react/jsx-one-expression-per-line": 1,
    "react/jsx-filename-extension": [
      1,
      {
        "extensions": [".js"]
      }
    ],
    "react-hooks/rules-of-hooks": "error",
    "react-hooks/exhaustive-deps": "warn"
  }
}

@grantglidewell
Copy link
Contributor Author

works in CRA:

"devDependencies": {
    "eslint": "6.6.0",
    "eslint-config-airbnb": "18.0.1",
    "eslint-config-prettier": "6.5.0",
    "eslint-plugin-import": "2.18.2",
    "eslint-plugin-jsx-a11y": "6.2.3",
    "eslint-plugin-prettier": "3.1.1",
    "eslint-plugin-react": "7.16.0",
    "eslint-plugin-react-hooks": "2.2.0",
    "husky": "1.3.1",
    "prettier": "1.19.1",
    "pretty-quick": "1.10.0"
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant