-
Notifications
You must be signed in to change notification settings - Fork 8
Installation: SassLint (SCSS Linting)
Sass Lint will inspect Sass partials, and alert you if code fails both WordPress and WDS code standards.
-
To install, run the following NPM command:
npm install -g sass-lint
-
Add SassLint to your PATH.
PATH=${PATH}:/usr/local/bin/sass-lint
By default, code editors and IDE's will look at your project root and scan up the directory tree, looking for .sass-lint.yml
. If cannot find one, it will fall back to your /User/
directory.
-
Install Sass Lint (by glen-84) extension
-
Open Settings, set the path to the WDS ruleset, in your config:
"sasslint.configFile": "/Users/path/to/WebDevStudios/.sass-lint.yml",
-
Install SublimeLinter-contrib-sass-lint using Package Control.
-
Next, set the path to the the WDS ruleset, in your config:
Preferences --> Package Settings --> SublimeLinter --> Settings - User
"linters": { "sass": { "@disable": false, "args": [ "--config=/Users/path/to/WebDevStudios/.sass-lint.yml" ], "excludes": [] }, },
Install Linter Sass-Lint via APM:
-
apm install linter linter-sass-lint
-
Go to "Settings --> Packages --> Linter Sass Lint"
-
Set the path to the the WDS ruleset, in your config:
-
Click on the “Configure” cog and select “Plugins.”
-
Search for “sass.” Select “SassLint” and click “Install.” Close the dialog box.
-
Click on the “Configure” cog and select “Preferences.”
-
Navigate to “Other Settings –> Sass Lint.” Check the “Enable” box.
-
Place your mouse cursor in the “Node interpreter” and phpStorm should auto populate. Select "Use specific config file"
- Set the path to the
.sass-lint.yml
file.
- Set the path to the