Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
[misc] update Stylelint rules, closes #159
Browse files Browse the repository at this point in the history
  • Loading branch information
ArmorDarks committed Feb 25, 2017
1 parent 4a0595e commit 60484ac
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 33 deletions.
41 changes: 11 additions & 30 deletions .stylelintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ plugins:
extends: stylelint-config-standard

rules:
rule-empty-line-before:
- always-multi-line
- ignore:
- after-comment

# Issues
# ------
Expand Down Expand Up @@ -107,30 +111,13 @@ rules:
block-no-empty: null
function-max-empty-lines: 1
no-missing-end-of-source-newline: null
rule-nested-empty-line-before:
- always-multi-line
- ignore:
- after-comment
selector-pseudo-element-colon-notation: single
number-leading-zero: never

# Additions
# ---------

# @todo Falsy reports Sass map properties as color names
# $colors: (
# ivory: #fffff3,
# black: rgba(0, 0, 0, .3)
# );
# color-named: never

# @todo Doesn't work with Sass variables sets
# https://github.com/stylelint/stylelint/issues/871
# no-browser-hacks: true

declaration-block-no-ignored-properties: true
media-feature-no-missing-punctuation: true
selector-no-empty: true
color-named: never
font-family-name-quotes: always-where-required
function-url-quotes: always
selector-attribute-quotes: always
Expand All @@ -140,7 +127,10 @@ rules:
property-no-vendor-prefix: true
selector-no-vendor-prefix: true
value-no-vendor-prefix: true
max-nesting-depth: 3
max-nesting-depth:
- 3
- ignore:
- blockless-at-rules
selector-max-compound-selectors: 3
selector-max-specificity: 0,3,0
declaration-no-important: true
Expand All @@ -151,7 +141,6 @@ rules:
selector-no-universal: true
declaration-block-no-redundant-longhand-properties: null # harmful rule
font-weight-notation: named-where-possible
selector-root-no-composition: true
function-url-no-scheme-relative: true
at-rule-no-unknown:
- true
Expand Down Expand Up @@ -218,17 +207,15 @@ rules:
# main_wrong___block--modif
selector-class-pattern:
- ^([A-Z]?[a-z]*[-]?[a-z0-9\-]*)(\.[a-z0-9\-]*)?(__[a-z0-9]*[-]?[a-z0-9\-]*)?(--[a-z0-9]*[-]?[a-z0-9\-]*)?(\:[a-z]*)*([\\+\-]*?)*$
# @todo Temporary disabled due to issue with Sass `#{}` inside selectors
# - resolveNestedSelectors: true
- resolveNestedSelectors: true
selector-id-pattern: ^([A-Z]?[a-z]*[-]?[a-z0-9\-]*)(\.[a-z0-9\-]*)?(__[a-z0-9]*[-]?[a-z0-9\-]*)?(--[a-z0-9]*[-]?[a-z0-9\-]*)?(\:[a-z]*)*([\\+\-]*?)*$
declaration-block-semicolon-newline-before: never-multi-line
function-comma-newline-before: never-multi-line
media-query-list-comma-newline-before: never-multi-line
no-unknown-animations: true
root-no-standard-properties: true
selector-list-comma-newline-before: never-multi-line
selector-list-comma-space-after: always-single-line
time-no-imperceptible: true
time-min-milliseconds: 100
value-keyword-case:
- lower
- ignoreKeywords:
Expand All @@ -238,10 +225,6 @@ rules:
- Sprite--
value-list-comma-newline-before: never-multi-line
no-duplicate-selectors: true
rule-non-nested-empty-line-before:
- always-multi-line
- ignore:
- after-comment
# @todo Have some issues with Sass placeholders:
# `Expected selector "%#{$ekzo-objects-ns}nav > li > a" to come before selector ".#{$ekzo-objects-ns}nav > a"`
no-descending-specificity: true
Expand All @@ -250,8 +233,6 @@ rules:
# ---------

# selector-no-attribute: true
# no-unsupported-browser-features: true
# no-indistinguishable-colors: true

# Scss
# ---------
Expand Down
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- [nj] Removed `<link>` referencing `sitemap.xml` from header, since none of search providers supports this method. See [#88](https://github.com/LotusTM/Kotsu/issues/88). Sitemap referenced in `robots.txt` instead.

### Added
- [package] Moved development related tasks to `npm run` scripts.
- [package] Moved development-related tasks to `npm run` scripts.
- [tests] Added [Jest](https://facebook.github.io/jest/) for running tests.
- [tests] Added some basic tests for existing Kotsu modules.
- [modules][nj] Added [numbro.js](http://numbrojs.com) as global Nunjucks function `numbro`.
Expand All @@ -31,9 +31,10 @@

### Changed
- [package] Updated dependencies.
- [package] Replace `grunt-standard` with `standard`.
- [package] Replace `grunt-stylelint` with `stylelint`.
- [package] Replaced `grunt-standard` with `standard`.
- [package] Replaced `grunt-stylelint` with `stylelint`.
- [package] Install `jspm` modules during npm `postinstall` step.
- [misc] Updated Stylelint rules to support `^7.9.0`.
- [modules][nj] `nunjucks-extensions` module will set `numbro` locale, default formatting and currency formatting to current locale's parameters on initialization.
- [modules][nj] `moment` now exposed to Nunjucks as pure function and no longer sets locale to current locale internally.
- [modules][nj] `nunjucks-extensions` module will set `moment` locale to current locale on initialization.
Expand Down

0 comments on commit 60484ac

Please sign in to comment.