MensaToday / mensa-today

Daily mensa recommendations for students and lecturers in Münster/Germany.
GNU General Public License v3.0
4 stars 0 forks source link

Vue Linting error #171

Closed martenjostmann closed 1 year ago

martenjostmann commented 1 year ago

I was trying to start the frontend but I get this error: ERROR Invalid options in vue.config.js: "rules" is not allowed Is there a package missing?

Steps to reproduce:

  1. docker-compose -f docker-compose.local.yaml down
  2. docker-compose -f docker-compose.local.yaml up --build
lgiesen commented 1 year ago

It worked with my previous docker build and after reproducing your steps I also don't have an error. I don't understand how it could cause an error with your device. The rules have been defined from the beginning of the project a month ago. The linting (changing the ' to " should also not cause the error. Screenshot 2022-12-24 at 12 40 25

lgiesen commented 1 year ago

I don't know if it is because of dependencies. The difference in linting packages between the development and linting branch is the following: development "devDependencies": { "@babel/eslint-parser": "^7.12.16", "@vue/cli-plugin-eslint": "~5.0.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-vue": "^8.0.3", "lint": "^0.8.8", } linting: "devDependencies": { "@babel/eslint-parser": "^7.12.16", "@vue/cli-plugin-eslint": "~5.0.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-loader": "^4.0.2", "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-vue": "^8.7.1", "lint": "^0.8.8", }

martenjostmann commented 1 year ago

image

martenjostmann commented 1 year ago

Also every tutorial regarding eslint put there configurations inside of the .eslintrc.js. Maybe you should have a look at this.

lgiesen commented 1 year ago

It worked with my previous docker build and after reproducing your steps I also don't have an error. I don't understand how it could cause an error with your device. The rules have been defined from the beginning of the project a month ago. The linting (changing the ' to " should also not cause the error. Screenshot 2022-12-24 at 12 40 25

Oh, I searched in the .eslintrc.js instead of the vue.config.js.

Since, I cannot reproduce the error, it is hard to debug. I followed the following tutorial. It says to put the rules in the webpack.config.js, but there is none in our project. According to this StackOverflow thread, it should be defined in the vue.config.js (which I did previously). I tried to adjust it (see #174), but I cannot test if it solves your error. It is weird that I do not receive it.

lgiesen commented 1 year ago

note to myself: lint with cd frontend && npm run lint, if it doesn't do it already on save