Nutritious Pancake Mountain

    @josundt/sass-lint-config

    1.0.2 • Public • Published

    @josundt/sass-lint-config

    Ruleset for sass (scss) code style and linting

    Usage

    1. Install this package

    2. Add the following to your package.json file:

      {
        "sasslintConfig": "node_modules/@josundt/sass-lint-config/.sasslintrc"
      }
    3. Add npm task in package.json

      {
        "scripts": {
          "lint:sass": "sass-lint src/**/*.scss --format visualstudio -v"
      },
      }
    4. When using Visual Studio Code:

      a) Install the sass-lint extension ("glen-84.sass-lint"), and add it to the recommmended extensions for the workspace (".vscode/extensions.json").

      b) Add a task in ".vscode/tasks.json" to run sass-lint as a VSCode task for the whole workspace:

      {
        "version": "2.0.0",
        "runner": "terminal",
        "tasks": [
          {
            "label": "lint:sass",
            "type": "shell",
            "command": "npx",
            "args": [
              "sass-lint",
              "src/**/*.scss",
              "--format",
              "stylish",
              "-v"
            ],
            "group": "build",
            "presentation": {
              "echo": true,
              "reveal": "silent",
              "focus": false,
              "panel": "shared"
            },
            "problemMatcher": {
              "base": "$eslint-stylish",
              "fileLocation": [
                "relative",
                "${workspaceRoot}"
              ],
              "source": "lint:sass"
            }
          }
        ]
      }

    Install

    npm i @josundt/sass-lint-config

    DownloadsWeekly Downloads

    3

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    6.96 kB

    Total Files

    4

    Last publish

    Collaborators

    • josundt