cse110-sp23-group21 / map-my-future

CSE 110 (Software Engineering) Team Project
1 stars 1 forks source link

Update Fortune Stick mini-app to pass Linters #86

Closed gilkeidar closed 1 year ago

gilkeidar commented 1 year ago

Task Description: Update the Fortune Stick mini-app to pass HTML, CSS, and JS linting.

Recommended Approach:

Tips:

JavaScript linting: The JavaScript linter we use is called Semi-Standard. You can make passing the JS linter easy by downloading the VSCode extension for it here. Make sure to set the "Engine" to "semistandard" in the extension settings.

The linter giving you trouble for something you don't need to fix (e.g., defining a variable in switch case statement)? You can disable particular lines / sections of your code. See how here: https://flaviocopes.com/how-to-disable-eslint-rule/

HTML & CSS: Our HTML and CSS linting is done using Superlinter, which is essentially a collection of linters for many languages. In particular, it uses HTMLHint for HTML linting and Stylelint for CSS linting.

You can download the HTMLHint extension if you're using VSCode here.

I don't think you can disable linting on a line in HTML sadly - but if you find a way, please update this issue!

Update: I didn't find a way to disable linting on a line in HTML, but if you absolutely can't fix something due to a particular rule, you can disable it by listing the rule in the .htmlhintrc config file at the top-level of the repository and setting its value to false. E.g., for the rule tagname-lowercase, the contents of .htmlhintrc can be:

{
    "tagname-lowercase": false,
    // add any other rules to disable here
}

You can download the Stylelint extension if you're using VSCode here.

To disable linting on a line in CSS, see https://stylelint.io/user-guide/ignore-code

justin-chiang commented 1 year ago

finished, waiting for review