emotion icon indicating copy to clipboard operation
emotion copied to clipboard

Eslint problem after upgrading to Next v11.1.2

Open tiavina-mika opened this issue 3 years ago • 1 comments

I do not know if the bug is related to Emotion or not, but these following eslint configuration working since I upgraded Next.js to the latest v11.1.2. The next lint --fix --dir src does not fix the code anymore.

.babelrc

.babelrc

{
  "presets": [
    [
      "next/babel",
      {
        "preset-react": {
          "runtime": "automatic",
          "importSource": "@emotion/react"
        }
      }
    ]
  ],
  "plugins": ["@emotion/babel-plugin"]
}

package.json

  "scripts": {
    "lint": "next lint --fix --dir src",
  },
  "dependencies": {
    "@ant-design/icons": "^4.6.4",
    "@emotion/css": "^11.1.3",
    "@emotion/react": "^11.4.0",
    "@emotion/styled": "^11.3.0",
    "next": "^11.1.2",
  },
  "devDependencies": {
    "@emotion/babel-plugin": "^11.3.0",
    "eslint": "^7.31.0",
    "eslint-config-airbnb": "^18.2.1",
    "eslint-config-next": "^11.1.2",
    "eslint-config-prettier": "^8.3.0",
    "eslint-plugin-import": "^2.23.4",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-prefer-arrow": "^1.2.3",
  }

eslint.json

{
  "extends": ["airbnb", "next"],
  "plugins": [
    "prefer-arrow"
  ],
  ...
}

tiavina-mika avatar Sep 24 '21 06:09 tiavina-mika

Please always try to share a repro case in a runnable form - either by providing a git repository to clone or a codesandbox. OSS maintainers usually can't afford the time to set up the repro, even if exact steps are given.

Andarist avatar Sep 24 '21 10:09 Andarist