From 3fb03933d2512bcb0b402b1a710c2a105f3110f5 Mon Sep 17 00:00:00 2001 From: philwareham Date: Thu, 21 Sep 2023 16:35:29 +0100 Subject: [PATCH] Update build tools --- .stylelintrc.yml | 370 ++++++++--------------------------------------- .travis.yml | 7 - package.json | 23 ++- 3 files changed, 71 insertions(+), 329 deletions(-) delete mode 100644 .travis.yml diff --git a/.stylelintrc.yml b/.stylelintrc.yml index 43e8b7c1..8c734d75 100644 --- a/.stylelintrc.yml +++ b/.stylelintrc.yml @@ -3,12 +3,12 @@ ignoreFiles: defaultSeverity: warning +extends: stylelint-config-standard-scss + plugins: - - stylelint-scss - stylelint-order rules: - # Specify percentage or number notation for alpha-values. alpha-value-notation: number @@ -22,8 +22,7 @@ rules: # Require or disallow an empty line before at-rules. at-rule-empty-line-before: - always - - - except: + - except: - blockless-after-blockless - first-nested ignore: @@ -31,20 +30,10 @@ rules: ignoreAtRules: - else - # Specify lowercase or uppercase for at-rules names. - at-rule-name-case: lower - - # Require a newline after at-rule names. - at-rule-name-newline-after: always-multi-line - - # Require a single space after at-rule names. - at-rule-name-space-after: always - # Disallow unknown at-rules. at-rule-no-unknown: - true - - - ignoreAtRules: + - ignoreAtRules: - at-root - each - else @@ -65,54 +54,17 @@ rules: # Disallow vendor prefixes for at-rules. at-rule-no-vendor-prefix: true - # Require a newline after the semicolon of at-rules. - at-rule-semicolon-newline-after: always - - # Require a single space or disallow whitespace before the semicolons of at rules. - at-rule-semicolon-space-before: never - # Specify a whitelist of allowed at-rules. #at-rule-whitelist: - # Require or disallow an empty line before the closing brace of blocks. - block-closing-brace-empty-line-before: never - - # Require a newline or disallow whitespace after the closing brace of blocks. - #block-closing-brace-newline-after: - - # Require a newline or disallow whitespace before the closing brace of blocks. - block-closing-brace-newline-before: always-multi-line - - # Require a single space or disallow whitespace after the closing brace of blocks. - #block-closing-brace-space-after: - - # Require a single space or disallow whitespace before the closing brace of blocks. - block-closing-brace-space-before: always-single-line - # Disallow empty blocks. block-no-empty: true - # equire a newline after the opening brace of blocks. - block-opening-brace-newline-after: always-multi-line - - #Require a newline or disallow whitespace before the opening brace of blocks. - #block-opening-brace-newline-before: - - # Require a single space or disallow whitespace after the opening brace of blocks. - block-opening-brace-space-after: always-single-line - - # Require a single space or disallow whitespace before the opening brace of blocks. - block-opening-brace-space-before: always - - # Specify modern or legacy notation for applicable color-functions. color-function-notation: modern # Require or disallow alpha channel for hex colors. #color-hex-alpha: never - # Specify lowercase or uppercase for hexadecimal color values. - color-hex-case: lower - # Specify short or long notation for hexadecimal color values. color-hex-length: long @@ -125,9 +77,6 @@ rules: # Disallow invalid hexadecimal colors. color-no-invalid-hex: true - # Require or disallow an empty line before comments. - #comment-empty-line-before: - # Disallow empty comments. comment-no-empty: true @@ -152,12 +101,6 @@ rules: # Specify a pattern for custom properties. #custom-property-pattern: - # Require a single space or disallow whitespace after the bang of declarations. - declaration-bang-space-after: never - - # Require a single space or disallow whitespace before the bang of declarations. - declaration-bang-space-before: always - # Disallow duplicate custom properties within declaration blocks. declaration-block-no-duplicate-custom-properties: true @@ -170,42 +113,18 @@ rules: # Disallow shorthand properties that override related longhand properties. declaration-block-no-shorthand-property-overrides: true - # Require a newline or disallow whitespace after the semicolons of declaration blocks. - declaration-block-semicolon-newline-after: always-multi-line - - # Require a newline or disallow whitespace before the semicolons of declaration blocks. - declaration-block-semicolon-newline-before: never-multi-line - - # Require a single space or disallow whitespace after the semicolons of declaration blocks. - declaration-block-semicolon-space-after: always-single-line - - # Require a single space or disallow whitespace before the semicolons of declaration blocks. - declaration-block-semicolon-space-before: never - # Limit the number of declaration within single line declaration blocks. declaration-block-single-line-max-declarations: 1 - # Require or disallow a trailing semicolon within declaration blocks. - declaration-block-trailing-semicolon: always - - # Require a newline or disallow whitespace after the colon of declarations. - declaration-colon-newline-after: always-multi-line - - # Require a single space or disallow whitespace after the colon of declarations. - declaration-colon-space-after: always-single-line - - # Require a single space or disallow whitespace before the colon of declarations. - declaration-colon-space-before: never - - # Require or disallow an empty line before declarations. - #declaration-empty-line-before: - # Disallow `!important` within declarations. #declaration-no-important: # Limit the number of values for a list of properties within declarations. #declaration-property-max-values: + # Disallow unknown values for properties within declarations. + #declaration-property-value-no-unknown: true + # Specify a blacklist of disallowed property and unit pairs within declarations. #declaration-property-unit-blacklist: @@ -236,39 +155,21 @@ rules: # Specify a blacklist of disallowed functions. #function-blacklist: + # Disallow an invalid expression within `calc` functions. + #function-calc-no-invalid: true + # Disallow an unspaced operator within `calc` functions. function-calc-no-unspaced-operator: true - # Require a newline or disallow whitespace after the commas of functions. - function-comma-newline-after: always-multi-line - - # Require a newline or disallow whitespace before the commas of functions. - function-comma-newline-before: never-multi-line - - # Require a single space or disallow whitespace after the commas of functions. - function-comma-space-after: always-single-line - - # Require a single space or disallow whitespace before the commas of functions. - function-comma-space-before: never - # Disallow direction values in `linear-gradient()` calls that are not valid. function-linear-gradient-no-nonstandard-direction: true - # Limit the number of adjacent empty lines within functions. - function-max-empty-lines: 0 - # Specify lowercase or uppercase for function names. function-name-case: lower # Disallow unknown functions. #function-no-unknown: true - # Require a newline or disallow whitespace on the inside of the parentheses of functions. - function-parentheses-newline-inside: always-multi-line - - # Require a single space or disallow whitespace on the inside of the parentheses of functions. - function-parentheses-space-inside: never-single-line - # Disallow scheme-relative URLs. function-url-no-scheme-relative: true @@ -284,156 +185,107 @@ rules: # Specify a whitelist of allowed functions. #function-whitelist: - # Require or disallow whitespace after functions. - function-whitespace-after: always - # Specify number or angle notation for degree hues. hue-degree-notation: number # Specify string or URL notation for `@import` rules. - #import-notation: url - - # Specify indentation. - indentation: 4 + #import-notation: # Disallow duplicate selectors within keyframe blocks. - #keyframe-block-no-duplicate-selectors: true + keyframe-block-no-duplicate-selectors: true # Disallow `!important` within keyframe declarations. keyframe-declaration-no-important: true - # Specify keyword or percentage notation for keyframe selectors. - #keyframe-selector-notation: percentage-unless-within-keyword-only-block - # Specify a pattern for keyframe names. #keyframes-name-pattern: + # Specify keyword or percentage notation for keyframe selectors. + keyframe-selector-notation: percentage + # Disallow units for zero lengths. length-zero-no-unit: true - # Specify Unix or Windows linebreaks. - linebreaks: unix - - # Limit the number of adjacent empty lines. - max-empty-lines: 3 - - # Limit the length of a line. - #max-line-length: - # Limit the depth of nesting. max-nesting-depth: 4 - # Require a single space or disallow whitespace after the colon in media features. - media-feature-colon-space-after: always - - # Require a single space or disallow whitespace before the colon in media features. - media-feature-colon-space-before: never - # Specify a blacklist of disallowed media feature names. #media-feature-name-blacklist: - # Specify lowercase or uppercase for media feature names. - media-feature-name-case: lower - # Disallow unknown media feature names. media-feature-name-no-unknown: true # Disallow vendor prefixes for media feature names. media-feature-name-no-vendor-prefix: true + # Specify a list of allowed name and unit pairs within media features. + #media-feature-name-unit-allowed-list: + + # Disallow unknown values for media features. + #media-feature-name-value-no-unknown: + # Specify a whitelist of allowed media feature name and value pairs. #media-feature-name-value-whitelist: # Specify a whitelist of allowed media feature names. #media-feature-name-whitelist: - # Require a single space or disallow whitespace on the inside of the parentheses within media features. - media-feature-parentheses-space-inside: never - - # Require a single space or disallow whitespace after the range operator in media features. - media-feature-range-operator-space-after: always + # Specify context or prefix notation for media feature ranges. + media-feature-range-notation: prefix - # Require a single space or disallow whitespace before the range operator in media features. - media-feature-range-operator-space-before: always - - # Require a newline or disallow whitespace after the commas of media query lists. - media-query-list-comma-newline-after: never-multi-line - - # Require a newline or disallow whitespace before the commas of media query lists. - media-query-list-comma-newline-before: never-multi-line - - # Require a single space or disallow whitespace after the commas of media query lists. - media-query-list-comma-space-after: always - - # Require a single space or disallow whitespace before the commas of media query lists. - media-query-list-comma-space-before: never + # Disallow invalid media queries. + #media-query-no-invalid: true # Disallow invalid named grid areas. named-grid-areas-no-invalid: true # Disallow selectors of lower specificity from coming after overriding selectors of higher specificity. - #no-descending-specificity: true + no-descending-specificity: null # Disallow duplicate `@import` rules within a stylesheet. no-duplicate-at-import-rules: true # Disallow duplicate selectors within a stylesheet. - #no-duplicate-selectors: true - - # Disallow empty first lines. - no-empty-first-line: true + no-duplicate-selectors: null # Disallow empty sources. no-empty-source: true - # Disallow end-of-line whitespace. - no-eol-whitespace: true - - # Disallow extra semicolons. - no-extra-semicolons: true - # Disallow double-slash comments (`//`) which are not supported by CSS. - no-invalid-double-slash-comments: true + #no-invalid-double-slash-comments: true # Disallow invalid position `@import` rules within a stylesheet. - no-invalid-position-at-import-rule: true + no-invalid-position-at-import-rule: + - true + - ignoreAtRules: + - forward + - use # Disallow irregular whitespaces. no-irregular-whitespace: true - # Disallow missing end-of-source newlines. - no-missing-end-of-source-newline: true - # Disallow unknown animations. #no-unknown-animations: - # Require or disallow a leading zero for fractional numbers less than 1. - number-leading-zero: always + # Disallow unknown custom properties. + #no-unknown-custom-properties: # Limit the number of decimal places allowed in numbers. - #number-max-precision: - - # Disallow trailing zeros in numbers. - number-no-trailing-zeros: true + number-max-precision: 7 # Specify a blacklist of disallowed properties. #property-blacklist: - # Specify lowercase or uppercase for properties. - property-case: lower - # Disallow unknown properties. property-no-unknown: - true - - - ignoreProperties: + - ignoreProperties: - contains-intrinsic-size # Disallow vendor prefixes for properties. property-no-vendor-prefix: - true - - - ignoreProperties: + - ignoreProperties: - appearance # Specify a whitelist of allowed properties. @@ -442,15 +294,14 @@ rules: # Require or disallow an empty line before rules. rule-empty-line-before: - always-multi-line - - - except: + - except: - first-nested # Specify a list of disallowed properties for selectors within rules. #rule-selector-property-disallowed-list: - # Require a single space or disallow whitespace on the inside of the brackets within attribute selectors. - selector-attribute-brackets-space-inside: never + # Disallow unmatchable An+B selectors. + selector-anb-no-unmatchable: true # Specify a list of disallowed attribute names. #selector-attribute-name-disallowed-list: @@ -458,12 +309,6 @@ rules: # Specify a blacklist of disallowed attribute operators. #selector-attribute-operator-blacklist: - # Require a single space or disallow whitespace after operators within attribute selectors. - selector-attribute-operator-space-after: never - - # Require a single space or disallow whitespace before operators within attribute selectors. - selector-attribute-operator-space-before: never - #Specify a whitelist of allowed attribute operators. #selector-attribute-operator-whitelist: @@ -471,41 +316,20 @@ rules: selector-attribute-quotes: always # Specify a pattern for class selectors. - #selector-class-pattern: + selector-class-pattern: null # Specify a blacklist of disallowed combinators. #selector-combinator-blacklist: - # Require a single space or disallow whitespace after the combinators of selectors. - selector-combinator-space-after: always - - # Require a single space or disallow whitespace before the combinators of selectors. - selector-combinator-space-before: always - # Specify a whitelist of allowed combinators. #selector-combinator-whitelist: - # Disallow non-space characters for descendant combinators of selectors. - selector-descendant-combinator-no-non-space: true - # Specify a list of disallowed selectors. #selector-disallowed-list: # Specify a pattern for ID selectors. #selector-id-pattern: - # Require a newline or disallow whitespace after the commas of selector lists. - selector-list-comma-newline-after: always - - # Require a newline or disallow whitespace before the commas of selector lists. - selector-list-comma-newline-before: never-multi-line - - # Require a single space or disallow whitespace after the commas of selector lists. - selector-list-comma-space-after: always-single-line - - # Require a single space or disallow whitespace before the commas of selector lists. - selector-list-comma-space-before: never - # Limit the number of attribute selectors in a selector. selector-max-attribute: 2 @@ -518,9 +342,6 @@ rules: # Limit the number of compound selectors in a selector. selector-max-compound-selectors: 5 - # Limit the number of adjacent empty lines within selectors. - selector-max-empty-lines: 0 - # Limit the number of id selectors in a selector. selector-max-id: 1 @@ -546,29 +367,20 @@ rules: selector-no-vendor-prefix: true # Specify simple or complex notation for `:not()` pseudo-class selectors. - #selector-not-notation: complex + selector-not-notation: complex # Specify a blacklist of disallowed pseudo-class selectors. #selector-pseudo-class-blacklist: - # Specify lowercase or uppercase for pseudo-class selectors. - selector-pseudo-class-case: lower - # Disallow unknown pseudo-class selectors. selector-pseudo-class-no-unknown: true - # Require a single space or disallow whitespace on the inside of the parentheses within pseudo-class selectors. - selector-pseudo-class-parentheses-space-inside: never - # Specify a whitelist of allowed pseudo-class selectors. #selector-pseudo-class-whitelist: # Specify a blacklist of disallowed pseudo-element selectors. #selector-pseudo-element-blacklist: - # Specify lowercase or uppercase for pseudo-element selectors. - selector-pseudo-element-case: lower - # Specify single or double colon notation for applicable pseudo-elements. selector-pseudo-element-colon-notation: double @@ -590,21 +402,12 @@ rules: # Disallow (unescaped) newlines in strings. string-no-newline: true - # Specify single or double quotes around strings. - string-quotes: double - # Specify the minimum number of milliseconds for time values. time-min-milliseconds: 100 - # Require or disallow the Unicode Byte Order Mark. - unicode-bom: never - # Specify a blacklist of disallowed units. #unit-blacklist: - # Specify lowercase or uppercase for units. - unit-case: lower - # Disallow unknown units. unit-no-unknown: true @@ -612,30 +415,13 @@ rules: #unit-whitelist: # Specify lowercase or uppercase for keywords values. - #value-keyword-case: lower - - # Require a newline or disallow whitespace after the commas of value lists. - value-list-comma-newline-after: never-multi-line - - # Require a newline or disallow whitespace before the commas of value lists. - value-list-comma-newline-before: never-multi-line - - # Require a single space or disallow whitespace after the commas of value lists. - value-list-comma-space-after: always - - # Require a single space or disallow whitespace before the commas of value lists. - value-list-comma-space-before: never - - # Limit the number of adjacent empty lines within value lists. - value-list-max-empty-lines: 0 + value-keyword-case: null # Disallow vendor prefixes for values. value-no-vendor-prefix: true - - # SMACSS-like property order rules (stylelint-order plugin). +# SMACSS-like property order rules (stylelint-order plugin). order/properties-order: - # Heading. - content @@ -1011,7 +797,7 @@ rules: - all - appearance - additive-symbols - - color-adjust + - print-color-adjust - counter-reset - counter-increment @@ -1078,58 +864,24 @@ rules: - size - marks - # Additional SCSS rules (stylelint-scss plugin). - - # Disallow `@extend` with missing placeholders. - scss/at-extend-no-missing-placeholder: true - - # Check for equality to null is unnecessarily explicit since `null` is falsey in Sass. - scss/at-if-no-null: true - - # Since leading underscores are not needed, they can be omitted. - scss/at-import-no-partial-leading-underscore: true - - # Require or disallow extension in `@import` commands. - scss/at-import-partial-extension: never + # Additional SCSS rules (stylelint-scss plugin). - # Disallow parentheses in conditional @ rules (if, elsif, while). - scss/at-rule-conditional-no-parentheses: true + # Require or disallow whitespace after the colon in `$`-variable declarations. + scss/dollar-variable-colon-space-after: null - # Disallow unknown at-rules. Should be used instead of stylelint's `at-rule-no-unknown`. - scss/at-rule-no-unknown: true - - # Disallow empty comments. - scss/comment-no-empty: true - - # Require a newline after the colon in `$`-variable declarations. - scss/dollar-variable-colon-newline-after: always-multi-line - - # Require a single space or disallow whitespace before the colon in `$`-variable declarations. - scss/dollar-variable-colon-space-before: never - - # Disallow Sass variables that are used without interpolation with CSS features that use custom identifiers. - scss/dollar-variable-no-missing-interpolation: true - - # Disallow quoted strings inside the quote function. - scss/function-quote-no-quoted-strings-inside: true - - # Disallow duplicate dollar variables within a stylesheet. - scss/no-duplicate-dollar-variables: true - - # Disallow duplicate mixins within a stylesheet. - scss/no-duplicate-mixins: true + # Require an empty line or disallow empty lines before `$`-variable declarations. + scss/dollar-variable-empty-line-before: + - always + - except: + - first-nested + - after-comment + - after-dollar-variable - # Disallow linebreaks after Sass operators. - scss/operator-no-newline-after: true + # Require or disallow an empty line before `//`-comments. + scss/double-slash-comment-empty-line-before: null - # Disallow linebreaks before Sass operators. - scss/operator-no-newline-before: true + # Require or disallow whitespace after the `//` in `//`-comments + scss/double-slash-comment-whitespace-inside: null # Disallow unspaced operators in Sass operations. - scss/operator-no-unspaced: true - - # Disallow non-CSS `@import`s in partial files. - scss/partial-no-import: true - - # Prevents unneeded nesting selectors. - scss/selector-no-redundant-nesting-selector: true + scss/operator-no-unspaced: null diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a7aeb3df..00000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - "17" -sudo: false -cache: - directories: - - "$HOME/.npm" diff --git a/package.json b/package.json index 0aaab2c6..527678c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "textpattern-forum", - "version": "1.6.3", + "version": "1.6.4", "repository": { "type": "git", "url": "https://github.com/textpattern/textpattern-forum" @@ -10,8 +10,8 @@ }, "devDependencies": { "@lodder/grunt-postcss": "3.1.1", - "autoprefixer": "10.4.14", - "cssnano": "5.1.14", + "autoprefixer": "10.4.15", + "cssnano": "6.0.1", "grunt": "1.6.1", "grunt-cli": "1.4.3", "grunt-concurrent": "3.0.0", @@ -21,17 +21,17 @@ "grunt-contrib-watch": "1.1.0", "grunt-replace-regex": "1.0.3", "grunt-sass": "3.1.0", - "grunt-stylelint": "0.16.0", + "grunt-stylelint": "0.19.0", "grunt-terser": "2.0.0", "load-grunt-tasks": "5.1.0", - "postcss": "8.4.20", - "sass": "1.61.0", - "stylelint": "13.13.1", - "stylelint-order": "4.1.0", - "stylelint-scss": "3.21.0" + "postcss": "8.4.30", + "sass": "1.67.0", + "stylelint": "15.10.3", + "stylelint-config-standard-scss": "11.0.0", + "stylelint-order": "6.0.3" }, "dependencies": { - "jquery": "3.6.4", + "jquery": "3.7.1", "prismjs": "1.29.0", "textpattern-branding": "0.3.3" }, @@ -43,8 +43,5 @@ "Firefox ESR", "not IE 11" ], - "scripts": { - "test": "grunt travis --verbose" - }, "license": "MIT" }