sheerun / prettier-standard

Formats with Prettier and lints with ESLint+Standard! (✿◠‿◠)
MIT License
868 stars 44 forks source link

eqeqeq rule wrong? #69

Closed chasm closed 5 years ago

chasm commented 5 years ago

Is this some kind of version conflict?

prettier-eslint [ERROR]: There was trouble creating the ESLint CLIEngine.
prettier-standard [ERROR]: There was an error formatting "src/index.js":
    Error: CLI:
        Configuration for rule "eqeqeq" is invalid:
        Value "smart" should be equal to one of the allowed values.
        Value ["smart",{"null":"ignore"}] should NOT have more than 1 items.
        Value ["smart",{"null":"ignore"}] should match some schema in anyOf.

My package.json file:

  "dependencies": {
    "@babel/polyfill": "^7.0.0",
    "connected-react-router": "^5.0.0",
    "prettier-eslint": "^8.8.2",
    "prop-types": "^15.6.2",
    "ramda": "^0.25.0",
    "ramda-adjunct": "^2.11.0",
    "react": "^16.7.0-alpha.0",
    "react-dom": "^16.7.0-alpha.0",
    "react-helmet": "^5.2.0",
    "react-redux": "^5.1.0",
    "react-router": "^4.3.1",
    "react-router-dom": "^4.3.1",
    "react-scripts": "2.1.1",
    "redux": "^4.0.1",
    "redux-observable": "^1.0.0",
    "rxjs": "^6.3.3",
    "styled-components": "^4.0.3",
    "styled-map": "^3.2.0-rc.1",
    "styled-normalize": "^8.0.3"
  },
  "scripts": {
    "build": "react-app-rewired build",
    "coverage": "react-app-rewired test --env=jsdom --coverage",
    "format": "prettier-standard 'src/**/*.js'",
    "start": "react-app-rewired start",
    "test": "react-app-rewired test --env=jsdom"
  },
  "lint-staged": {
    "linters": {
      "src/**/*.js": [
        "prettier-standard",
        "git add"
      ]
    }
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ],
  "devDependencies": {
    "@babel/core": "^7.1.2",
    "@babel/parser": "^7.1.3",
    "@babel/plugin-proposal-async-generator-functions": "^7.1.0",
    "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
    "@babel/plugin-transform-runtime": "^7.1.0",
    "@babel/preset-env": "^7.1.0",
    "@babel/preset-react": "^7.0.0",
    "babel-jest": "^23.6.0",
    "enzyme": "^3.7.0",
    "enzyme-adapter-react-16": "^1.6.0",
    "enzyme-to-json": "^3.3.4",
    "eslint": "5.6.0",
    "eslint-plugin-jsx-a11y": "^6.1.2",
    "eslint-plugin-react": "^7.11.1",
    "husky": "^1.1.3",
    "import-sort": "^5.2.0",
    "import-sort-style-airkro": "^0.1.5",
    "jest": "^23.6.0",
    "jest-enzyme": "^7.0.1",
    "jest-styled-components": "^6.2.2",
    "lint-staged": "^8.0.4",
    "prettier-standard": "^8.0.1",
    "react-app-rewire-eslint": "^0.2.3",
    "react-app-rewire-styled-components": "^3.0.2",
    "react-app-rewired": "^1.6.2",
    "redux-devtools-extension": "^2.13.5"
  }
chasm commented 5 years ago

Backing up to version 7.0.1 fixes the problem.

chasm commented 5 years ago

Unfortunately, that creates a new problem by hoisting ESLint 4.9.1, which conflicts with create-react-app which requires 5.6.0. JavaScript wins again, I lose. I'm going to have to give up on prettier-standard, sadly, as I don't have time to fix this. But thanks! I'll check back to see if things get updated later.

cdaringe commented 5 years ago

a fresh create-react-app + prettier-standard induces this failure mode at current time

chasm commented 5 years ago

Anyone home?

sheerun commented 5 years ago

prettier-standard 9.0.0 no longer uses eslint --fix for formatting so it should fix this problem