chore(sass): add sass-lint with npm run task

This commit is contained in:
Brandy Carney
2017-09-21 14:28:00 -04:00
parent 3d56df68aa
commit 4a71786684
2 changed files with 202 additions and 3 deletions

View File

@ -0,0 +1,196 @@
# sass-lint config generated by make-sass-lint-config v0.1.2
#
# The following scss-lint Linters are not yet supported by sass-lint:
# DefaultRule, SelectorDepth
#
# The following settings/values are unsupported by sass-lint:
# Linter PropertySortOrder, option "min_properties"
# Linter PropertySortOrder, option "separate_groups"
# Linter PropertySpelling, option "disabled_properties"
files:
include: 'src/**/*.s+(a|c)ss'
ignore:
- 'src/themes/ionic.mixins.scss'
- 'src/themes/license.scss'
- 'src/themes/normalize.scss'
- 'src/themes/util.scss'
- 'src/themes/version.scss'
- 'src/platform/cordova.*.scss'
- 'src/components/slides/slides-import.scss'
options:
formatter: stylish
merge-default-rules: false
rules:
# Name Formats
class-name-format:
- 0
- convention: hyphenatedlowercase
id-name-format:
- 0
- convention: hyphenatedlowercase
placeholder-name-format:
- 0
- convention: hyphenatedlowercase
# Nesting
force-attribute-nesting: 0
force-element-nesting: 0
force-pseudo-nesting: 0
# Disallows
no-color-literals: 0
no-duplicate-properties: 0
no-mergeable-selectors: 1
no-misspelled-properties:
- 1
- extra-properties:
- contain
# This doesn't allow chaining between elements and attributes, ids or classes
# if we turn this on it breaks a lot of components
no-qualifying-elements:
- 0
- allow-element-with-attribute: false
allow-element-with-class: false
allow-element-with-id: false
property-sort-order:
- 1
- ignore-custom-properties: false
order:
# Box
- position
- top
- bottom
- z-index
- display
- overflow
- clear
-
- flex
- flex-basis
- flex-direction
- flex-flow
- flex-grow
- flex-shrink
- flex-wrap
- align-content
- align-items
- align-self
- justify-content
- order
-
- width
- min-width
- max-width
- height
- min-height
- max-height
-
- columns
- column-gap
- column-fill
- column-rule
- column-span
- column-count
- column-width
# Border
- border
- border-top
- border-right
- border-bottom
- border-left
- border-width
- border-top-width
- border-right-width
- border-bottom-width
- border-left-width
- border-style
- border-top-style
- border-right-style
- border-bottom-style
- border-left-style
- border-color
- border-top-color
- border-right-color
- border-bottom-color
- border-left-color
- outline
- outline-color
- outline-offset
- outline-style
- outline-width
# Text
- font
- font-family
- font-size
- font-smoothing
- font-style
- font-variant
- font-weight
- letter-spacing
- line-height
- list-style
- text-decoration
- text-indent
- text-overflow
- text-rendering
- text-shadow
- text-transform
- text-wrap
- white-space
- word-spacing
- color
# Background
- background
- background-attachment
- background-color
- background-image
- background-repeat
- background-size
# Other
- border-collapse
- border-spacing
- box-shadow
- caption-side
- content
- cursor
- empty-cells
- opacity
- quotes
- speak
- table-layout
- vertical-align
- visibility
# Transforms
- transform
- transform-box
- transform-style
- transition
- transition-delay
- transition-duration
- transition-property
- transition-timing-function
quotes:
- 1
- style: double

View File

@ -14,6 +14,7 @@
"@stencil/dev-server": "latest", "@stencil/dev-server": "latest",
"@stencil/utils": "latest", "@stencil/utils": "latest",
"ionicons": "^4.0.0-6", "ionicons": "^4.0.0-6",
"sass-lint": "^1.11.1",
"tslint": "^5.7.0", "tslint": "^5.7.0",
"tslint-ionic-rules": "0.0.11" "tslint-ionic-rules": "0.0.11"
}, },
@ -22,10 +23,12 @@
"dev": "sd concurrent \"stencil build --dev --watch\" \"stencil-dev-server\"", "dev": "sd concurrent \"stencil build --dev --watch\" \"stencil-dev-server\"",
"test": "jest --no-cache", "test": "jest --no-cache",
"clean": "rm -rf dist", "clean": "rm -rf dist",
"lint": "./node_modules/.bin/tslint --project .", "lint": "npm run tslint",
"lint-fix": "./node_modules/.bin/tslint --project . --fix", "sass-lint": "sass-lint -v -q",
"tslint": "tslint --project .",
"tslint-fix": "tslint --project . --fix",
"validate": "npm run clean && npm run lint && npm run test && npm run build", "validate": "npm run clean && npm run lint && npm run test && npm run build",
"deploy": "../../node_modules/.bin/np --any-branch", "deploy": "np --any-branch",
"preversion": "npm run lint && npm run build" "preversion": "npm run lint && npm run build"
}, },
"author": "Ionic Team", "author": "Ionic Team",