add linting for sass, we have to check errors
This commit is contained in:
parent
04d28fd52b
commit
8ba5c51296
111
src/Web/WebSPA/eShopOnContainers.WebSPA/.sass-lint.yml
Normal file
111
src/Web/WebSPA/eShopOnContainers.WebSPA/.sass-lint.yml
Normal file
@ -0,0 +1,111 @@
|
||||
rules:
|
||||
# https://github.com/sasstools/sass-lint/tree/master/docs/rules
|
||||
# 0 = disabled - 1 = warning - 2 = error
|
||||
# Extends
|
||||
extends-before-mixins: 1
|
||||
extends-before-declarations: 2
|
||||
placeholder-in-extend: 0
|
||||
|
||||
# Mixins
|
||||
mixins-before-declarations: 2
|
||||
|
||||
# Line Spacing
|
||||
one-declaration-per-line: 2
|
||||
empty-line-between-blocks: 2
|
||||
single-line-per-selector: 2
|
||||
|
||||
# Disallows
|
||||
# We disable some of that because we know that
|
||||
# if you use it is because is necessary
|
||||
no-attribute-selectors: 0
|
||||
no-color-hex: 0
|
||||
no-color-keywords: 2
|
||||
no-color-literals: 0
|
||||
no-combinators: 0
|
||||
no-css-comments: 0
|
||||
no-debug: 1
|
||||
no-disallowed-properties: 0
|
||||
no-duplicate-properties: 2
|
||||
no-empty-rulesets: 1
|
||||
no-extends: 0
|
||||
no-ids: 2
|
||||
no-important: 0
|
||||
no-invalid-hex: 2
|
||||
no-mergeable-selectors: 1
|
||||
no-misspelled-properties: 2
|
||||
no-qualifying-elements: 0
|
||||
no-trailing-whitespace: 2
|
||||
no-trailing-zero: 2
|
||||
no-transition-all: 0
|
||||
no-universal-selectors: 0
|
||||
no-url-domains: 0
|
||||
no-url-protocols: 0
|
||||
no-vendor-prefixes: 2
|
||||
no-warn: 2
|
||||
property-units: 0
|
||||
|
||||
# Nesting
|
||||
declarations-before-nesting: 2
|
||||
force-attribute-nesting: 0
|
||||
force-element-nesting: 0
|
||||
force-pseudo-nesting: 0
|
||||
|
||||
# Name Formats
|
||||
class-name-format: 0
|
||||
function-name-format: 0
|
||||
id-name-format: 0
|
||||
mixin-name-format: 0
|
||||
placeholder-name-format:
|
||||
- 1
|
||||
- allow-leading-underscore: true
|
||||
- convention: hyphenatedlowercase
|
||||
variable-name-format:
|
||||
- 1
|
||||
- allow-leading-underscore: true
|
||||
- convention: hyphenatedlowercase
|
||||
|
||||
# Style Guide
|
||||
attribute-quotes: 2
|
||||
# We know that always 1 level
|
||||
bem-depth: 0
|
||||
border-zero: 2
|
||||
brace-style:
|
||||
- 2
|
||||
- style: 1tbs
|
||||
clean-import-paths: 2
|
||||
empty-args: 2
|
||||
hex-length:
|
||||
- 2
|
||||
- style: long
|
||||
hex-notation:
|
||||
- 2
|
||||
- style: uppercase
|
||||
indentation:
|
||||
- 2
|
||||
- size: 4
|
||||
leading-zero: 2
|
||||
max-line-length: 0
|
||||
max-file-line-count: 0
|
||||
nesting-depth: 0
|
||||
# alphabetically
|
||||
property-sort-order: 2
|
||||
pseudo-element: 0
|
||||
quotes: 2
|
||||
shorthand-values: 0
|
||||
url-quotes: 0
|
||||
variable-for-property: 0
|
||||
zero-unit: 2
|
||||
|
||||
# Inner Spacing
|
||||
space-after-comma: 2
|
||||
space-before-colon: 2
|
||||
space-after-colon: 2
|
||||
space-before-brace: 2
|
||||
space-before-bang: 2
|
||||
space-after-bang: 2
|
||||
space-between-parens: 2
|
||||
space-around-operator: 2
|
||||
|
||||
# Final Items
|
||||
trailing-semicolon: 2
|
||||
final-newline: 2
|
@ -7,7 +7,7 @@
|
||||
height: $header-height;
|
||||
|
||||
&-back {
|
||||
color: rgba($color-foreground-brighter, .4);
|
||||
color: red;
|
||||
line-height: $header-height;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
|
@ -29,9 +29,10 @@
|
||||
"build:main": "node node_modules/webpack/bin/webpack.js --config config/webpack.config.js",
|
||||
"setdev": "set ASPNETCORE_ENVIRONMENT=Development",
|
||||
"setprod": "set ASPNETCORE_ENVIRONMENT=Production",
|
||||
"build:dev": "npm run setdev && npm run clean:dist && npm run build:vendor && npm run build:main",
|
||||
"build:dev": "npm run lint:sass && npm run setdev && npm run clean:dist && npm run build:vendor && npm run build:main",
|
||||
"build:prod": "npm run setprod && npm run clean:dist && npm run build:vendor && npm run build:main",
|
||||
"version": "npm run build"
|
||||
"version": "npm run build",
|
||||
"lint:sass": "sass-lint -c .sass-lint.yml Client/**/*.scss --verbose"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/common": "2.1.2",
|
||||
@ -87,6 +88,7 @@
|
||||
"node-sass": "3.9.3",
|
||||
"parse5": "2.1.5",
|
||||
"rimraf": "2.5.4",
|
||||
"sass-lint": "^1.10.2",
|
||||
"sass-loader": "4.0.2",
|
||||
"ts-helpers": "1.1.1",
|
||||
"ts-node": "1.4.3",
|
||||
|
@ -1,178 +0,0 @@
|
||||
{
|
||||
"rulesDirectory": [
|
||||
"node_modules/codelyzer"
|
||||
],
|
||||
"rules": {
|
||||
"directive-selector-name": [
|
||||
true,
|
||||
"camelCase"
|
||||
],
|
||||
"component-selector-name": [
|
||||
true,
|
||||
"kebab-case"
|
||||
],
|
||||
"directive-selector-type": [
|
||||
true,
|
||||
"attribute"
|
||||
],
|
||||
"component-selector-type": [
|
||||
true,
|
||||
"element"
|
||||
],
|
||||
"directive-selector-prefix": [
|
||||
true,
|
||||
"appd"
|
||||
],
|
||||
"component-selector-prefix": [
|
||||
true,
|
||||
"appc"
|
||||
],
|
||||
"use-input-property-decorator": true,
|
||||
"use-output-property-decorator": true,
|
||||
"use-host-property-decorator": true,
|
||||
"no-attribute-parameter-decorator": true,
|
||||
"no-input-rename": true,
|
||||
"no-output-rename": true,
|
||||
"no-forward-ref": true,
|
||||
"use-life-cycle-interface": true,
|
||||
"use-pipe-transform-interface": true,
|
||||
"pipe-naming": [
|
||||
true,
|
||||
"camelCase",
|
||||
"appf"
|
||||
],
|
||||
"component-class-suffix": true,
|
||||
"directive-class-suffix": true,
|
||||
"import-destructuring-spacing": true,
|
||||
"member-access": false,
|
||||
"member-ordering": [
|
||||
true,
|
||||
"public-before-private",
|
||||
"static-before-instance",
|
||||
"variables-before-functions"
|
||||
],
|
||||
"no-any": false,
|
||||
"no-inferrable-types": false,
|
||||
"no-internal-module": true,
|
||||
"no-var-requires": false,
|
||||
"typedef": false,
|
||||
"typedef-whitespace": [
|
||||
true,
|
||||
{
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
},
|
||||
{
|
||||
"call-signature": "space",
|
||||
"index-signature": "space",
|
||||
"parameter": "space",
|
||||
"property-declaration": "space",
|
||||
"variable-declaration": "space"
|
||||
}
|
||||
],
|
||||
"ban": false,
|
||||
"curly": false,
|
||||
"forin": true,
|
||||
"label-position": true,
|
||||
"label-undefined": true,
|
||||
"no-arg": true,
|
||||
"no-bitwise": true,
|
||||
"no-conditional-assignment": true,
|
||||
"no-console": [
|
||||
true,
|
||||
"debug",
|
||||
"info",
|
||||
"time",
|
||||
"timeEnd",
|
||||
"trace"
|
||||
],
|
||||
"no-construct": true,
|
||||
"no-debugger": true,
|
||||
"no-duplicate-key": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-empty": false,
|
||||
"no-eval": true,
|
||||
"no-null-keyword": true,
|
||||
"no-shadowed-variable": true,
|
||||
"no-string-literal": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-unreachable": true,
|
||||
"no-unused-expression": true,
|
||||
"no-unused-variable": false,
|
||||
"no-use-before-declare": true,
|
||||
"no-var-keyword": true,
|
||||
"radix": true,
|
||||
"switch-default": true,
|
||||
"triple-equals": [
|
||||
true,
|
||||
"allow-null-check"
|
||||
],
|
||||
"use-strict": [
|
||||
true,
|
||||
"check-module"
|
||||
],
|
||||
"eofline": true,
|
||||
"indent": [
|
||||
true,
|
||||
"spaces"
|
||||
],
|
||||
"max-line-length": [
|
||||
true,
|
||||
200
|
||||
],
|
||||
"no-require-imports": false,
|
||||
"no-trailing-whitespace": true,
|
||||
"object-literal-sort-keys": false,
|
||||
"trailing-comma": [
|
||||
true,
|
||||
{
|
||||
"multiline": "never",
|
||||
"singleline": "never"
|
||||
}
|
||||
],
|
||||
"align": false,
|
||||
"class-name": true,
|
||||
"comment-format": [
|
||||
true,
|
||||
"check-space"
|
||||
],
|
||||
"interface-name": false,
|
||||
"jsdoc-format": true,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-constructor-vars": false,
|
||||
"one-line": [
|
||||
true,
|
||||
"check-open-brace",
|
||||
"check-catch",
|
||||
"check-else",
|
||||
"check-finally",
|
||||
"check-whitespace"
|
||||
],
|
||||
"quotemark": [
|
||||
true,
|
||||
"single",
|
||||
"avoid-escape"
|
||||
],
|
||||
"semicolon": [
|
||||
true,
|
||||
"always"
|
||||
],
|
||||
"variable-name": [
|
||||
true,
|
||||
"check-format",
|
||||
"allow-leading-underscore",
|
||||
"ban-keywords"
|
||||
],
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type"
|
||||
]
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user