* Added styelint to `ui/admin' * refactor: 💡 quick refactor Refactor attribute name back to original ✅ Closes: ICU-7083 * Update _notify.scss for got to set the calling of the animation back in the selector * refactor: 💡 quick refactor for stylelintrc file possible pattern selector settings * refactor: 💡 added rule for selector class pattern Added rule for kebab-case, HDS, and CodeMirror ✅ Closes: ICU-7083 * Update app.scss fixed linting errors. * refactor: 💡 refactor stylelintrc Simplify regex for `stylelintrc` and added comments that details what the regex is doing. ✅ Closes: ICU-7083 * Update ui/admin/.stylelintrc.js Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com> Co-authored-by: Randall Morey <randall@randallmorey.com> Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
34 lines
1.3 KiB
JavaScript
34 lines
1.3 KiB
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
extends: ['stylelint-config-standard-scss', 'stylelint-config-prettier-scss'],
|
|
rules: {
|
|
// We oftentimes want to have long form properties for readability
|
|
'declaration-block-no-redundant-longhand-properties': null,
|
|
|
|
// This is just a personal preference unless the quotes are needed
|
|
// to escape special characters
|
|
'function-url-quotes': null,
|
|
|
|
// This is often limited by the DOM and we want to order our declarations by our own standard
|
|
'no-descending-specificity': null,
|
|
|
|
// -Webkit animation CSS for older browsers. Need a decision to remove `-webkit` syntax in
|
|
// favor of normal CSS
|
|
'property-no-vendor-prefix': null,
|
|
'at-rule-no-vendor-prefix': null,
|
|
|
|
// As a team we want to stick to using kebab-case as our selector class pattern, but there are a couple
|
|
// of exceptions in which we overrride CSS from addons like CodeMirror and HDS, in which they use
|
|
// pascal case and a double-kebab-case. This regex checks for all of those 3 patterns and won't fail
|
|
// lint check, but will fail if its any other pattern.
|
|
'selector-class-pattern': [
|
|
'(^([a-z][a-z0-9]*)(-{1,2}[a-z0-9]+)*$)|(^CodeMirror)',
|
|
{
|
|
message: (selector) =>
|
|
`Expected class selector "${selector}" to be kebab-case`,
|
|
},
|
|
],
|
|
},
|
|
};
|