lint and prettier command are throwing error on running

Viewed 21

I m trying to setup eslint, prettier, husky for pre commit. But as of now just wanted to run lint and prettier in terminal. But while running lint and format I m getting below error.

//package.json
"scripts": {
   .
   .
   .
    "lint": "eslint .",
    "lint:fix": "eslint --fix .",
    "format": "prettier --write ."
  },
 "devDependencies": {
    "eslint": "^8.23.0",
    "eslint-config-airbnb": "^19.0.4",
    "eslint-config-prettier": "^8.5.0",
    "eslint-config-react-app": "^7.0.1",
    "eslint-plugin-import": "^2.26.0",
    "eslint-plugin-jsx-a11y": "^6.6.1",
    "eslint-plugin-prettier": "^4.2.1",
    "eslint-plugin-react": "^7.31.8",
    "eslint-plugin-react-hooks": "^4.6.0",
    "husky": "^8.0.1",
    "jest-editor-support": "^30.1.0",
    "lint-staged": "^13.0.3",
    "prettier": "^2.7.1",
    "sass": "^1.54.4"
  }

//terminal> npm run lint

> eslint .

Oops! Something went wrong! :(

ESLint: 8.21.0

ESLint couldn't find the config "airbnb" to extend from. Please check that the name of the config is correct.

The config "airbnb" was referenced from the config file

 //terminal> npm run format
    > prettier --write .
    
    'prettier' is not recognized as an internal or external command,
    operable program or batch file.
0 Answers
Related