silverstripe-framework/.scss-lint.yml
Sam Minnee 1b527fca3f FIX Webpack handles images & fonts.
Responsibility for finding and referencing images and fonts is now
given to webpack. All the url references are now relative to the
component scss file, and point to font & images files in src/, rather
than assuming someone else will place them in dist.

This makes the source more modular, and makes it easier to, for
example, inline images are data URIs, or create a new build script that
builds several modules for a project in a single pass.

Workaround for bad font path in bundle.css:
ExtactTextPlugin didn’t work as well with a subfolder reference in the
filename. This is just a short-term fix and could probably be improved
to put bundle.css back in the styles subfolder.

Webpack handles images & fonts:
Responsibility for finding and referencing images and fonts is now
given to webpack. All the url references are now relative to the
component scss file, and point to font & images files in src/, rather
than assuming someone else will place them in dist.

This makes the source more modular, and makes it easier to, for
example, inline images are data URIs, or create a new build script that
builds several modules for a project in a single pass.

Clarify docs on spriting and webfonts:
We've decided to remove sprity since it comes with hundreds of dependencies,
and needs compilation within the "npm install" - dragging out the already overweight
install process, and making the resulting node_modules/ folder less portable between systems.
2016-09-15 22:19:09 +12:00

64 lines
1.2 KiB
YAML

# See https://docs.silverstripe.org/en/4.0/getting_started/css_coding_conventions/
# Install instructions: https://github.com/brigade/scss-lint
# Adapted from https://github.com/airbnb/css
# Used for CodeClimate CI checks.
scss_files: '**/client/src/**/*.scss'
exclude:
- 'client/src/styles/legacy/*'
- 'admin/client/src/styles/legacy/*'
- 'admin/client/src/font/styles.css'
severity: error
linters:
BorderZero:
enabled: true
convention: zero
BemDepth:
enabled: true
DeclarationOrder:
enabled: false
ExtendDirective:
enabled: true
LeadingZero:
enabled: false
NameFormat:
enabled: true
PrivateNamingConvention:
enabled: true
prefix: _
PropertySortOrder:
enabled: false
QualifyingElement:
enabled: false
SelectorFormat:
enabled: true
convention: hyphenated_BEM
class_convention: ^(?!js-).*
class_convention_explanation: should not be written in the form js-*
SingleLinePerProperty:
enabled: true
allow_single_line_rule_sets: false
StringQuotes:
enabled: true
style: double_quotes
UrlQuotes:
# TODO Re-enable once it support double quotes
enabled: false