Ticket #7028: 7028.1-tooling.patch
| File 7028.1-tooling.patch, 11.8 KB (added by , 9 years ago) |
|---|
-
.scss-lint.yml
1 # Default application configuration that all configurations inherit from.2 3 scss_files: "**/*.scss"4 5 linters:6 BangFormat:7 enabled: true8 space_before_bang: true9 space_after_bang: false10 11 BorderZero:12 enabled: true13 convention: zero # or `none`14 15 ColorKeyword:16 enabled: true17 18 ColorVariable:19 enabled: false20 21 Comment:22 enabled: false23 24 DebugStatement:25 enabled: true26 27 DeclarationOrder:28 enabled: false29 30 DuplicateProperty:31 enabled: false32 33 ElsePlacement:34 enabled: true35 style: same_line # or 'new_line'36 37 EmptyLineBetweenBlocks:38 enabled: true39 ignore_single_line_blocks: true40 41 EmptyRule:42 enabled: true43 44 FinalNewline:45 enabled: true46 present: true47 48 HexLength:49 enabled: true50 style: short # or 'long'51 52 HexNotation:53 enabled: true54 style: lowercase # or 'uppercase'55 56 HexValidation:57 enabled: true58 59 IdSelector:60 enabled: false61 62 ImportantRule:63 enabled: false64 65 ImportPath:66 enabled: true67 leading_underscore: false68 filename_extension: false69 70 Indentation:71 enabled: true72 allow_non_nested_indentation: false73 character: tab # or 'space'74 width: 175 76 LeadingZero:77 enabled: true78 style: include_zero # or 'include_zero'79 80 MergeableSelector:81 enabled: false82 force_nesting: true83 84 NameFormat:85 enabled: true86 allow_leading_underscore: true87 convention: hyphenated_lowercase # or 'BEM', or a regex pattern88 89 NestingDepth:90 enabled: true91 max_depth: 792 93 PlaceholderInExtend:94 enabled: true95 96 PropertyCount:97 enabled: false98 include_nested: false99 max_properties: 10100 101 PropertySortOrder:102 enabled: true103 ignore_unspecified: false104 separate_groups: false105 106 PropertySpelling:107 enabled: true108 extra_properties: []109 110 PseudoElement:111 enabled: false112 113 QualifyingElement:114 enabled: false115 allow_element_with_attribute: false116 allow_element_with_class: false117 allow_element_with_id: false118 119 SelectorDepth:120 enabled: true121 max_depth: 6122 123 SelectorFormat:124 enabled: true125 convention: hyphenated_lowercase # or 'BEM', or 'hyphenated_BEM', or 'snake_case', or 'camel_case', or a regex pattern126 ignored_names: ['signup_form', 'send_message_form', 'ac_results']127 128 Shorthand:129 enabled: false130 131 SingleLinePerProperty:132 enabled: true133 allow_single_line_rule_sets: true134 135 SingleLinePerSelector:136 enabled: true137 138 SpaceAfterComma:139 enabled: true140 141 SpaceAfterPropertyColon:142 enabled: true143 style: one_space # or 'no_space', or 'at_least_one_space', or 'aligned'144 145 SpaceAfterPropertyName:146 enabled: true147 148 SpaceBeforeBrace:149 enabled: true150 style: space # or 'new_line'151 allow_single_line_padding: false152 153 SpaceBetweenParens:154 enabled: true155 spaces: 0156 157 StringQuotes:158 enabled: true159 style: double_quotes160 161 TrailingSemicolon:162 enabled: true163 164 TrailingZero:165 enabled: false166 167 UnnecessaryMantissa:168 enabled: true169 170 UnnecessaryParentReference:171 enabled: true172 173 UrlFormat:174 enabled: true175 176 UrlQuotes:177 enabled: true178 179 VariableForProperty:180 enabled: false181 properties: []182 183 VendorPrefix:184 enabled: true185 identifier_list: base186 additional_identifiers: []187 excluded_identifiers: []188 189 ZeroUnit:190 enabled: true191 192 Compass::*:193 enabled: false -
.stylelintrc
1 { 2 "rules": { 3 "at-rule-empty-line-before": [ "always", { 4 except: ["blockless-group"], 5 ignore: ["after-comment"], 6 } ], 7 "at-rule-name-case": "lower", 8 "at-rule-name-space-after": "always-single-line", 9 "at-rule-no-unknown": true, 10 "at-rule-semicolon-newline-after": "always", 11 "block-closing-brace-newline-after": "always", 12 "block-closing-brace-newline-before": "always", 13 "block-opening-brace-newline-after": "always", 14 "block-opening-brace-space-before": "always", 15 "color-hex-case": "lower", 16 "color-hex-length": "short", 17 "color-named": "never", 18 "color-no-invalid-hex": true, 19 "comment-empty-line-before": [ "always", { 20 ignore: ["stylelint-commands"], 21 } ], 22 "declaration-bang-space-after": "never", 23 "declaration-bang-space-before": "always", 24 "declaration-block-no-duplicate-properties": [ true, { 25 ignore: ["consecutive-duplicates"], 26 } ], 27 "declaration-block-no-shorthand-property-overrides": true, 28 "declaration-block-semicolon-newline-after": "always", 29 "declaration-block-semicolon-space-before": "never", 30 "declaration-block-trailing-semicolon": "always", 31 "declaration-colon-newline-after": "always-multi-line", 32 "declaration-colon-space-after": "always-single-line", 33 "declaration-colon-space-before": "never", 34 "font-family-name-quotes": "always-where-recommended", 35 "font-weight-notation": "numeric", 36 "function-calc-no-unspaced-operator": true, 37 "function-comma-space-after": "always", 38 "function-comma-space-before": "never", 39 "function-linear-gradient-no-nonstandard-direction": true, 40 "function-max-empty-lines": 1, 41 "function-name-case": "lower", 42 "function-parentheses-space-inside": "never", 43 "function-url-quotes": "never", 44 "function-whitespace-after": "always", 45 "indentation": "tab", 46 "keyframe-declaration-no-important": true, 47 "length-zero-no-unit": true, 48 "max-empty-lines": 2, 49 "max-line-length": [ 80, { 50 "ignore": "non-comments", 51 } ], 52 "media-feature-colon-space-after": "always", 53 "media-feature-colon-space-before": "never", 54 "media-feature-no-missing-punctuation": true, 55 "media-feature-range-operator-space-after": "always", 56 "media-feature-range-operator-space-before": "always", 57 "media-query-list-comma-newline-after": "always-multi-line", 58 "media-query-list-comma-space-after": "always-single-line", 59 "media-query-list-comma-space-before": "never", 60 "no-eol-whitespace": true, 61 "no-extra-semicolons": true, 62 "no-invalid-double-slash-comments": true, 63 "no-missing-end-of-source-newline": true, 64 "number-leading-zero": "always", 65 "number-no-trailing-zeros": true, 66 "property-case": "lower", 67 "property-no-unknown": true, 68 "rule-nested-empty-line-before": [ "always", { 69 ignore: ["after-comment"], 70 } ], 71 "rule-non-nested-empty-line-before": [ "always", { 72 ignore: ["after-comment"], 73 } ], 74 "selector-attribute-brackets-space-inside": "never", 75 "selector-attribute-operator-space-after": "never", 76 "selector-attribute-operator-space-before": "never", 77 "selector-attribute-quotes": "always", 78 "selector-class-pattern": [ 79 "^[a-z]+(-[a-z]+)*", 80 { 81 "message": "Selector should use lowercase and separate words with hyphens (selector-class-pattern)", 82 }, 83 ], 84 "selector-id-pattern": [ 85 "^[a-z]+(-[a-z]+)*", 86 { 87 "message": "Selector should use lowercase and separate words with hyphens (selector-id-pattern)", 88 }, 89 ], 90 "selector-combinator-space-after": "always", 91 "selector-combinator-space-before": "always", 92 "selector-list-comma-newline-after": "always", 93 "selector-list-comma-space-before": "never", 94 "selector-max-empty-lines": 0, 95 "selector-pseudo-class-case": "lower", 96 "selector-pseudo-class-no-unknown": true, 97 "selector-pseudo-class-parentheses-space-inside": "never", 98 "selector-pseudo-element-case": "lower", 99 "selector-pseudo-element-colon-notation": "single", 100 "selector-pseudo-element-no-unknown": true, 101 "selector-type-case": "lower", 102 "selector-type-no-unknown": true, 103 "shorthand-property-no-redundant-values": true, 104 "string-no-newline": true, 105 "string-quotes": "double", 106 "unit-case": "lower", 107 "unit-no-unknown": true, 108 "value-keyword-case": "lower", 109 "value-list-comma-newline-after": "always-multi-line", 110 "value-list-comma-space-after": "always-single-line", 111 "value-list-comma-space-before": "never" 112 } 113 } -
.travis.yml
9 9 cache: 10 10 apt: true 11 11 directories: 12 - $HOME/.composer/cache 13 - $HOME/.rvm/gems 12 - $HOME/.composer/cache] 14 13 # - /tmp/wordpress/src/wp-content/plugins/buddypress/node_modules 15 14 16 15 php: … … 59 58 60 59 # before_install: Failures in this section will result in build status 'errored' 61 60 before_install: 62 # scss-lint requires Ruby >= 2.263 - source ~/.rvm/scripts/rvm && rvm install 2.2.0 && rvm use 2.2.064 61 # set up WP install 65 62 - export WP_DEVELOP_DIR=/tmp/wordpress/ 66 63 - mkdir -p $WP_DEVELOP_DIR … … 82 79 - mysql -e 'CREATE DATABASE wordpress_test;' -uroot 83 80 # prepare for running the tests 84 81 - cd $plugin_dir 85 - gem install scss_lint86 82 # setup NodeJS version using NVM 87 83 - node --version 88 84 - nvm install 4 … … 91 87 - npm --version 92 88 - mysql --version 93 89 - phpenv versions 94 - ruby --version95 90 96 91 # before_script: Failures in this section will result in build status 'errored' 97 92 before_script: -
Gruntfile.js
75 75 } 76 76 } 77 77 }, 78 stylelint: { 79 css: { 80 options: { 81 configFile: '.stylelintrc', 82 format: 'css' 83 }, 84 expand: true, 85 cwd: SOURCE_DIR, 86 src: BP_CSS.concat( BP_EXCLUDED_CSS, BP_EXCLUDED_MISC ) 87 }, 88 scss: { 89 options: { 90 configFile: '.stylelintrc', 91 format: 'scss' 92 }, 93 expand: true, 94 cwd: SOURCE_DIR, 95 src: [ 'bp-templates/bp-legacy/css/*.scss' ] 96 } 97 }, 78 98 sass: { 79 99 styles: { 80 100 cwd: SOURCE_DIR, … … 193 213 src: BP_JS 194 214 } 195 215 }, 196 scsslint: {197 options: {198 bundleExec: false,199 colorizeOutput: true,200 config: '.scss-lint.yml'201 },202 core: [ SOURCE_DIR + 'bp-templates/bp-legacy/css/*.scss' ]203 },204 216 cssmin: { 205 217 minify: { 206 218 cwd: BUILD_DIR, … … 270 282 /** 271 283 * Register tasks. 272 284 */ 273 grunt.registerTask( 'src', ['checkDependencies', 'jsvalidate:src', 'jshint', 's csslint', 'sass', 'rtlcss'] );285 grunt.registerTask( 'src', ['checkDependencies', 'jsvalidate:src', 'jshint', 'stylelint', 'sass', 'rtlcss'] ); 274 286 grunt.registerTask( 'commit', ['src', 'checktextdomain', 'imagemin'] ); 275 287 grunt.registerTask( 'build', ['commit', 'clean:all', 'copy:files', 'uglify', 'jsvalidate:build', 'cssmin', 'makepot', 'exec:bpdefault'] ); 276 288 grunt.registerTask( 'release', ['build', 'exec:bbpress'] ); -
package.json
6 6 "description": "BuddyPress helps site builders and WordPress developers add community features to their websites, with user profile fields, activity streams, messaging, and notifications.", 7 7 "devDependencies": { 8 8 "grunt": "~1.0.1", 9 "grunt-check-dependencies": "~0.12.0", 9 10 "grunt-checktextdomain": "~1.0.0", 10 11 "grunt-contrib-clean": "~1.0.0", 11 12 "grunt-contrib-copy": "~1.0.0", … … 15 16 "grunt-contrib-uglify": "~2.0.0", 16 17 "grunt-contrib-watch": "~1.0.0", 17 18 "grunt-exec": "~1.0.0", 18 "grunt-check-dependencies": "~0.12.0",19 19 "grunt-jsvalidate": "~0.2.2", 20 20 "grunt-legacy-util": "^1.0.0", 21 21 "grunt-patch-wordpress": "~0.4.0", 22 22 "grunt-rtlcss": "~2.0.1", 23 23 "grunt-sass": "~1.2.0", 24 24 "grunt-scss-lint": "~0.3.8", 25 "grunt-stylelint": "^0.6.0", 25 26 "grunt-wp-i18n": "~0.5.3", 26 "matchdep": "~1.0.0" 27 "matchdep": "~1.0.0", 28 "postcss-scss": "^0.3.0", 29 "stylelint": "^7.3.1" 27 30 }, 28 31 "engines": { 29 32 "node": ">=4.2.1"