0

I can't find the solution to this.. i'm learning eslint and installed the required dependencies for airbnb config. It is working fine, but once i fixed the problems that eslint gives it simply returns the same errors when i save the file. Mostly it returns the 'String must use single quotes' , 'Missing trailing comma'

.eslintrc

{
  "extends": ["airbnb"],
  "parser": "babel-eslint",
  "rules": {
    "linebreak-style": ["error", "windows"],
    "class-methods-use-this": 0,
    "import/no-named-as-default": 0,
    "react/jsx-filename-extension": [
      "error",
      {
        "extensions": [".js", ".jsx"]
      }
    ]
  }
}

.babelrc

{
  "presets": ["react", "es2015"],
  "plugins": ["transform-class-properties", "transform-object-rest-spread"]
}

.package.json

"eslint": "^5.3.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.1",
"eslint-plugin-prettier": "^3.0.0",
"eslint-plugin-react": "^7.11.0",
"prettier": "1.14.3",
"babel-core": "^6.26.0",
"babel-eslint": "^10.0.1",
"babel-loader": "^7.1.4",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",

1 Answers1

0

It turns out to be a conflict between prettier and eslint

adding prettier in eslintrc extends solve the problem