-
Notifications
You must be signed in to change notification settings - Fork 0
Update to Stylelint
Ashley Kolodziej edited this page Apr 30, 2020
·
1 revision
- Run
npm install stylelint
- Run
npm install stylelint-config-wordpress
- Run
npm uninstall grunt-sass-lint
- Add the following files: .stylelintrc.json
- Remove the following files: .sasslintrc
- In codeclimate.yml, under prepare: fetch, change the first url and path parameters to the following:
- url: "https://raw.githubusercontent.com/bu-ist/coding-standards/master/code-climate-rule-sets/.stylelintrc.json" path: ".stylelintrc.json"
- Add
stylelint: enabled: true config: file_extensions: scss
to engines - Remove
sass-lint: enabled: true
from engines - Remove the
sasslint
task and allsasslint
calls fromGruntfile.js
- In package.json, add the following two scripts:
"styles:lint": "stylelint \"**/*.scss\" --cache || echo \"\"",
"styles:fix": "stylelint \"**/*.scss\" --cache --fix --s || echo \"\" && npm run styles:fix:success --s && npm run styles:fix:warn --s",
"styles:fix:success": "echo \"\\033[32mSuccess! Fixed style errors where possible.\\x1b[0m\"",
"styles:fix:warn": "echo \"\\033[33m\nErrors which could not be resolved automatically are listed above. Please review changes carefully in Tower or your git management tool of choice before committing, as errors can occur, especially in Sass maps.\n\\x1b[0m\""
Finally, test by doing the following:
Run npm install
Run npm run styles:lint
Get started
Configuration
Build child themes
- Customizing CSS in a child theme
- Overriding templates in a child theme
- Code patterns
- Code reviews
- Pulling in Foundation Updates
- Merging and Creating a Pull Request
Sass
Javascript
PHP
- Coding Standards
- PHP Constants
- Temp PHP Code Patterns
- PHP Snippets
- How to Use Hooks
- Action Hooks
- Using Action Hooks To Output Markup
- Filter Hooks
Shortcodes
Templates
GitHub
Tasks
Contribute to the framework
- Framework Development and Release Workflows
- Documentation Template
- Testing your changes
- Creating a new release
- Migration Guide
- Needs Documentation
Code Examples
- Adding Content Container Classes
- Adding News Templates
- Adding Script Dependencies
- Changing Available Layouts and Default Layout
- Displaying a Fancy Gallery
- Loading a Custom Build of Modernizr
- Loading Modernizr in the Footer
- Using Action Hooks To Output Markup
- Understanding get_template_part
BU Developer Resources