From 6fd467822421d386ffa43495b5f1bcbfdd2b5727 Mon Sep 17 00:00:00 2001 From: Pablo Reyes Date: Tue, 22 Sep 2020 16:48:45 -0300 Subject: [PATCH] FE-219-reyesoft-ci-reemplazar-sass-lint- auto commit --- CHANGELOG_JS.md | 8 +++- README.md | 11 +++-- js/project-base/resources/.sass-lint.yml | 7 --- .../resources/stylelint.config.json | 48 +++++++++++++++++++ package.json | 4 +- 5 files changed, 65 insertions(+), 13 deletions(-) delete mode 100644 js/project-base/resources/.sass-lint.yml create mode 100644 js/project-base/resources/stylelint.config.json diff --git a/CHANGELOG_JS.md b/CHANGELOG_JS.md index 0e7143a..e85420d 100644 --- a/CHANGELOG_JS.md +++ b/CHANGELOG_JS.md @@ -4,7 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [Unreleased-MINOR] + +### Added +- stylelint (SassLint depreacted). + +### Removed +- SassLint ## [1.1.2] - 2020-07-20 diff --git a/README.md b/README.md index c44865c..a2d2c04 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ composer require-dev reyesoft/ci ### Tools * tslint -* sass-lint +* stylelint * prettier (ts, md and json files) ### Install @@ -64,10 +64,13 @@ composer require-dev reyesoft/ci ```json { - "sasslintConfig": "resources/.sass-lint.yml", + "stylelint": { + "extends": "./resources/stylelint.config.json" + }, "scripts": { - "lint": "ng lint && sass-lint -c -q", - "fix": "ng lint --fix && yarn prettier:fix", + "lint": "ng lint && yarn lint:style", + "lint:style": "yarn stylelint \"src/**/*.{css,scss,sass}\"", + "fix": "ng lint --fix && yarn prettier:fix && yarn lint:style --fix", "prettier:fix": "prettier **/*.{ts,sass,scss,md} --write", "prettier:check": "bash node_modules/reyesoft-ci/parallel.bash -s \"yarn prettier **/*.{sass,scss,md} -l\" \"yarn prettier **/*.ts -l\"", "precommit": "lint-staged" diff --git a/js/project-base/resources/.sass-lint.yml b/js/project-base/resources/.sass-lint.yml deleted file mode 100644 index 28bdb34..0000000 --- a/js/project-base/resources/.sass-lint.yml +++ /dev/null @@ -1,7 +0,0 @@ -options: - # warning! relative path to this file - config-file: ../node_modules/reyesoft-ci/js/rules/.sass-lint.yml - files: - include: 'src/**/*.s+(a|c)ss' - rules: - # Project particular extends diff --git a/js/project-base/resources/stylelint.config.json b/js/project-base/resources/stylelint.config.json new file mode 100644 index 0000000..ec9cdab --- /dev/null +++ b/js/project-base/resources/stylelint.config.json @@ -0,0 +1,48 @@ +{ + "extends": [ + "stylelint-config-standard", + "stylelint-config-sass-guidelines" + ], + "plugins": [ + "stylelint-scss" + ], + "rules": { + "indentation": 4, + "order/properties-alphabetical-order": null, + "selector-pseudo-element-no-unknown": [ + true, { + "ignorePseudoElements": [ + "ng-deep" + ] + } + ], + "selector-type-no-unknown": [ + true, { + "ignoreTypes": [ + "/^mat-/", + "/^app-/" + ] + } + ], + "color-hex-length": null, + + "scss/at-mixin-pattern": null, + "property-no-vendor-prefix": null, + "media-feature-name-no-vendor-prefix": null, + + "declaration-empty-line-before": null, + "function-name-case": null, + "no-empty-source": null, + "value-keyword-case": null, + + "color-named": "always-where-possible", + "rule-empty-line-before": [ + "always",{ + "ignore": [ + "first-nested", + "after-comment" + ] + } + ] + } +} diff --git a/package.json b/package.json index 02f7748..f54d43f 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,9 @@ "tslint-config-prettier": "1.18.0", "rimraf": "3.0.2", "rollup": "2.22.1", - "sass-lint": "1.13.1", + "stylelint": "^13.6.1", + "stylelint-config-standard": "^20.0.0", + "stylelint-config-sass-guidelines": "^7.0.0", "sorcery": "0.10.0", "tslint": "6.1.2" }