Linting

Learn how to enable Linting within your project

Frontal has support for linting for both Javascript using ESLint and CSS using Stylelint, but they are disabled by default.

Enabling ESLint

To enable ESLint, all you need is to create a file named .eslintrc.json within the root directory of your project with the following contents:

{
    "parserOptions": {
        "ecmaVersion": 6,
        "sourceType": "module",
        "ecmaFeatures": {
            "jsx": true
        }
    },
    "rules": {
        "semi": "error"
    }
}

You can refer to the ESLint documentation for further instructions on how to configure the linter.

Enabling StyleLint

As for ESLint, to enable Stylelint, create a file named .stylelintrc.json within the root directory of your project with the following contents:

{
  "rules": {
    "color-no-invalid-hex": true
  }
}

You can refer to the StyleLint documentation for further instructions on how to configure the linter.

Would You Like To KnowAbout Our Next Products & Free Tools?