From 059758df9aa51b88b582484abbb1d9d57304ee92 Mon Sep 17 00:00:00 2001 From: Ari Stathopoulos Date: Wed, 4 Nov 2020 09:08:36 +0200 Subject: [PATCH] Fix indentation --- .gitattributes | 1 + .stylelintignore | 1 - .stylelintrc-css.json | 22 +++ assets/sass/04-elements/forms-editor.scss | 4 +- assets/sass/04-elements/forms.scss | 8 +- package-lock.json | 183 ++++++++++++++++++++-- package.json | 3 +- 7 files changed, 194 insertions(+), 28 deletions(-) create mode 100644 .stylelintrc-css.json diff --git a/.gitattributes b/.gitattributes index 925f4d1ac..93328ed4d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -20,6 +20,7 @@ .gitignore export-ignore .stylelintignore export-ignore .stylelintrc.json export-ignore +.stylelintrc-css.json export-ignore .wp-env.json export-ignore composer.json export-ignore composer.lock export-ignore diff --git a/.stylelintignore b/.stylelintignore index 57dfe14a9..b732fe32e 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -8,4 +8,3 @@ assets/images LICENSE composer.lock *.txt -*.css diff --git a/.stylelintrc-css.json b/.stylelintrc-css.json new file mode 100644 index 000000000..c48e0bee6 --- /dev/null +++ b/.stylelintrc-css.json @@ -0,0 +1,22 @@ +{ + "extends": [ + "stylelint-config-wordpress" + ], + "rules": { + "indentation": "tab", + "no-duplicate-selectors": null, + "function-url-quotes": null, + "selector-attribute-quotes": null, + "declaration-block-no-duplicate-properties": null, + "function-calc-no-unspaced-operator": null, + "selector-pseudo-class-no-unknown": null, + "selector-class-pattern": null, + "font-weight-notation": null, + "selector-type-no-unknown": null, + "max-line-length": null, + "at-rule-empty-line-before": null, + "selector-pseudo-element-colon-notation": null, + "number-leading-zero": null, + "no-descending-specificity": null + } +} diff --git a/assets/sass/04-elements/forms-editor.scss b/assets/sass/04-elements/forms-editor.scss index 98fea5866..5879c2385 100644 --- a/assets/sass/04-elements/forms-editor.scss +++ b/assets/sass/04-elements/forms-editor.scss @@ -7,8 +7,6 @@ select { -webkit-appearance: none; appearance: none; padding: var(--form--spacing-unit) calc(3 * var(--form--spacing-unit)) var(--form--spacing-unit) var(--form--spacing-unit); - /* stylelint-disable */ - background: var(--global--color-white) url("data:image/svg+xml;utf8,") no-repeat; - /* stylelint-enable */ + background: var(--global--color-white) url("data:image/svg+xml;utf8,") no-repeat; // stylelint-disable-line function-url-quotes background-position: right var(--form--spacing-unit) top 60%; } diff --git a/assets/sass/04-elements/forms.scss b/assets/sass/04-elements/forms.scss index e388e5742..2e738b9ef 100644 --- a/assets/sass/04-elements/forms.scss +++ b/assets/sass/04-elements/forms.scss @@ -69,9 +69,7 @@ select { appearance: none; line-height: var(--global--line-height-body); padding: var(--form--spacing-unit) calc(3 * var(--form--spacing-unit)) var(--form--spacing-unit) var(--form--spacing-unit); - /* stylelint-disable */ - background: var(--global--color-white) url("data:image/svg+xml;utf8,") no-repeat; - /* stylelint-enable */ + background: var(--global--color-white) url("data:image/svg+xml;utf8,") no-repeat; // stylelint-disable-line function-url-quotes background-position: right var(--form--spacing-unit) top 60%; &:focus { @@ -80,9 +78,7 @@ select { } .has-background-dark & { - /* stylelint-disable */ - background: var(--global--color-white-90) url("data:image/svg+xml;utf8,") no-repeat; - /* stylelint-enable */ + background: var(--global--color-white-90) url("data:image/svg+xml;utf8,") no-repeat; // stylelint-disable-line function-url-quotes background-position: right var(--form--spacing-unit) top 60%; } } diff --git a/package-lock.json b/package-lock.json index 20dc6bdc2..a324cc039 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,12 +101,25 @@ } }, "@babel/helper-module-imports": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.1.tgz", - "integrity": "sha512-ZeC1TlMSvikvJNy1v/wPIazCu3NdOwgYZLIkmIyAsGhqkNpiDoQQRmaCK8YP4Pq3GPTLPV9WXaPCJKvx06JxKA==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz", + "integrity": "sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==", "dev": true, "requires": { - "@babel/types": "^7.12.1" + "@babel/types": "^7.12.5" + }, + "dependencies": { + "@babel/types": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.5.tgz", + "integrity": "sha512-gyTcvz7JFa4V45C0Zklv//GmFOAal5fL23OWpBLqc4nZ4Yrz67s4kCNwSK1Gu0MXGTU8mRY3zJYtacLdKXlzig==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-module-transforms": { @@ -136,15 +149,83 @@ } }, "@babel/helper-replace-supers": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.1.tgz", - "integrity": "sha512-zJjTvtNJnCFsCXVi5rUInstLd/EIVNmIKA1Q9ynESmMBWPWd+7sdR+G4/wdu+Mppfep0XLyG2m7EBPvjCeFyrw==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz", + "integrity": "sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA==", "dev": true, "requires": { "@babel/helper-member-expression-to-functions": "^7.12.1", "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1" + "@babel/traverse": "^7.12.5", + "@babel/types": "^7.12.5" + }, + "dependencies": { + "@babel/generator": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", + "integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", + "dev": true, + "requires": { + "@babel/types": "^7.12.5", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/parser": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz", + "integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==", + "dev": true + }, + "@babel/traverse": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz", + "integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.12.5", + "@babel/types": "^7.12.5", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + } + }, + "@babel/types": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.5.tgz", + "integrity": "sha512-gyTcvz7JFa4V45C0Zklv//GmFOAal5fL23OWpBLqc4nZ4Yrz67s4kCNwSK1Gu0MXGTU8mRY3zJYtacLdKXlzig==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } }, "@babel/helper-simple-access": { @@ -172,14 +253,82 @@ "dev": true }, "@babel/helpers": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.1.tgz", - "integrity": "sha512-9JoDSBGoWtmbay98efmT2+mySkwjzeFeAL9BuWNoVQpkPFQF8SIIFUfY5os9u8wVzglzoiPRSW7cuJmBDUt43g==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.5.tgz", + "integrity": "sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA==", "dev": true, "requires": { "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1" + "@babel/traverse": "^7.12.5", + "@babel/types": "^7.12.5" + }, + "dependencies": { + "@babel/generator": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", + "integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", + "dev": true, + "requires": { + "@babel/types": "^7.12.5", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/parser": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz", + "integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==", + "dev": true + }, + "@babel/traverse": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz", + "integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.12.5", + "@babel/types": "^7.12.5", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + } + }, + "@babel/types": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.5.tgz", + "integrity": "sha512-gyTcvz7JFa4V45C0Zklv//GmFOAal5fL23OWpBLqc4nZ4Yrz67s4kCNwSK1Gu0MXGTU8mRY3zJYtacLdKXlzig==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } }, "@babel/highlight": { @@ -2790,9 +2939,9 @@ } }, "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "dev": true }, "is-callable": { diff --git a/package.json b/package.json index 52207c80b..d37d3e2f8 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "chokidar-cli": "^2.1.0", "eslint": "^7.11.0", "minimist": "^1.2.2", - "sass": "^1.28.0", "npm-run-all": "^4.1.5", "postcss-calc": "^7.0.5", "postcss-cli": "^7.1.0", @@ -29,6 +28,7 @@ "postcss-focus-within": "^3.0.0", "postcss-nested": "^4.2.1", "rtlcss": "^2.6.1", + "sass": "^1.28.0", "stylelint": "^13.7.2", "stylelint-config-recommended-scss": "^4.2.0", "stylelint-config-wordpress": "^17.0.0" @@ -58,6 +58,7 @@ "build:print": "sass assets/sass/07-utilities/print.scss:assets/css/print.css --style=expanded --source-map", "build:ie": "postcss style.css -o assets/css/ie.css", "build:ie-editor": "postcss assets/css/style-editor.css -o assets/css/ie-editor.css", + "build:stylelint": "stylelint **/*.css --fix --config .stylelintrc-css.json", "build": "run-s \"build:*\"", "watch": "chokidar \"**/*.scss\" -c \"npm run build\" --initial", "lint:scss": "stylelint **/*.scss",