diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index b656be27..00000000 --- a/.editorconfig +++ /dev/null @@ -1,17 +0,0 @@ -# EditorConfig is awesome: http://EditorConfig.org -root = true - -[*] -charset = utf-8 -indent_size = 2 -indent_style = space -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -[{.gitignore,.npmignore}] -end_of_line = -trim_trailing_whitespace = false - -[*.md] -trim_trailing_whitespace = false diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index eccc6811..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,334 +0,0 @@ -module.exports = { - 'env': { - 'browser': true, - 'commonjs': true, - 'es6': true - }, - 'extends': 'eslint:recommended', - 'globals': { - 'Atomics': 'readonly', - 'SharedArrayBuffer': 'readonly' - }, - 'parserOptions': { - 'ecmaVersion': 2018 - }, - 'rules': { - 'accessor-pairs': 'error', - 'array-bracket-newline': 'error', - 'array-bracket-spacing': [ - 'error', - 'never' - ], - 'array-callback-return': 'off', - 'array-element-newline': 'off', - 'arrow-body-style': 'off', - 'arrow-parens': 'off', - 'arrow-spacing': [ - 'error', - { - 'after': true, - 'before': true - } - ], - 'block-scoped-var': 'error', - 'block-spacing': 'error', - 'brace-style': [ - 'error', - '1tbs' - ], - 'callback-return': 'error', - 'camelcase': 'error', - 'capitalized-comments': 'off', - 'class-methods-use-this': 'off', - 'comma-dangle': 'error', - 'comma-spacing': [ - 'error', - { - 'after': true, - 'before': false - } - ], - 'comma-style': [ - 'error', - 'last' - ], - 'complexity': 'error', - 'computed-property-spacing': [ - 'error', - 'never' - ], - 'consistent-return': 'off', - 'consistent-this': 'error', - 'curly': 'off', - 'default-case': 'error', - 'dot-location': [ - 'error', - 'property' - ], - 'dot-notation': [ - 'error', - { - 'allowKeywords': true - } - ], - 'eol-last': 'error', - 'eqeqeq': 'error', - 'func-call-spacing': 'error', - 'func-name-matching': 'error', - 'func-names': 'off', - 'func-style': 'off', - 'function-paren-newline': 'error', - 'generator-star-spacing': 'error', - 'global-require': 'off', - 'guard-for-in': 'off', - 'handle-callback-err': 'error', - 'id-blacklist': 'error', - 'id-length': 'off', - 'id-match': 'error', - 'implicit-arrow-linebreak': [ - 'error', - 'beside' - ], - 'indent': 'off', - 'indent-legacy': 'off', - 'init-declarations': 'off', - 'jsx-quotes': 'error', - 'key-spacing': 'error', - 'keyword-spacing': [ - 'error', - { - 'after': true, - 'before': true - } - ], - 'line-comment-position': 'off', - 'linebreak-style': [ - 'error', - 'unix' - ], - 'lines-around-comment': 'off', - 'lines-around-directive': 'error', - 'lines-between-class-members': [ - 'error', - 'always' - ], - 'max-classes-per-file': 'error', - 'max-depth': 'error', - 'max-len': 'error', - 'max-lines': 'off', - 'max-lines-per-function': 'error', - 'max-nested-callbacks': 'error', - 'max-params': 'error', - 'max-statements': 'off', - 'max-statements-per-line': 'error', - 'multiline-comment-style': [ - 'error', - 'separate-lines' - ], - 'multiline-ternary': 'off', - 'new-cap': 'error', - 'new-parens': 'error', - 'newline-after-var': 'off', - 'newline-before-return': 'off', - 'newline-per-chained-call': 'off', - 'no-alert': 'error', - 'no-array-constructor': 'error', - 'no-async-promise-executor': 'error', - 'no-await-in-loop': 'error', - 'no-bitwise': 'error', - 'no-buffer-constructor': 'error', - 'no-caller': 'error', - 'no-catch-shadow': 'error', - 'no-confusing-arrow': 'error', - 'no-continue': 'off', - 'no-div-regex': 'error', - 'no-duplicate-imports': 'error', - 'no-else-return': 'off', - 'no-empty-function': 'error', - 'no-eq-null': 'error', - 'no-eval': 'error', - 'no-extend-native': 'error', - 'no-extra-bind': 'error', - 'no-extra-label': 'error', - 'no-extra-parens': 'error', - 'no-floating-decimal': 'error', - 'no-implicit-coercion': 'error', - 'no-implicit-globals': 'error', - 'no-implied-eval': 'error', - 'no-inline-comments': 'off', - 'no-inner-declarations': [ - 'error', - 'functions' - ], - 'no-invalid-this': 'error', - 'no-iterator': 'error', - 'no-label-var': 'error', - 'no-labels': 'error', - 'no-lone-blocks': 'error', - 'no-lonely-if': 'off', - 'no-loop-func': 'error', - 'no-magic-numbers': 'off', - 'no-misleading-character-class': 'error', - 'no-mixed-operators': 'off', - 'no-mixed-requires': 'error', - 'no-multi-assign': 'off', - 'no-multi-spaces': 'error', - 'no-multi-str': 'error', - 'no-multiple-empty-lines': 'error', - 'no-native-reassign': 'error', - 'no-negated-condition': 'off', - 'no-negated-in-lhs': 'error', - 'no-nested-ternary': 'error', - 'no-new': 'error', - 'no-new-func': 'error', - 'no-new-object': 'error', - 'no-new-require': 'error', - 'no-new-wrappers': 'error', - 'no-octal-escape': 'error', - 'no-param-reassign': 'off', - 'no-path-concat': 'off', - 'no-plusplus': 'off', - 'no-process-env': 'off', - 'no-process-exit': 'off', - 'no-proto': 'error', - 'no-prototype-builtins': 'off', - 'no-restricted-globals': 'error', - 'no-restricted-imports': 'error', - 'no-restricted-modules': 'error', - 'no-restricted-properties': 'error', - 'no-restricted-syntax': 'error', - 'no-return-assign': 'error', - 'no-return-await': 'error', - 'no-script-url': 'error', - 'no-self-compare': 'error', - 'no-sequences': 'error', - 'no-shadow': 'off', - 'no-shadow-restricted-names': 'error', - 'no-spaced-func': 'error', - 'no-sync': 'off', - 'no-tabs': 'error', - 'no-template-curly-in-string': 'error', - 'no-ternary': 'off', - 'no-throw-literal': 'error', - 'no-trailing-spaces': 'error', - 'no-undef-init': 'error', - 'no-undefined': 'off', - 'no-underscore-dangle': 'off', - 'no-unmodified-loop-condition': 'error', - 'no-unneeded-ternary': 'error', - 'no-unused-expressions': 'error', - 'no-use-before-define': 'off', - 'no-useless-call': 'error', - 'no-useless-catch': 'error', - 'no-useless-computed-key': 'error', - 'no-useless-concat': 'error', - 'no-useless-constructor': 'error', - 'no-useless-rename': 'error', - 'no-useless-return': 'error', - 'no-var': 'off', - 'no-void': 'error', - 'no-warning-comments': 'off', - 'no-whitespace-before-property': 'error', - 'no-with': 'error', - 'nonblock-statement-body-position': [ - 'error', - 'any' - ], - 'object-curly-newline': 'error', - 'object-curly-spacing': [ - 'error', - 'never' - ], - 'object-shorthand': 'off', - 'one-var': 'off', - 'one-var-declaration-per-line': 'error', - 'operator-assignment': [ - 'error', - 'always' - ], - 'operator-linebreak': [ - 'error', - 'after' - ], - 'padded-blocks': 'off', - 'padding-line-between-statements': 'error', - 'prefer-arrow-callback': 'off', - 'prefer-const': 'off', - 'prefer-destructuring': 'off', - 'prefer-named-capture-group': 'error', - 'prefer-numeric-literals': 'error', - 'prefer-object-spread': 'error', - 'prefer-promise-reject-errors': [ - 'error', - { - 'allowEmptyReject': true - } - ], - 'prefer-reflect': 'off', - 'prefer-rest-params': 'error', - 'prefer-spread': 'off', - 'prefer-template': 'off', - 'quote-props': 'off', - 'quotes': [ - 'error', - 'single' - ], - 'radix': [ - 'error', - 'as-needed' - ], - 'require-atomic-updates': 'error', - 'require-await': 'error', - 'require-jsdoc': 'off', - 'require-unicode-regexp': 'off', - 'rest-spread-spacing': 'error', - 'semi': 'error', - 'semi-spacing': [ - 'error', - { - 'after': true, - 'before': false - } - ], - 'semi-style': [ - 'error', - 'last' - ], - 'sort-imports': 'error', - 'sort-keys': 'off', - 'sort-vars': 'off', - 'space-before-blocks': 'error', - 'space-before-function-paren': 'off', - 'space-in-parens': [ - 'error', - 'never' - ], - 'space-infix-ops': 'off', - 'space-unary-ops': 'error', - 'spaced-comment': [ - 'error', - 'always' - ], - 'strict': 'error', - 'switch-colon-spacing': 'error', - 'symbol-description': 'error', - 'template-curly-spacing': [ - 'error', - 'never' - ], - 'template-tag-spacing': 'error', - 'unicode-bom': [ - 'error', - 'never' - ], - 'valid-jsdoc': 'off', - 'vars-on-top': 'off', - 'wrap-iife': 'error', - 'wrap-regex': 'error', - 'yield-star-spacing': 'error', - 'yoda': [ - 'error', - 'never' - ] - } -}; diff --git a/.gitignore b/.gitignore deleted file mode 100644 index c7d5d95c..00000000 --- a/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -lib -lib-cov -node_modules -test/test-coverage.html - -.idea -*.iml - -.DS_Store diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 4b3b2959..00000000 --- a/.jshintrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "eqeqeq": true, - "esnext": true, - "freeze": true, - "globals": { - "afterEach": false, - "beforeEach": false, - "describe": false, - "it": false - }, - "node": true, - "strict": true, - "undef": true, - "unused": true, - "-W084": true -} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f98fed06..00000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - '12' - - '10' - - '8' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 2f309ed1..00000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,79 +0,0 @@ -# Contributing to CSSComb - -## Table of Contents - -- [Pull requests](#pull-requests) -- [For maintainers](#for-maintainers) - -## Pull requests - -#### 1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes: - -a. Clone your fork of the repo into the current directory -```bash -git clone https://github.com//csscomb.js -``` - -b. Navigate to the newly cloned directory -```bash -cd csscomb.js -``` - -c. Assign the original repo to a remote called `upstream` -```bash -git remote add upstream https://github.com/csscomb/csscomb.js -``` - -#### 2. If you cloned a while ago, get the latest changes from upstream: - -```bash -git checkout dev -git pull upstream dev -``` - -> **IMPORTANT**: We are using `dev` branch for development, not `master`. - -#### 3. Create a topic branch for your feature, change, or fix: - -```bash -git checkout -b -``` - -#### 4. Patches and features will not be accepted without tests. -Run `npm test` to check that all tests pass after you've made changes. - -#### 5. Update the `README.md` or [docs](https://github.com/csscomb/csscomb.js/tree/master/doc) if there were corresponding changes or new options. - -#### 6. Locally rebase the upstream development branch into your topic branch: - -```bash -git pull --rebase upstream dev -``` - -#### 7. Push your topic branch up to your fork: -```bash -git push origin -``` - -#### 8. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) to a `dev` branch with a clear title and description. - -## For maintainers - -### Submitting changes - -1. All non-trivial changes should be put up for review using GitHub Pull Requests. -2. Your change should not be merged into `dev`, without at least one "OK" comment - from another maintainer/collaborator on the project. -3. Once a feature branch has been merged into its target branch, please delete - the feature branch from the remote repository. - -### Releasing a new version - -1. Include all new functional changes in the CHANGELOG. -2. Use a dedicated commit to increment the version. The version needs to be - added to the `CHANGELOG.md` (inc. date) and the `package.json`. -3. The commit message must be of `v0.0.0` format. -4. Merge `dev` into `master`. -5. Create a tag for the version: `git tag v0.0.0`. -6. Push the changes and tags to GitHub: `git push origin dev master v0.0.0`. -7. Publish the new version to npm: `npm publish`. diff --git a/doc/configuration.md b/doc/configuration.md deleted file mode 100644 index 2d36135e..00000000 --- a/doc/configuration.md +++ /dev/null @@ -1,133 +0,0 @@ -# Configuration - -You must configure CSScomb before use. -There are a number of ways how you can do it. - -## Use one of predefined configs - -There are [several config -files](https://github.com/csscomb/csscomb.js/tree/master/config) -included in this project you can use right away: - -- `csscomb` -- `zen` -- `yandex` - -In CLI, `csscomb` is a default config file that is used unless you provide your -own. -In Node.js, you can pass config's name to constructor: - -```js -var Comb = require('csscomb'); -var comb = new Comb('yandex'); -``` - -Feel free to use predefined configs as examples: copy one of them and modify to -your taste. -Just remember to save the file as `.csscomb.json` in project's root. - -## Create custom config - -You can easily write your own configuration. -The only requirement is that config is valid JSON in order to work correctly. - -Here is an example: - -```json -{ - "exclude": ["node_modules/**"], - "verbose": true, - - "always-semicolon": true, - "color-case": "lower", - "color-shorthand": true, - "element-case": "lower", - "eof-newline": true, - "leading-zero": false, - "quotes": "single", - "remove-empty-rulesets": true, - "strip-spaces": true, - "unitless-zero": true, - "vendor-prefix-align": true -} -``` - -Take a look at [available options](options.md) and choose those you need. You can use our [visual config builder](http://csscomb.com/config) to choose most options. - -### Where to put config - -CSScomb will look for a file named `.csscomb.json`. -The best way is to put the file in your project's root. -However, if you want to use one config for several projects, it's fine to put -the file inside a parent folder. -CSScomb will look for a config file recursively up untill it reaches your -`HOME` directory. - -Remember that you can always set custom path. -In CLI: -```bash -csscomb -c path/to/config assets/css -``` - -In Node.js: -```js -var Comb = require('csscomb'); -var config = require('path/to/config'); -var comb = new Comb(config); -``` - -## Generate config from a template - -Instead of configuring all the options one by one, you can use a template file: -CSScomb will detect the coding style and use it as a config. -All existing properties except `sort-order` can be configured this way: - -```bash -csscomb -d example.css > .csscomb.json -``` - -This will create `.csscomb.json` based on options that can be detected in -`example.css` file. - -Let's say your template file has following content: - -```css -.foo -{ - width: #fff; -} -``` - -Generated config wiil then look this way: - -```json -{ - "remove-empty-rulesets": true, - "always-semicolon": true, - "color-case": "lower", - "color-shorthand": true, - "strip-spaces": true, - "eof-newline": true -} -``` - - -## Override template's settings - -You can use template inside existing config and then complete it or override -some of detected settings: - -```json -{ - "template": "example.css", - "leading-zero": false, - "vendor-prefix-align": true -} -``` - -This config will: - -1. detect all the options from the `example.css`, -1. then use `"leading-zero": false` instead of anything detected, -1. then use `"vendor-prefix-align": true` even if there were no prefixed -properties or values inside the `example.css`. diff --git a/doc/options.md b/doc/options.md deleted file mode 100644 index 959e9291..00000000 --- a/doc/options.md +++ /dev/null @@ -1,974 +0,0 @@ -# Configuration options - -There are a number of options you can use, all of them are switched off by -default. -Here is a full list in the same order they are applied while processing css: - -- [always-semicolon](#always-semicolon) -- [remove-empty-rulesets](#remove-empty-rulesets) -- [color-case](#color-case) -- [color-shorthand](#color-shorthand) -- [element-case](#element-case) -- [eof-newline](#eof-newline) -- [leading-zero](#leading-zero) -- [quotes](#quotes) -- [sort-order-fallback](#sort-order-fallback) -- [space-after-colon](#space-after-colon) -- [space-after-combinator](#space-after-combinator) -- [space-after-opening-brace](#space-after-opening-brace) -- [space-after-selector-delimiter](#space-after-selector-delimiter) -- [space-before-colon](#space-before-colon) -- [space-before-combinator](#space-before-combinator) -- [space-before-opening-brace](#space-before-opening-brace) -- [space-before-selector-delimiter](#space-before-selector-delimiter) -- [space-between-declarations](#space-between-declarations) -- [block-indent](#block-indent) -- [sort-order](#sort-order) -- [strip-spaces](#strip-spaces) -- [space-before-closing-brace](#space-before-closing-brace) -- [unitless-zero](#unitless-zero) -- [tab-size](#tab-size) -- [vendor-prefix-align](#vendor-prefix-align) -- [lines-between-rulesets](#lines-between-rulesets) - -Following options are ignored while processing `*.sass` files: - -- always-semicolon -- space-before-opening-brace -- space-after-opening-brace -- space-before-closing-brace -- space-between-declarations - - -## always-semicolon - -Whether to add a semicolon after the *last* value/mixin. - -Acceptable value: `true`. - -Example: `{ "always-semicolon": true }` - -```css -/* before */ -a { color: red; text-decoration: underline } - -/* after */ -a { color: red; text-decoration: underline; } -``` - -### always-semicolon vs. preprocessors - -In `*.scss` and `*.less` files semicolons are not added after `}` -even if it's part of a value. - -Example: `{ "always-semicolon": true }` - -```scss -// before -div { - color: tomato; - font: { - family: fantasy; - size: 16px - } - } - -// after -div { - color: tomato; - font: { - family: fantasy; - size: 16px; - } - } -``` - -## block-indent - -Set indent for code inside blocks, including media queries and nested rules. - -Acceptable values: - -* `{Number}` — number of whitespaces; -* `{String}` — string with whitespaces and tabs. Note that line breaks are not - allowed here. - -Example: `{ "block-indent": 4 }` - -```scss -// Before: -a { -top: 0; - p { - color: tomato; -position: happy; - } -} - -// After: -a { - top: 0; - p { - color: tomato; - position: happy; - } - } -``` - -Example: `{ "block-indent": "" }` - -```scss -// Before: -a { -top: 0; - p { - color: tomato; -position: happy; - } -} - -// After: -a { -top: 0; -p { -color: tomato; -position: happy; -} -} -``` - -## color-case - -Unify case of hexadecimal colors. - -Acceptable values: - -* `lower` — for lowercase, -* `upper` — for uppercase. - -Example: `{ "color-case": "lower" }` - -```css -/* before */ -a { color: #FFF } - -/* after */ -a { color: #fff } -``` - -## color-shorthand - -Whether to expand hexadecimal colors or use shorthands. - -Acceptable values: - -* `true` — use shorthands; -* `false` — expand hexadecimal colors to 6 symbols. - -Example: `{ "color-shorthand": true }` - -```css -/* before */ -b { color: #ffcc00 } - -/* after */ -b { color: #fc0 } -``` - -Example: `{ "color-shorthand": false }` - -```css -/* before */ -b { color: #fc0 } - -/* after */ -b { color: #ffcc00 } -``` - -## element-case - -Unify case of element selectors. - -Acceptable values: - -* `lower` — for lowercase; -* `upper` — for uppercase. - -Example: `{ "element-case": "upper" }` - -```css -/* before */ -li > a { color: red } - -/* after */ -LI > A { color: red } -``` - -## eof-newline - -Add/remove line break at EOF. - -Acceptable values: - -* `true` — add line break; -* `false` – remove line break. - -Example: `{ "eof-newline": true }` - -`a { color: red }` → `a { color: red }\n` - -Example: `{ "eof-newline": false }` - -`a { color: red }\n` → `a { color: red }` - -## exclude - -List files that should be ignored while combing. - -Acceptable value: - -* `{String[]}` — array of - [Ant path patterns](http://ant.apache.org/manual/dirtasks.html#patterns). - -Example: `{ "exclude": ["node_modules/**"] }` — exclude all files and -directories under `node_modules` dir. - -## leading-zero - -Add/remove leading zero in dimensions. - -Acceptable values: - -* `true` — add leading zero; -* `false` — remove leading zero. - -Example: `{ "leading-zero": false }` - -```css -/* before */ -p { padding: 0.5em } - -/* after */ -p { padding: .5em } -``` - -## quotes - -Unify quotes style. - -Acceptable values: - -* `single` — transform all `"` to `'`; -* `double` — transform all `'` to `"`. - -Example: `{ "quotes": "single" }` - -```css -/* before */ -p[href^="https://"]:before { content: "secure" } - -/* after */ -p[href^='https://']:before { content: 'secure' } -``` - -## remove-empty-rulesets - -Remove all rulesets that contain nothing but spaces. - -Acceptable value: `true` - -Example: `{ "remove-empty-rulesets": true }`. - -`a { color: red; } p { /* hey */ } b { }` → `a { color: red; } p { /* hey */ } ` - -## sort-order - -Set sort order. - -**Note**: Use one of [predefined -configs](https://github.com/csscomb/csscomb.js/tree/master/config) -as an example. - -Acceptable values: - -* `{Array}` of rules -* `{Array}` of arrays of rules for groups separation - -Example: `{ "sort-order": [ "margin", "padding" ] }` - -```css -/* before */ -p { - padding: 0; - margin: 0; -} - -/* after */ -p { - margin: 0; - padding: 0; -} -``` - -Example: `{ "sort-order": [ [ "margin", "padding" ], [ "border", "background" ] ] }` - -```css -/* before */ -p { - background: none; - border: 0; - margin: 0; - padding: 0; -} - -/* after */ -p { - margin: 0; - padding: 0; - - border: 0; - background: none; -} -``` - -### sort-order vs. preprocessors - -If you sort properties in `*.scss` or `*.less` files, you can use one of 3 -keywords in your config: - -* `$variable` — for variable declarations (e.g. `$var` in Sass or `@var` in LESS); -* `$include` — for all mixins except those that have been specified (e.g. `@include ...` in Sass - or `.mixin()` in LESS); -* `$include mixin-name` — for mixins with specified name (e.g. `@include mixin-name` in Sass - or `.mixin-name()` in LESS); -* `$extend` — for extends (e.g. `@extend .foo` in Sass or `&:extend(.foo)` in LESS); -* `$import` — for `@import` rules. - -Example: `{ "sort-order": [ [ "$variable" ], [ "$include" ], [ "top", "padding" ], [ "$include media" ] ] }` - -```scss -/* before */ -p { - padding: 0; - @include mixin($color); - $color: tomato; - @include media("desktop") { - color: black; - } - top: 0; -} - -/* after */ -p { - $color: tomato; - - @include mixin($color); - - top: 0; - padding: 0; - - @include media("desktop") { - color: black; - } -} -``` - -### sort-order vs. leftovers - -When there are properties that are not mentioned in the `sort-order` option, they are inserted after all the sorted properties in the new group in the same order they were in the source stylesheet. - -You can override this by using a “leftovers” token: `...` — just place it either in its own group, or near other properties in any other group and CSSComb would place all the properties that were not sorted where the `...` was in `sort-order`. - -So, with this value: - -``` json -{ - "sort-order": [ - ["$variable"], - ["position"], - ["...", "border"], - ["$include"], - ["font"] - ] -} -``` - -everything would go into five groups: variables, then group with `position`, then group containing all the leftovers plus the `border`, then group with all includes and then the `font`. - -## sort-order-fallback - -Apply a special sort order for properties that are not specified in `sort-order` -list. -Works great with [leftovers](#sort-order-vs-leftovers). -**Note:** This option is applied only if [sort order](#sort-order) list is -provided. - -Acceptable values: - -* `abc` - sort unknown options alphabetically. - -Example: `{ "sort-order-fallback": "abc", "sort-order": ["top"] }` - -```scss -// Before: -a { - height: 100px; - color: tomato; - top: 0; -} - -// After: -a { - top:0; - - color:tomato; - height: 100px; -} -``` - -Example: `{ "sort-order-fallback": "abc", "sort-order": ["..."] }` - -```scss -// Before: -a { - height: 100px; - color: tomato; - top: 0; -} - -// After: -a { - color:tomato; - height: 100px; - top:0; -} -``` - -## space-after-colon - -Set space after `:` in declarations. - -Acceptable values: - -* `{Number}` — number of whitespaces; -* `{String}` — string with whitespaces, tabs or line breaks. - -Example: `{ "space-after-colon": "" }` - -```scss -// Before: -a { - top: 0; - color: tomato; -} - -// After: -a { - top:0; - color:tomato; -} -``` - -Example: `{ "space-after-colon": 1 }` - -```scss -// Before: -a { - top:0; - color:tomato; -} - -// After: -a { - top: 0; - color: tomato; -} -``` - -## space-after-combinator - -Set space after combinator (for example, in selectors like `p > a`). - -Acceptable values: - -* `{Number}` — number of whitespaces; -* `{String}` — string with whitespaces, tabs or line breaks. - -Example: `{ "space-after-combinator": 1 }` - -```scss -// Before: -p>a { color: panda; } - -// After: -p> a { color: panda; } -``` - -Example: `{ "space-after-combinator": "\n " }` - -```scss -// Before: -p > a { color: panda; } - -// After: -p > - a { color: panda; } -``` - -## space-between-declarations - -Set space between declarations (i.e. `color: tomato`). - -Acceptable values: - -* `{Number}` — number of whitespaces; -* `{String}` — string with whitespaces, tabs or line breaks. - -Example: `{ "space-between-declarations": 1 }` - -```scss -// Before: -a { - color: panda; /* comment */ - top: 0; - /* comment */ - right: 0; - position: absolute - } - -// After: -a { - color: panda; /* comment */ top: 0; - /* comment */ - right: 0; position: absolute - } -``` - -Example: `{ "space-between-declarations": "\n " }` - -```scss -// Before: -a { - color: panda; top: 0; right: 0} - -// After: -a { - color: panda; - top: 0; - right: 0;} -``` - - -## space-after-opening-brace - -Set space after `{`. - -Acceptable values: - -* `{Number}` — number of whitespaces; -* `{String}` — string with whitespaces, tabs or line breaks. - -Example: `{ "space-after-opening-brace": 1 }` - -```scss -// Before: -a {color: panda;} - -// After: -a { color: panda;} -``` - -Example: `{ "space-after-opening-brace": "\n" }` - -```scss -// Before: -a{color: panda;} - -// After: -a{ -color: panda;} -``` - -## space-after-selector-delimiter - -Set space after selector delimiter. - -Acceptable values: - -* `{Number}` — number of whitespaces; -* `{String}` — string with whitespaces, tabs or line breaks. - -Example: `{ "space-after-selector-delimiter": 1 }` - -```scss -// Before: -a,b{ - color: panda; - } - -// After: -a, b { - color: panda; - } -``` - -Example: `{ "space-after-selector-delimiter": "\n" }` - -```scss -// Before: -a, b{ - color: panda; - } - -// After: -a, -b{ - color: panda; - } -``` - -## space-before-closing-brace - -Set space before `}`. - -Acceptable values: - -* `{Number}` — number of whitespaces; -* `{String}` — string with whitespaces, tabs or line breaks. - -Example: `{ "space-before-closing-brace": 1 }` - -```scss -// Before: -a { - top: 0; - color: tomato; -} - -// After: -a { - top: 0; - color: tomato; } -``` - -Example: `{ "space-before-closing-brace": "\n" }` - -```scss -// Before: -a { - top: 0; - color: tomato;} - -// After: -a { - top: 0; - color: tomato; -} -``` - -## space-before-colon - -Set space before `:` in declarations. - -Acceptable values: - -* `{Number}` — number of whitespaces; -* `{String}` — string with whitespaces, tabs or line breaks. - -Example: `{ "space-before-colon": "" }` - -```scss -// Before: -a { - top : 0; - color : tomato; -} - -// After: -a { - top: 0; - color: tomato; -} -``` - -Example: `{ "space-before-colon": 1 }` - -```scss -// Before: -a { - top:0; - color:tomato; -} - -// After: -a { - top :0; - color :tomato; -} -``` - -## space-before-combinator - -Set space before combinator (for example, in selectors like `p > a`). - -Acceptable values: - -* `{Number}` — number of whitespaces; -* `{String}` — string with whitespaces, tabs or line breaks. - -Example: `{ "space-before-combinator": 1 }` - -```scss -// Before: -p>a { color: panda; } - -// After: -p >a { color: panda; } -``` - -Example: `{ "space-before-combinator": "\n" }` - -```scss -// Before: -p > a { color: panda; } - -// After: -p -> a { color: panda; } -``` - -## space-before-opening-brace - -Set space before `{`. - -Acceptable values: - -* `{Number}` — number of whitespaces; -* `{String}` — string with whitespaces, tabs or line breaks. - -Example: `{ "space-before-opening-brace": 1 }` - -```scss -// Before: -a{ - color: panda; - } - -// After: -a { - color: panda; - } -``` - -Example: `{ "space-before-opening-brace": "\n" }` - -```scss -// Before: -a{ - color: panda; - } - -// After: -a -{ - color: panda; - } -``` - -## space-before-selector-delimiter - -Set space before selector delimiter. - -Acceptable values: - -* `{Number}` — number of whitespaces; -* `{String}` — string with whitespaces, tabs or line breaks. - -Example: `{ "space-before-selector-delimiter": 0 }` - -```scss -// Before: -a , b{ - color: panda; - } - -// After: -a, b { - color: panda; - } -``` - -Example: `{ "space-before-selector-delimiter": "\n" }` - -```scss -// Before: -a, b{ - color: panda; - } - -// After: -a -,b{ - color: panda; - } -``` - -## strip-spaces - -Whether to trim trailing spaces. - -Acceptable value: `true`. - -Example: `{ "strip-spaces": true }` - -`a { color: red } \n \n \n` → `a { color: red }\n` - -`a { color: red }\t` → `a { color: red }` - -## tab-size - -Set tab size (number of spaces to replace hard tabs). - -Acceptable values: - -* `{Number}` — number of whitespaces; - -Example: `{ "tab-size": 2 }` - -```scss -// Before: -a{ - color: panda; - } - -// After: -a { - color: panda; - } -``` - -## template - -**Note:** See [configuration docs](configuration.md#override-templates-settings) -for more information. - -Acceptable value: - -* `{String}` — path to the `.css` file. - -Example: `{ "template": "example.css" }` - -## unitless-zero - -Whether to remove units in zero-valued dimensions. - -Acceptable value: `true`. - -Example: `{ "unitless-zero": true }` - -```css -/* before */ -img { border: 0px } - -/* after */ -img { border: 0 } -``` - -## vendor-prefix-align - -Whether to align prefixes in properties and values. - -Acceptable value: `true`. - -Example: `{ "vendor-prefix-align": true }` - -```css -/* before */ -a -{ - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - background: -webkit-linear-gradient(top, #fff 0, #eee 100%); - background: -moz-linear-gradient(top, #fff 0, #eee 100%); - background: linear-gradient(to bottom, #fff 0, #eee 100%); -} - -/* after */ -a -{ - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - background: -webkit-linear-gradient(top, #fff 0, #eee 100%); - background: -moz-linear-gradient(top, #fff 0, #eee 100%); - background: linear-gradient(to bottom, #fff 0, #eee 100%); -} -``` - -## lines-between-rulesets - -Number of line breaks between rulesets or @rules. - -Acceptable values: - -* `{Number}` — number of newlines; - -Example: `{ "lines-between-rulesets": 1}` - -```scss -// Before: -.foo { - @include border-radius(5px); - background: red; - .baz { - .test { - height: 50px; - } - } -}.bar { - border: 1px solid red; - @media (min-width: 500px) { - width: 50px; - } -} - -// After: -.foo { - @include border-radius(5px); - background: red; - - .baz { - .test { - height: 50px; - } - } -} - -.bar { - border: 1px solid red; - - @media (min-width: 500px) { - width: 50px; - } -} -``` - -## verbose - -Whether to use `--verbose` option in CLI. - -Acceptable value: `true`. - -Example: `{ "verbose": true }` - -```bash -csscomb ./test - -✓ test/integral.origin.css - test/integral.expect.css - -2 files processed -1 file fixed -96 ms spent -``` diff --git a/doc/usage-cli.md b/doc/usage-cli.md deleted file mode 100644 index 1f0a37fa..00000000 --- a/doc/usage-cli.md +++ /dev/null @@ -1,102 +0,0 @@ -# Command Line usage - -To run `csscomb`: - -```bash -csscomb path[ path[...]] -``` - -`path` can be either a directory or a file: - -```bash -csscomb assets/css public/styles.css -``` - -If you installed the package locally, use local bin file instead: - -```bash -./node_modules/.bin/csscomb assets/css public/styles.css -``` - -## Options - -### help - -If you run `csscomb -h`, it will show some helpful information: - -```bash -csscomb -h - - Usage: csscomb [options] - - Options: - - -h, --help output usage information - -V, --version output the version number - -v, --verbose verbose mode - -c, --config [path] configuration file path - -d, --detect detect mode (would return detected options) - -l, --lint in case some fixes needed returns an error - -t, --tty-mode execution in TTY mode (useful, when running tool using external app, e.g. IDE) -``` - -### config - -If you want to use custom config instead of predefined `csscomb.json` just -put a file named `.csscomb.json` to project's root (see [configuration -docs](configuration.md#where-to-put-config) for more information). -However, if for some reason you would like to use custom path, do it this way: - -```bash -csscomb -c path/to/config styles.css -``` - -### detect - -If you want to generate a config file based on a template file, run: - -```bash -csscomb -d example.css > .csscomb.json -``` - -See [configuration docs](configuration.md#generate-config-from-a-template) for -more information. - -### lint - -CSScomb can be used as a linter, i.e. telling you what should be changed instead -of modifying anything. -This option should be combined with `--verbose`: - -```bash -csscomb -lv assets/css - - assets/css/main.scss -! assets/css/main.scss -! assets/css/main.scss -! assets/css/main.scss - -4 files processed -0 files fixed -spent: 30ms -``` - -Exclamation mark is a sign that something is wrong with the file. - -### verbose - -If you are curious or you just like a lot of output info, `--verbose` is your -good friend: - -```bash -csscomb -v assets/css - - assets/css/main.scss -✓ assets/css/main.scss -✓ assets/css/main.scss -✓ assets/css/main.scss - -4 files processed -3 files fixed -spent: 33ms -``` diff --git a/doc/usage-node.md b/doc/usage-node.md deleted file mode 100644 index 5a3fbcc6..00000000 --- a/doc/usage-node.md +++ /dev/null @@ -1,113 +0,0 @@ -# Node.js module usage - -CSScomb can be used in Node.js projects: inside a plugin or as a dev tool. - -Workflow can look like this: - -```js -// Require: -var Comb = require('csscomb'); -var config = require('path/to/config'); - -// Configure: -var comb = new Comb(config); - -// Use: -comb.processPath('style.css'); -``` - -## new Comb(config) - -Create instance's prototype. - -Parameters: - -* `{String|Object} config` — config that should be used after creating - instance. Should be JSON or one of predefined config's name. Optional. - -Example: Create CSScomb instance and configure it using predefined `yandex` sort -order - -```js -var comb = new Comb('yandex'); - -// This is shortcut for: -var comb = new Comb(); -var config = Comb.getConfig('yandex'); -comb.configure(config); -``` - -Example: Create CSScomb instance and configure it using config object - -```js -var config = require('path/to/config'); -var comb = new Comb(config); - -// This is shortcut for: -var comb = new Comb(); -comb.configure(config); -``` - -## Comb.getConfig(name) - -Get one of predefined configs. - -Note that this is a static method. - -Parameters: - -* `{String} name` — config's name. Should be one of the following: - `csscomb`, `zen` or `yandex`. - -Example: Configure CSScomb using predefined `zen` sort order that is slightly -modified. - -```js -var config = Comb.getConfig('zen'); -config['always-semicolon'] = true; -comb.configure(config); -``` - -## Comb.detectInFile(path, options) - -Get config options that can be detected in a file. - -Note that this is a static method. - -Parameters: - -* `{String} path` — path to stylesheet -* `{Array} options` — list of options to detect. Optional. By default tries - to detect all available options. - -Example: Configure CSScomb using template file - -```js -var config = comb.detectInFile('template.css'); -comb.configure(config); -``` - -## Comb.detectInString(string, options) - -Get config options that can be detected in a string. - -Note that this is a static method. - -Parameters: - -* `{String} string` — stylesheet -* `{Array} options` — list of options to detect. Optional. By default tries - to detect all available options. - -Example: Configure CSScomb using template stylesheet - -```js -var css = 'a {top: 0; left: 0}'; -var config = comb.detectInString(css); -comb.configure(config); -``` - -## Public methods - -For the list of public methods and examples of their usage, see [CSScomb Core docs](https://github.com/csscomb/core). - diff --git a/src/cli.js b/lib/cli.js similarity index 73% rename from src/cli.js rename to lib/cli.js index 5965dd9b..90b008ac 100644 --- a/src/cli.js +++ b/lib/cli.js @@ -1,32 +1,34 @@ 'use strict'; - /** * Command line implementation for CSSComb * * Usage example: * ./node_modules/.bin/csscomb [options] [file1 [dir1 [fileN [dirN]]]] */ + var fs = require('fs'); + var parseArgs = require('minimist'); + var path = require('path'); + var os = require('os'); var Comb = require('./csscomb'); -var Errors = require('./errors'); +var Errors = require('./errors'); -var getInputData = new Promise(function(resolve) { +var getInputData = new Promise(function (resolve) { var input = ''; process.stdin.resume(); process.stdin.setEncoding('utf8'); - process.stdin.on('data', function(data) { + process.stdin.on('data', function (data) { input += data; }); - process.stdin.on('end', function() { + process.stdin.on('end', function () { resolve(input); }); }); - var comb = new Comb(); var options = getOptions(); @@ -50,7 +52,6 @@ if (options['tty-mode'] || process.stdin.isTTY) { processSTDIN(); } - function getOptions() { var parserOptions = { boolean: ['help', 'lint', 'verbose', 'tty-mode'], @@ -67,29 +68,7 @@ function getOptions() { } function displayHelp() { - var help = [ - 'NAME', - ' csscomb — Lint and fix style errors in css files', - '', - 'SYNOPSIS', - ' csscomb [options] file.css', - ' cat file.css | csscomb [options] -', - '', - 'OPTIONS', - ' -c, --config [path]', - ' Path to configuration file.', - ' -d, --detect', - ' Run the tool in detect mode, returning detected options.', - ' -l, --lint', - ' Run the tool in linter mode, without modifying files.', - ' -h, --help', - ' Display help message.', - ' -v, --verbose', - ' Whether to print logging info.', - ' -t, --tty-mode', - ' Run the tool in TTY mode using external app (e.g. IDE).', - '' - ]; + var help = ['NAME', ' csscomb — Lint and fix style errors in css files', '', 'SYNOPSIS', ' csscomb [options] file.css', ' cat file.css | csscomb [options] -', '', 'OPTIONS', ' -c, --config [path]', ' Path to configuration file.', ' -d, --detect', ' Run the tool in detect mode, returning detected options.', ' -l, --lint', ' Run the tool in linter mode, without modifying files.', ' -h, --help', ' Display help message.', ' -v, --verbose', ' Whether to print logging info.', ' -t, --tty-mode', ' Run the tool in TTY mode using external app (e.g. IDE).', '']; process.stdout.write(help.join(os.EOL)); } @@ -99,11 +78,9 @@ function detectConfig() { } function getConfig() { - var configPath = options.config && - path.resolve(process.cwd(), options.config) || - Comb.getCustomConfigPath(); - + var configPath = options.config && path.resolve(process.cwd(), options.config) || Comb.getCustomConfigPath(); var config; + if (!fs.existsSync(configPath)) { config = require('../config/csscomb.json'); } else if (configPath.match(/\.css$/)) { @@ -121,7 +98,6 @@ function getConfig() { applyTemplate(config); if (options.verbose) config.verbose = options.verbose; if (options.lint) config.lint = options.lint; - return config; } @@ -135,6 +111,7 @@ function applyTemplate(config) { } var templateConfig = Comb.detectInFile(config.template); + for (var attrname in templateConfig) { if (templateConfig.hasOwnProperty(attrname) && !config[attrname]) { config[attrname] = templateConfig[attrname]; @@ -146,7 +123,6 @@ function processFiles(files) { const promises = files.map(file => { return comb.processPath(file); }); - Promise.all(promises).catch(error => { process.stderr.write(error.stack); process.exit(1); @@ -157,15 +133,10 @@ function processFiles(files) { }).reduce((a, b) => { return a + b; }, 0); - var changed = options.lint ? 0 : tbchanged; if (options.verbose) { - let message = [ - `${c.length} file${c.length === 1 ? '' : 's'} processed`, - `${changed} file${changed === 1 ? '' : 's'} fixed`, - '' - ].join(os.EOL); + let message = [`${c.length} file${c.length === 1 ? '' : 's'} processed`, `${changed} file${changed === 1 ? '' : 's'} fixed`, ''].join(os.EOL); process.stdout.write(message); } @@ -189,4 +160,4 @@ function processInputData(input) { process.stdout.write(output); process.exit(0); }); -} +} \ No newline at end of file diff --git a/src/core.js b/lib/core.js similarity index 72% rename from src/core.js rename to lib/core.js index eea63d2f..d5160d9d 100644 --- a/src/core.js +++ b/lib/core.js @@ -1,54 +1,57 @@ 'use strict'; -if (!global._babelPolyfill) - require('@babel/polyfill'); +if (!global._babelPolyfill) require('@babel/polyfill'); let fs = require('fs'); + var os = require('os'); + let gonzales = require('gonzales-pe'); + let minimatch = require('minimatch'); + let Errors = require('./errors'); + let Plugin = require('./plugin'); let vow = require('vow'); + let vfs = require('vow-fs'); class Comb { constructor() { this.config = {}; - this.exclude = []; - // Whether lint mode is on. - this.lint = false; - // List of file paths that should be excluded from processing. - this.pathsToExclude = null; - // List of used plugins. + this.exclude = []; // Whether lint mode is on. + + this.lint = false; // List of file paths that should be excluded from processing. + + this.pathsToExclude = null; // List of used plugins. + this.plugins = []; - this.pluginsDependencies = {}; - // List of supported syntaxes. - this.supportedSyntaxes = new Set(); - // Mapping file extensions to syntax - this.syntaxMap = new Map(); - // Whether verbose mode is on. + this.pluginsDependencies = {}; // List of supported syntaxes. + + this.supportedSyntaxes = new Set(); // Mapping file extensions to syntax + + this.syntaxMap = new Map(); // Whether verbose mode is on. + this.verbose = false; } - /** * Loads configuration from JSON. * * @param {!Object} config * @return {!Comb} */ + + configure(config) { - if (typeof config !== 'object') - // TODO: throw error + if (typeof config !== 'object') // TODO: throw error throw new Error(); - this.lint = config.lint; this.verbose = config.verbose; - if (config.exclude) - this.exclude = config.exclude.map(function(pattern) { - return new minimatch.Minimatch(pattern); - }); + if (config.exclude) this.exclude = config.exclude.map(function (pattern) { + return new minimatch.Minimatch(pattern); + }); if (config.syntax) { for (let key in config.syntax) { @@ -64,52 +67,56 @@ class Comb { try { plugin.value = config[name]; this.config[name] = plugin.value; - } catch (e) { - // TODO: throw error + } catch (e) {// TODO: throw error } - } + } // Chaining. + - // Chaining. return this; } - /** * Lints all files in a directory. * * @param {String} path * @returns {Promise} */ + + lintDirectory(path) { let files = this._getAcceptableFilesFromDirectory(path); - let promises = files.map((file) => this.lintFile(file)); + + let promises = files.map(file => this.lintFile(file)); return Promise.all(promises); } - /** * Lints a single file. * * @param {String} path * @returns {Promise} */ + + lintFile(path) { let syntax = this._extractSyntax(path); - return this._readFile(path).then((string) => { - return this.lintString(string, {syntax: syntax, filename: path}); + + return this._readFile(path).then(string => { + return this.lintString(string, { + syntax: syntax, + filename: path + }); }); } - /** * Lints a file or a directory. * * @param {String} path */ + + lintPath(path) { path = path.replace(/\/$/, ''); - return fs.statSync(path).isDirectory() ? - this.lintDirectory(path) : - this.lintFile(path); + return fs.statSync(path).isDirectory() ? this.lintDirectory(path) : this.lintFile(path); } - /** * Lints a string. * @@ -117,16 +124,15 @@ class Comb { * @param {{context: String, filename: String, syntax: String}} options * @returns {Promise} Resolves with list of found errors. */ - lintString(text, options) { - return this._parseString(text, options) - .then(this._lintTree.bind(this)) - .then(errors => { - errors.forEach(error => { - error.context = this._getContext(text, error.line); - }); - return errors; + + lintString(text, options) { + return this._parseString(text, options).then(this._lintTree.bind(this)).then(errors => { + errors.forEach(error => { + error.context = this._getContext(text, error.line); }); + return errors; + }); } _getContext(text, currentLineNumber) { @@ -140,58 +146,60 @@ class Comb { var line = lines[i]; if (!line) continue; var ln = i + 1; + if (ln === currentLineNumber) { result.push(ln + '*| ' + line); } else { result.push(ln + ' | ' + line); } } + return result.join(os.EOL); } - /** * Processes directory recursively. * * @param {String} path * @returns {Promise} */ + + processDirectory(path) { let that = this; - - return vfs.listDir(path).then(function(filenames) { - return vow.all(filenames.map(function(filename) { + return vfs.listDir(path).then(function (filenames) { + return vow.all(filenames.map(function (filename) { let fullname = path + '/' + filename; - return vfs.stat(fullname).then(function(stat) { + return vfs.stat(fullname).then(function (stat) { if (stat.isDirectory() && that._shouldProcess(fullname)) { return that.processDirectory(fullname); } else { return that.processFile(fullname); } }); - })).then(function(results) { + })).then(function (results) { return [].concat.apply([], results); }); }); } - /** * Processes single file. * * @param {String} path * @returns {Promise} */ + + processFile(path) { let that = this; - if (!this._shouldProcessFile(path)) return; - return new Promise(resolve => { - vfs.read(path, 'utf8').then(function(data) { + vfs.read(path, 'utf8').then(function (data) { let syntax = that._extractSyntax(path); + that.processString(data, { syntax: syntax, filename: path - }).then(function(processedData) { + }).then(function (processedData) { if (data === processedData) { if (that.verbose) console.log(' ', path); resolve(0); @@ -199,11 +207,12 @@ class Comb { } let tick = that.lint ? '!' : '✓'; + if (that.lint) { if (that.verbose) console.log(tick, path); resolve(1); } else { - return vfs.write(path, processedData, 'utf8').then(function() { + return vfs.write(path, processedData, 'utf8').then(function () { if (that.verbose) console.log(tick, path); resolve(1); }); @@ -212,17 +221,17 @@ class Comb { }); }); } - /** * Processes directory or file. * * @returns {Promise} */ + + processPath(path) { let that = this; path = path.replace(/\/$/, ''); - - return vfs.stat(path).then(function(stat) { + return vfs.stat(path).then(function (stat) { if (stat.isDirectory()) { return that.processDirectory(path); } else { @@ -230,7 +239,6 @@ class Comb { } }); } - /** * Processes a string. * @@ -238,33 +246,32 @@ class Comb { * @param {{context: String, filename: String, syntax: String}} options * @returns {Promise} Resolves in processed string */ + + processString(text, options) { - return this._parseString(text, options) - .then(this._processTree.bind(this)) - .then((ast) => ast.toString()); + return this._parseString(text, options).then(this._processTree.bind(this)).then(ast => ast.toString()); } - /** * Add a plugin. * @param {Object} options * @return {Comb} */ + + use(options) { // Check whether plugin with the same is already used. let pluginName = options.name; + if (this._pluginAlreadyUsed(pluginName)) { - if (this.verbose) - console.warn(Errors.twoPluginsWithSameName(pluginName)); + if (this.verbose) console.warn(Errors.twoPluginsWithSameName(pluginName)); return; } let plugin = new Plugin(options); - - plugin.syntax.forEach(function(s) { + plugin.syntax.forEach(function (s) { this.supportedSyntaxes.add(s); - }, this); + }, this); // Sort plugins. - // Sort plugins. let pluginToRunBefore = plugin.runBefore; if (!pluginToRunBefore) { @@ -272,11 +279,11 @@ class Comb { } else { if (this._pluginAlreadyUsed(pluginToRunBefore)) { let i = this._pluginIndex(pluginToRunBefore); + this.plugins.splice(i, 0, plugin); } else { this.plugins.push(plugin); - if (!this.pluginsDependencies[pluginToRunBefore]) - this.pluginsDependencies[pluginToRunBefore] = []; + if (!this.pluginsDependencies[pluginToRunBefore]) this.pluginsDependencies[pluginToRunBefore] = []; this.pluginsDependencies[pluginToRunBefore].push(pluginName); } } @@ -286,54 +293,50 @@ class Comb { for (let i = 0, l = dependents.length; i < l; i++) { let name = dependents[i]; + let x = this._pluginIndex(name); + let plugin = this.plugins[x]; this.plugins.splice(x, 1); this.plugins.splice(-1, 0, plugin); - } + } // Chaining. + - // Chaining. return this; } _getAcceptableFilesFromDirectory(path) { if (!this._shouldProcess(path)) return; - let files = []; let filesInThisDir = fs.readdirSync(path); for (let i = 0, fl = filesInThisDir.length; i < fl; i++) { let fullname = path + '/' + filesInThisDir[i]; let stat = fs.statSync(fullname); - if (stat.isDirectory() && this._shouldProcess(fullname)) - files = files.concat(this._getAcceptableFilesFromDirectory(fullname)); - else if (this._shouldProcessFile(fullname)) - files.push(fullname); + if (stat.isDirectory() && this._shouldProcess(fullname)) files = files.concat(this._getAcceptableFilesFromDirectory(fullname));else if (this._shouldProcessFile(fullname)) files.push(fullname); } return files; } - /** * @param {Node} ast * @param {String=} filename * @return {Array} List of errors. */ + + _lintTree(ast, filename) { let errors = []; let config = this.config; - - this.plugins.filter(function(plugin) { - return typeof plugin.value !== null && - typeof plugin.lint === 'function' && - plugin.syntax.indexOf(ast.syntax) !== -1; - }).forEach(function(plugin) { + this.plugins.filter(function (plugin) { + return typeof plugin.value !== null && typeof plugin.lint === 'function' && plugin.syntax.indexOf(ast.syntax) !== -1; + }).forEach(function (plugin) { let e = plugin.lint(ast, config); errors = errors.concat(e); }); if (filename) { - errors.map(function(error) { + errors.map(function (error) { error.filename = filename; return error; }); @@ -348,20 +351,21 @@ class Comb { let context = options && options.context; let tree; const lint = this.lint; - - if (!text) return new Promise(function(resolve) { + if (!text) return new Promise(function (resolve) { resolve(lint ? [] : text); }); - if (!syntax) syntax = 'css'; this.syntax = syntax; - - return new Promise(function(resolve) { + return new Promise(function (resolve) { try { - tree = gonzales.parse(text, {syntax: syntax, rule: context}); + tree = gonzales.parse(text, { + syntax: syntax, + rule: context + }); resolve(tree, filename); } catch (e) { let version = require('../package.json').version; + let message = filename ? [filename] : []; message.push(e.message); message.push('CSScomb Core version: ' + version); @@ -377,7 +381,7 @@ class Comb { _pluginIndex(name) { let index = -1; - this.plugins.some(function(plugin, i) { + this.plugins.some(function (plugin, i) { if (plugin.name === name) { index = i; return true; @@ -385,36 +389,31 @@ class Comb { }); return index; } - /** * @param {Node} ast * @return {Node} Transformed AST */ + + _processTree(ast) { let config = this.config; - - this.plugins.filter(function(plugin) { - return plugin.value !== null && - typeof plugin.process === 'function' && - plugin.syntax.indexOf(ast.syntax) !== -1; - }).forEach(function(plugin) { + this.plugins.filter(function (plugin) { + return plugin.value !== null && typeof plugin.process === 'function' && plugin.syntax.indexOf(ast.syntax) !== -1; + }).forEach(function (plugin) { plugin.process(ast, config); }); - return ast; } _readFile(path) { return new Promise((resolve, reject) => { if (!this._shouldProcessFile(path)) reject(); - - fs.readFile(path, 'utf8', function(e, string) { + fs.readFile(path, 'utf8', function (e, string) { if (e) reject(); resolve(string); }); }); } - /** * Checks if path is not present in `exclude` list. * @@ -422,19 +421,21 @@ class Comb { * @returns {Boolean} False if specified path is present in `exclude` list. * Otherwise returns true. */ + + _shouldProcess(path) { path = path.replace(/\/$/, ''); + if (!fs.existsSync(path)) { console.warn('Path ' + path + ' was not found.'); return false; } path = path.replace(/^\.\//, ''); - return this.exclude.every(function(e) { + return this.exclude.every(function (e) { return !e.match(path); }); } - /** * Checks if specified path is not present in `exclude` list and it has one of * acceptable syntaxes. @@ -443,28 +444,29 @@ class Comb { * @returns {Boolean} False if the path either has unacceptable extension or * is present in `exclude` list. True if everything is ok. */ + + _shouldProcessFile(path) { // Get file's extension: - var syntax = this._extractSyntax(path); + var syntax = this._extractSyntax(path); // Check if syntax is supported. If not, ignore the file: - // Check if syntax is supported. If not, ignore the file: - if (!this.supportedSyntaxes.has(syntax)) - return false; + if (!this.supportedSyntaxes.has(syntax)) return false; return this._shouldProcess(path); } - /** * Extract syntax by file path * * @param {String} path * @returns {String} syntax */ + + _extractSyntax(path) { var extension = path.split('.').pop(); - return this.syntaxMap.get('.' + extension) || extension; } + } -module.exports = Comb; +module.exports = Comb; \ No newline at end of file diff --git a/src/csscomb.js b/lib/csscomb.js similarity index 79% rename from src/csscomb.js rename to lib/csscomb.js index a698767a..e2d15e31 100644 --- a/src/csscomb.js +++ b/lib/csscomb.js @@ -1,38 +1,41 @@ 'use strict'; let gonzales = require('gonzales-pe'); + let fs = require('fs'); + let Comb = require('./core'); + let format = require('./format'); -let path = require('path'); +let path = require('path'); /** * @param {String|Object} config * @constructor * @name CSScomb */ -let CSScomb = function(config) { - let comb = new Comb(); - // Add plugins. - fs.readdirSync(__dirname + '/options').map(function(option) { + +let CSScomb = function (config) { + let comb = new Comb(); // Add plugins. + + fs.readdirSync(__dirname + '/options').map(function (option) { return require('./options/' + option); - }).forEach(function(option) { + }).forEach(function (option) { comb.use(option); - }); + }); // If config was passed, configure: - // If config was passed, configure: if (typeof config === 'string') { config = CSScomb.getConfig(config); } + if (typeof config === 'object') { comb.configure(config); - } + } // Chaining. + - // Chaining. return comb; }; - /** * STATIC METHODS * Methods that can be called without creating an instance: @@ -51,11 +54,12 @@ let CSScomb = function(config) { * @param {Array} options List of options to detect * @returns {Object} Detected options */ + + CSScomb.detectInFile = function detectInFile(file, options) { var stylesheet = fs.readFileSync(file, 'utf8'); return CSScomb.detectInString(stylesheet, options); }; - /** * Detects the options in the given string * @@ -63,16 +67,17 @@ CSScomb.detectInFile = function detectInFile(file, options) { * @param {Array} options List of options to detect * @returns {Object} Detected options */ + + CSScomb.detectInString = function detectInString(text, options) { var result; var handlers = []; - if (!text) return text; - var optionNames = fs.readdirSync(__dirname + '/options'); - optionNames.forEach(function(option) { + optionNames.forEach(function (option) { option = option.slice(0, -3); if (options && options.indexOf(option) < 0) return; + try { handlers.push(getHandler(option)); } catch (e) { @@ -80,30 +85,27 @@ CSScomb.detectInString = function detectInString(text, options) { console.warn(message); } }); - var tree = cssToAST(text); var detectedOptions = detectInTree(tree, handlers); - result = getDetectedOptions(detectedOptions, handlers); + result = getDetectedOptions(detectedOptions, handlers); // Handle conflicting options with spaces around braces: - // Handle conflicting options with spaces around braces: var blockIndent = result['block-indent']; var spaceAfterOpeningBrace = result['space-after-opening-brace']; - if (typeof blockIndent === 'string' && - spaceAfterOpeningBrace && - spaceAfterOpeningBrace.indexOf('\n') > -1) { + if (typeof blockIndent === 'string' && spaceAfterOpeningBrace && spaceAfterOpeningBrace.indexOf('\n') > -1) { result['space-after-opening-brace'] = '\n'; } return result; }; - /** * Gets one of configuration files from configs' directory. * * @param {String} name Config's name, e.g. 'yandex' * @returns {Object} Configuration object */ + + CSScomb.getConfig = function getConfig(name) { const DEFAULT_CONFIG_NAME = 'csscomb'; name = name || DEFAULT_CONFIG_NAME; @@ -114,17 +116,14 @@ CSScomb.getConfig = function getConfig(name) { let CONFIG_DIR_PATH = '../config'; let dir = `${__dirname}/${CONFIG_DIR_PATH}`; - let availableConfigsNames = fs.readdirSync(dir) - .map(function(configFileName) { - return configFileName.split('.')[0]; // Strip file extension(s) - }); + let availableConfigsNames = fs.readdirSync(dir).map(function (configFileName) { + return configFileName.split('.')[0]; // Strip file extension(s) + }); if (availableConfigsNames.indexOf(name) < 0) { - let configsNamesAsString = availableConfigsNames - .map(function(configName) { - return '\'' + configName + '\''; - }) - .join(', '); + let configsNamesAsString = availableConfigsNames.map(function (configName) { + return '\'' + configName + '\''; + }).join(', '); let message = `"${name}" is not a valid config name. Try one of the following: ${configsNamesAsString}.`; throw new Error(format(message)); @@ -132,7 +131,6 @@ CSScomb.getConfig = function getConfig(name) { return require(CONFIG_DIR_PATH + '/' + name + '.json'); }; - /** * Gets configuration from provided config path or looks for it in common * places. @@ -140,6 +138,8 @@ CSScomb.getConfig = function getConfig(name) { * @param {String} [configPath] * @returns {Object|null} */ + + CSScomb.getCustomConfig = function getCustomConfig(configPath) { var config; configPath = configPath || CSScomb.getCustomConfigPath(); @@ -152,7 +152,6 @@ CSScomb.getCustomConfig = function getCustomConfig(configPath) { return config; }; - /** * Looks for a config file: recursively from current (process) directory * up to $HOME dir @@ -161,32 +160,27 @@ CSScomb.getCustomConfig = function getCustomConfig(configPath) { * @param {String} [configPath] * @returns {String | null} */ -CSScomb.getCustomConfigPath = function getCustomConfigPath(configPath) { - var HOME = process.env.HOME || - process.env.HOMEPATH || - process.env.USERPROFILE; - configPath = configPath || path.join(process.cwd(), '.csscomb.json'); - // If we've finally found a config, return its path: - if (fs.existsSync(configPath)) return fs.realpathSync(configPath); +CSScomb.getCustomConfigPath = function getCustomConfigPath(configPath) { + var HOME = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE; + configPath = configPath || path.join(process.cwd(), '.csscomb.json'); // If we've finally found a config, return its path: - // If we are in HOME dir already and yet no config file, return a default + if (fs.existsSync(configPath)) return fs.realpathSync(configPath); // If we are in HOME dir already and yet no config file, return a default // one from our package. // If project is located not under HOME, compare to root instead. // Since there appears to be no good way to get root path in // Windows, assume that if current dir has no parent dir, we're in // root. + var dirname = path.dirname(configPath); var parentDirname = path.dirname(dirname); - if (dirname === HOME || dirname === parentDirname) return null; - - // If there is no config in this directory, go one level up and look for + if (dirname === HOME || dirname === parentDirname) return null; // If there is no config in this directory, go one level up and look for // a config there: + configPath = path.join(parentDirname, '.csscomb.json'); return CSScomb.getCustomConfigPath(configPath); }; - /** * Converts CSS string to AST. * @@ -195,18 +189,22 @@ CSScomb.getCustomConfigPath = function getCustomConfigPath(configPath) { * @param {String} [filename] * @returns {Array} AST */ + + function cssToAST(text, syntax, filename) { var string = JSON.stringify; var fileInfo = filename ? ' at ' + filename : ''; var tree; try { - tree = gonzales.parse(text, {syntax: syntax}); + tree = gonzales.parse(text, { + syntax: syntax + }); } catch (e) { throw new Error('Parsing error' + fileInfo + ': ' + e.message); - } + } // TODO: When can tree be undefined? + - // TODO: When can tree be undefined? if (typeof tree === 'undefined') { let message = `Undefined tree ${fileInfo}: ${string(text)} => ${string(tree)}`; @@ -215,7 +213,6 @@ function cssToAST(text, syntax, filename) { return tree; } - /** * Processes tree and detects options. * @@ -224,17 +221,18 @@ function cssToAST(text, syntax, filename) { * @returns {Object} Map with detected options and all variants of possible * values */ + + function detectInTree(tree, handlers) { - var detectedOptions = {}; - // We walk across complete tree for each handler, + var detectedOptions = {}; // We walk across complete tree for each handler, // because we need strictly maintain order in which handlers work, // despite fact that handlers work on different level of the tree. - handlers.forEach(function(handler) { + + handlers.forEach(function (handler) { detectedOptions[handler.name] = handler.detect(tree); }); return detectedOptions; } - /** * Gets the detected options. * @@ -242,19 +240,21 @@ function detectInTree(tree, handlers) { * @param {Array} handlers * @returns {Object} */ + + function getDetectedOptions(detected, handlers) { var options = {}; - Object.keys(detected).forEach(function(option) { + Object.keys(detected).forEach(function (option) { // List of all the detected variants from the stylesheet // for the given option: var values = detected[option]; var i; + if (!values.length) { // If there are no values for the option, check if there is // a default one: for (i = handlers.length; i--;) { - if (handlers[i].name === option && - handlers[i].detectDefault !== undefined) { + if (handlers[i].name === option && handlers[i].detectDefault !== undefined) { options[option] = handlers[i].detectDefault; break; } @@ -268,30 +268,31 @@ function getDetectedOptions(detected, handlers) { var variants = {}; var bestGuess = null; var maximum = 0; + for (i = values.length; i--;) { - var currentValue = values[i]; - // Count the current value: + var currentValue = values[i]; // Count the current value: + if (variants[currentValue]) { variants[currentValue]++; } else { variants[currentValue] = 1; - } - // If the current variant is the most popular one, treat + } // If the current variant is the most popular one, treat // it as the best guess: + + if (variants[currentValue] >= maximum) { maximum = variants[currentValue]; bestGuess = currentValue; } } + if (bestGuess !== null) { options[option] = bestGuess; } } }); - return options; } - /** * Gets option's data needed for detection * @@ -299,11 +300,12 @@ function getDetectedOptions(detected, handlers) { * @returns {Object} Object with option's name, link to `detect()` method * and default value for the case when nothing can be detected */ + + function getHandler(optionName) { var option = require('./options/' + optionName); - if (!option.detect) - throw new Error('Option does not have `detect()` method.'); + if (!option.detect) throw new Error('Option does not have `detect()` method.'); return { name: option.name, detect: option.detect, @@ -311,4 +313,4 @@ function getHandler(optionName) { }; } -module.exports = CSScomb; +module.exports = CSScomb; \ No newline at end of file diff --git a/src/errors.js b/lib/errors.js similarity index 94% rename from src/errors.js rename to lib/errors.js index 5dc2e4e5..4aee9847 100644 --- a/src/errors.js +++ b/lib/errors.js @@ -1,6 +1,5 @@ 'use strict'; - let format = require('./format'); module.exports = { @@ -10,7 +9,6 @@ module.exports = { implementSetValue(valueType) { if (typeof valueType === 'undefined') throw new Error(); - return format(`If you see this message and you are not a developer adding a new option, please open an issue here: https://github.com/csscomb/core/issues/new\n @@ -38,7 +36,6 @@ module.exports = { twoPluginsWithSameName(pluginName) { if (typeof pluginName === 'undefined') throw new Error(); - return format(`You're trying to use one plugin twice: ${pluginName}. Please make sure there are not two different plugins with the same name.`); @@ -46,7 +43,6 @@ module.exports = { unacceptableBoolean(pattern) { if (typeof pattern === 'undefined') throw new Error(); - return `Value must be one of the following: ${pattern.join(', ')}.`; }, @@ -56,16 +52,14 @@ module.exports = { unacceptableString(pattern) { if (typeof pattern === 'undefined') throw new Error(); - return `Value must match pattern ${pattern}.`; }, unacceptableValueType(valueType, accepts) { - if (typeof valueType === 'undefined' || - typeof accepts === 'undefined') throw new Error(); - + if (typeof valueType === 'undefined' || typeof accepts === 'undefined') throw new Error(); return format(`The option does not accept values of type ${valueType}.\nValue\'s type must be one the following: ${Object.keys(accepts).join(', ')}.`); } -}; + +}; \ No newline at end of file diff --git a/src/format.js b/lib/format.js similarity index 58% rename from src/format.js rename to lib/format.js index 261df4c4..37998dc1 100644 --- a/src/format.js +++ b/lib/format.js @@ -1,5 +1,5 @@ 'use strict'; -module.exports = function(string) { +module.exports = function (string) { return string.replace(/\n\s+/gm, ' '); -}; +}; \ No newline at end of file diff --git a/src/options/always-semicolon.js b/lib/options/always-semicolon.js similarity index 71% rename from src/options/always-semicolon.js rename to lib/options/always-semicolon.js index 32628216..c7331c13 100644 --- a/src/options/always-semicolon.js +++ b/lib/options/always-semicolon.js @@ -37,18 +37,15 @@ let option = { */ lint(ast) { var errors = []; + ast.traverseByType('block', block => { + block.eachFor(currentNode => { + var nodeWithoutSemicolon; // Skip nodes that already have `;` at the end: - ast.traverseByType('block', (block) => { - block.eachFor((currentNode) => { - var nodeWithoutSemicolon; - // Skip nodes that already have `;` at the end: - if (currentNode.is('declarationDelimiter')) return null; - - // Add semicolon only after declarations and includes. + if (currentNode.is('declarationDelimiter')) return null; // Add semicolon only after declarations and includes. // If current node is include, insert semicolon right into it. // If it's declaration, look for value node: - if (currentNode.is('include') || - currentNode.is('extend')) { + + if (currentNode.is('include') || currentNode.is('extend')) { nodeWithoutSemicolon = currentNode; } else if (currentNode.is('declaration')) { nodeWithoutSemicolon = currentNode.last('value'); @@ -60,13 +57,11 @@ let option = { message: 'Missing semicolon', line: nodeWithoutSemicolon.end.line, column: nodeWithoutSemicolon.end.column + 1 - }); + }); // Stop looping through block's children: - // Stop looping through block's children: return null; }); }); - return errors; }, @@ -76,35 +71,29 @@ let option = { */ process(ast) { var nodeWithoutSemicolon; - - ast.traverseByType('block', (block) => { - block.eachFor((currentNode) => { + ast.traverseByType('block', block => { + block.eachFor(currentNode => { // Skip nodes that already have `;` at the end: - if (currentNode.is('declarationDelimiter')) return null; - - // Add semicolon only after declarations and includes. + if (currentNode.is('declarationDelimiter')) return null; // Add semicolon only after declarations and includes. // If current node is include, insert semicolon right into it. // If it's declaration, look for value node: - if (currentNode.is('include') || - currentNode.is('extend')) { + + if (currentNode.is('include') || currentNode.is('extend')) { nodeWithoutSemicolon = currentNode; } else if (currentNode.is('declaration')) { nodeWithoutSemicolon = currentNode.last('value'); } else { return; - } + } // Check if there are spaces and comments at the end of the node - // Check if there are spaces and comments at the end of the node - for (var j = nodeWithoutSemicolon.length; j--;) { - var lastNode = nodeWithoutSemicolon.get(j); - // If the node's last child is block, do not add semicolon: + for (var j = nodeWithoutSemicolon.length; j--;) { + var lastNode = nodeWithoutSemicolon.get(j); // If the node's last child is block, do not add semicolon: // TODO: Add syntax check and run the code only for scss + if (lastNode.is('block')) { return null; - } else if (!lastNode.is('space') && - !lastNode.is('multilineComment') && - !lastNode.is('singlelineComment')) { + } else if (!lastNode.is('space') && !lastNode.is('multilineComment') && !lastNode.is('singlelineComment')) { j++; break; } @@ -127,9 +116,8 @@ let option = { */ detect(ast) { var detected = []; - - ast.traverseByType('block', (block) => { - block.eachFor((node) => { + ast.traverseByType('block', block => { + block.eachFor(node => { if (node.is('declarationDelimiter')) { detected.push(true); return null; @@ -139,9 +127,8 @@ let option = { } }); }); - return detected; } -}; -module.exports = option; +}; +module.exports = option; \ No newline at end of file diff --git a/src/options/block-indent.js b/lib/options/block-indent.js similarity index 80% rename from src/options/block-indent.js rename to lib/options/block-indent.js index 245211e5..2c7b81a5 100644 --- a/src/options/block-indent.js +++ b/lib/options/block-indent.js @@ -41,7 +41,7 @@ let option = { * @param {Node} ast */ process(ast) { - ast.eachFor('space', function(whitespaceNode, i) { + ast.eachFor('space', function (whitespaceNode, i) { var spaces = whitespaceNode.content.replace(/\n[ \t]+/gm, '\n'); if (spaces === '') { @@ -61,25 +61,19 @@ let option = { */ detect(ast) { var detected = []; - - ast.traverse(function(node) { + ast.traverse(function (node) { // Continue only with non-empty {...} blocks: - if (!node.is('atrulers') && !node.is('block') || !node.length) - return; - - node.eachFor('space', function(whitespaceNode) { + if (!node.is('atrulers') && !node.is('block') || !node.length) return; + node.eachFor('space', function (whitespaceNode) { var spaces = whitespaceNode.content; - var lastIndex = spaces.lastIndexOf('\n'); + var lastIndex = spaces.lastIndexOf('\n'); // Do not continue if there is no line break: - // Do not continue if there is no line break: - if (lastIndex < 0) return; + if (lastIndex < 0) return; // Number of spaces from beginning of line: - // Number of spaces from beginning of line: var spacesLength = spaces.slice(lastIndex + 1).length + 1; detected.push(new Array(spacesLength).join(' ')); }); }); - return detected; }, @@ -89,13 +83,12 @@ let option = { */ _processNode(node, level) { var that = this; - - node.forEach(function(n) { + node.forEach(function (n) { if (node.syntax === 'sass' && n.is('block')) { that._processSassBlock(n, level); - } + } // Continue only with space nodes inside {...}: + - // Continue only with space nodes inside {...}: if (node.syntax !== 'sass' && level !== 0 && n.is('space')) { that._processSpaceNode(n, level); } @@ -112,10 +105,8 @@ let option = { */ _processSassBlock(node, level) { var value = this.value; - - node.eachFor('space', function(whitespaceNode) { + node.eachFor('space', function (whitespaceNode) { if (whitespaceNode.content === '\n') return; - var spaces = whitespaceNode.content.replace(/[ \t]/gm, ''); spaces += new Array(level + 2).join(value); whitespaceNode.content = spaces; @@ -127,16 +118,13 @@ let option = { * @param {Number} level */ _processSpaceNode(node, level) { - var value = this.value; + var value = this.value; // Remove all whitespaces and tabs, leave only new lines: - // Remove all whitespaces and tabs, leave only new lines: var spaces = node.content.replace(/[ \t]/gm, ''); - if (!spaces) return; - spaces += new Array(level + 1).join(value); node.content = spaces; } -}; -module.exports = option; +}; +module.exports = option; \ No newline at end of file diff --git a/src/options/color-case.js b/lib/options/color-case.js similarity index 80% rename from src/options/color-case.js rename to lib/options/color-case.js index b29ca12b..75f520c1 100644 --- a/src/options/color-case.js +++ b/lib/options/color-case.js @@ -33,11 +33,8 @@ let option = { */ process(ast) { var value = this.value; - - ast.traverseByType('color', function(color) { - color.content = value === 'lower' ? - color.content.toLowerCase() : - color.content.toUpperCase(); + ast.traverseByType('color', function (color) { + color.content = value === 'lower' ? color.content.toLowerCase() : color.content.toUpperCase(); }); }, @@ -48,17 +45,15 @@ let option = { */ detect(ast) { var detected = []; - - ast.traverseByType('color', function(color) { + ast.traverseByType('color', function (color) { if (color.content.match(/^[^A-F]*[a-f][^A-F]*$/)) { detected.push('lower'); } else if (color.content.match(/^[^a-f]*[A-F][^a-f]*$/)) { detected.push('upper'); } }); - return detected; } -}; -module.exports = option; +}; +module.exports = option; \ No newline at end of file diff --git a/src/options/color-shorthand.js b/lib/options/color-shorthand.js similarity index 77% rename from src/options/color-shorthand.js rename to lib/options/color-shorthand.js index 5abbfdca..91267189 100644 --- a/src/options/color-shorthand.js +++ b/lib/options/color-shorthand.js @@ -33,11 +33,8 @@ let option = { */ process(ast) { var value = this.value; - - ast.traverseByType('color', function(color) { - color.content = value ? - color.content.replace(/(\w)\1(\w)\2(\w)\3/i, '$1$2$3') : - color.content.replace(/^(\w)(\w)(\w)$/, '$1$1$2$2$3$3'); + ast.traverseByType('color', function (color) { + color.content = value ? color.content.replace(/(\w)\1(\w)\2(\w)\3/i, '$1$2$3') : color.content.replace(/^(\w)(\w)(\w)$/, '$1$1$2$2$3$3'); }); }, @@ -48,17 +45,15 @@ let option = { */ detect(ast) { var detected = []; - - ast.traverseByType('color', function(color) { + ast.traverseByType('color', function (color) { if (color.content.match(/^\w{3}$/)) { detected.push(true); } else if (color.content.match(/^(\w)\1(\w)\2(\w)\3$/)) { detected.push(false); } }); - return detected; } -}; -module.exports = option; +}; +module.exports = option; \ No newline at end of file diff --git a/src/options/element-case.js b/lib/options/element-case.js similarity index 73% rename from src/options/element-case.js rename to lib/options/element-case.js index 3bd7a50c..f95c3fe0 100644 --- a/src/options/element-case.js +++ b/lib/options/element-case.js @@ -33,15 +33,11 @@ let option = { */ process(ast) { let value = this.value; - - ast.traverse((node) => { + ast.traverse(node => { if (!node.is('selector') && !node.is('arguments')) return; - - node.forEach('typeSelector', (selector) => { - selector.forEach('ident', (ident) => { - ident.content = value === 'lower' ? - ident.content.toLowerCase() : - ident.content.toUpperCase(); + node.forEach('typeSelector', selector => { + selector.forEach('ident', ident => { + ident.content = value === 'lower' ? ident.content.toLowerCase() : ident.content.toUpperCase(); }); }); }); @@ -54,12 +50,10 @@ let option = { */ detect(ast) { let detected = []; - - ast.traverse((node) => { + ast.traverse(node => { if (!node.is('selector') && !node.is('arguments')) return; - - node.forEach('typeSelector', (selector) => { - selector.forEach('ident', (ident) => { + node.forEach('typeSelector', selector => { + selector.forEach('ident', ident => { if (ident.content.match(/^[a-z]+$/)) { detected.push('lower'); } else if (ident.content.match(/^[A-Z]+$/)) { @@ -68,9 +62,8 @@ let option = { }); }); }); - return detected; } -}; -module.exports = option; +}; +module.exports = option; \ No newline at end of file diff --git a/src/options/eof-newline.js b/lib/options/eof-newline.js similarity index 90% rename from src/options/eof-newline.js rename to lib/options/eof-newline.js index 29196cd4..027ad0af 100644 --- a/src/options/eof-newline.js +++ b/lib/options/eof-newline.js @@ -37,7 +37,10 @@ let option = { var lastChild = ast.last(); if (!lastChild.is('space')) { - lastChild = gonzales.createNode({type: 'space', content: ''}); + lastChild = gonzales.createNode({ + type: 'space', + content: '' + }); ast.content.push(lastChild); } @@ -59,6 +62,6 @@ let option = { return [false]; } } -}; -module.exports = option; +}; +module.exports = option; \ No newline at end of file diff --git a/src/options/leading-zero.js b/lib/options/leading-zero.js similarity index 82% rename from src/options/leading-zero.js rename to lib/options/leading-zero.js index 77381c39..83ca3ee3 100644 --- a/src/options/leading-zero.js +++ b/lib/options/leading-zero.js @@ -2,9 +2,7 @@ module.exports = { name: 'leading-zero', - syntax: ['css', 'less', 'sass', 'scss'], - accepts: { boolean: [true, false] }, @@ -13,10 +11,9 @@ module.exports = { * Processes tree node. * @param {node} ast */ - process: function(ast) { + process: function (ast) { let value = this.value; - - ast.traverseByType('number', function(number) { + ast.traverseByType('number', function (number) { if (!value) { number.content = number.content.replace(/^0+(?=\.)/, ''); } else if (number.content[0] === '.') { @@ -30,17 +27,15 @@ module.exports = { * * @param {node} ast */ - detect: function(ast) { + detect: function (ast) { let detected = []; - - ast.traverseByType('number', function(number) { + ast.traverseByType('number', function (number) { if (number.content.match(/^\.[0-9]+/)) { detected.push(false); } else if (number.content.match(/^0\.[0-9]+/)) { detected.push(true); } }); - return detected; } -}; +}; \ No newline at end of file diff --git a/src/options/lines-between-rulesets.js b/lib/options/lines-between-rulesets.js similarity index 86% rename from src/options/lines-between-rulesets.js rename to lib/options/lines-between-rulesets.js index ad2e15dd..3cd3da49 100644 --- a/src/options/lines-between-rulesets.js +++ b/lib/options/lines-between-rulesets.js @@ -44,6 +44,7 @@ let option = { * @param {number} value * @returns {number} */ + /* ** Still need to override, as the core implementation of setValue doesn't ** pass numbers through, but creates a string of spaces of the same length. @@ -92,23 +93,20 @@ let option = { processBlock(x) { if (x.is('stylesheet')) { // Check all @rules - this.processAtRules(x); + this.processAtRules(x); // Check all rulesets - // Check all rulesets this.processRuleSets(x); } - x.forEach((node) => { + x.forEach(node => { if (!node.is('block')) { return this.processBlock(node); - } + } // Check all @rules - // Check all @rules - this.processAtRules(node); - // Check all rulesets - this.processRuleSets(node); + this.processAtRules(node); // Check all rulesets + this.processRuleSets(node); this.processBlock(node); }); }, @@ -129,14 +127,16 @@ let option = { if (!node) { return false; } - return (node.is('singlelineComment') || node.is('multilineComment')); + + return node.is('singlelineComment') || node.is('multilineComment'); }, isNewline(node) { if (!node) { return false; } - return (node.content === '\n'); + + return node.content === '\n'; }, prevLineIsComment(parent, index) { @@ -144,9 +144,8 @@ let option = { let prevChild; let prevMinusOneChild; let prevMinusTwoChild; - let parentSyntax = parent ? parent.syntax : null; + let parentSyntax = parent ? parent.syntax : null; // Sass is troublesome because newlines are counted as separate nodes - // Sass is troublesome because newlines are counted as separate nodes if (parentSyntax === 'sass') { indexThreshold = 3; } @@ -160,14 +159,10 @@ let option = { if (parentSyntax === 'sass') { prevMinusTwoChild = parent.get(index - 3); - return ( - this.isComment(prevMinusTwoChild) && - this.isNewline(prevMinusOneChild) && - prevChild.is('space') - ); + return this.isComment(prevMinusTwoChild) && this.isNewline(prevMinusOneChild) && prevChild.is('space'); } - return (this.isComment(prevMinusOneChild) && prevChild.is('space')); + return this.isComment(prevMinusOneChild) && prevChild.is('space'); }, /* @@ -221,10 +216,9 @@ let option = { insertNewlines(node, index) { let prevChild = node.get(index - 1); - let shouldInsert = false; - - // Check for previous nodes that are not a space + let shouldInsert = false; // Check for previous nodes that are not a space // Do not insert if the ruleset is the first item + for (var i = 0; i < index; i++) { if (!node.get(i).is('space')) { shouldInsert = true; @@ -249,6 +243,6 @@ let option = { } } } -}; -module.exports = option; +}; +module.exports = option; \ No newline at end of file diff --git a/lib/options/quotes.js b/lib/options/quotes.js new file mode 100644 index 00000000..67be0099 --- /dev/null +++ b/lib/options/quotes.js @@ -0,0 +1,47 @@ +'use strict'; + +module.exports = { + name: 'quotes', + syntax: ['css', 'less', 'sass', 'scss'], + accepts: { + string: /^single|double$/ + }, + + /** + * Processes tree node. + * @param {node} ast + */ + process: function (ast) { + let value = this.value; + ast.traverseByType('string', function (string) { + if (string.content[0] === '"' && value === 'single') { + string.content = string.content // Unescape all escaped double quotes + .replace(/\\"/g, '"') // Escape all the single quotes + .replace(/([^\\])'/g, '$1\\\'') // Replace the first and the last quote + .replace(/^"|"$/g, '\''); + } else if (string.content[0] === '\'' && value === 'double') { + string.content = string.content // Unescape all escaped single quotes + .replace(/\\'/g, '\'') // Escape all the double quotes + .replace(/([^\\])"/g, '$1\\\"') // Replace the first and the last quote + .replace(/^'|'$/g, '"'); + } + }); + }, + + /** + * Detects the value of an option at the tree node. + * + * @param {node} ast + */ + detect: function (ast) { + let detected = []; + ast.traverseByType('string', function (string) { + if (string.content[0] === '"') { + detected.push('double'); + } else if (string.content[0] === '\'') { + detected.push('single'); + } + }); + return detected; + } +}; \ No newline at end of file diff --git a/src/options/remove-empty-rulesets.js b/lib/options/remove-empty-rulesets.js similarity index 79% rename from src/options/remove-empty-rulesets.js rename to lib/options/remove-empty-rulesets.js index faafd51f..fc893dc5 100644 --- a/src/options/remove-empty-rulesets.js +++ b/lib/options/remove-empty-rulesets.js @@ -1,19 +1,18 @@ 'use strict'; -module.exports = (function() { +module.exports = function () { function processNode(node) { removeEmptyRulesets(node); mergeAdjacentWhitespace(node); } function removeEmptyRulesets(stylesheet) { - stylesheet.forEach('ruleset', function(ruleset, i) { + stylesheet.forEach('ruleset', function (ruleset, i) { var block = ruleset.first('block'); processNode(block); if (isEmptyBlock(block)) stylesheet.removeChild(i); }); } - /** * Removing ruleset nodes from tree may result in two adjacent whitespace * nodes which is not correct AST: @@ -22,35 +21,34 @@ module.exports = (function() { * into one: * [space, space] => [space] */ + + function mergeAdjacentWhitespace(node) { var i = node.content.length - 1; + while (i-- > 0) { - if (node.get(i).is('space') && - node.get(i + 1) && node.get(i + 1).is('space')) { + if (node.get(i).is('space') && node.get(i + 1) && node.get(i + 1).is('space')) { node.get(i).content += node.get(i + 1).content; node.removeChild(i + 1); } } } - /** * Block is considered empty when it has nothing but spaces. */ + + function isEmptyBlock(node) { if (!node.length) return true; - - return !node.content.some(function(node) { + return !node.content.some(function (node) { return !node.is('space'); }); } return { name: 'remove-empty-rulesets', - runBefore: 'block-indent', - syntax: ['css', 'less', 'sass', 'scss'], - accepts: { boolean: [true] }, @@ -60,10 +58,9 @@ module.exports = (function() { * * @param {String} ast */ - process: function(ast) { + process: function (ast) { processNode(ast); }, - detectDefault: true, /** @@ -73,19 +70,16 @@ module.exports = (function() { * * @param {node} ast */ - detect: function(ast) { + detect: function (ast) { let detected = []; - - ast.traverse(function(node) { + ast.traverse(function (node) { if (!node.is('atrulers') && !node.is('block')) return; - if (node.length === 0 || - (node.length === 1 && node.first().is('space'))) { + if (node.length === 0 || node.length === 1 && node.first().is('space')) { detected.push(false); } }); - return detected; } }; -})(); +}(); \ No newline at end of file diff --git a/src/options/sort-order-fallback.js b/lib/options/sort-order-fallback.js similarity index 65% rename from src/options/sort-order-fallback.js rename to lib/options/sort-order-fallback.js index 318094db..e4901cf6 100644 --- a/src/options/sort-order-fallback.js +++ b/lib/options/sort-order-fallback.js @@ -2,12 +2,10 @@ module.exports = { name: 'sort-order-fallback', - syntax: ['css', 'less', 'sass', 'scss'], - - accepts: {string: /^abc$/}, - - process: function() {}, - + accepts: { + string: /^abc$/ + }, + process: function () {}, detect: () => [] -}; +}; \ No newline at end of file diff --git a/src/options/sort-order.js b/lib/options/sort-order.js similarity index 68% rename from src/options/sort-order.js rename to lib/options/sort-order.js index 141734b6..ddf8e4bc 100644 --- a/src/options/sort-order.js +++ b/lib/options/sort-order.js @@ -20,20 +20,24 @@ module.exports = { * @returns {Array} */ setValue(value) { - if (!Array.isArray(value)) - throw new Error('The option accepts only array of properties.'); - + if (!Array.isArray(value)) throw new Error('The option accepts only array of properties.'); var order = {}; if (typeof value[0] === 'string') { // If there is only one group of properties. - value.forEach(function(prop, propIndex) { - order[prop] = {group: 0, prop: propIndex}; + value.forEach(function (prop, propIndex) { + order[prop] = { + group: 0, + prop: propIndex + }; }); } else { - value.forEach(function(group, groupIndex) { - group.forEach(function(prop, propIndex) { - order[prop] = {group: groupIndex, prop: propIndex}; + value.forEach(function (group, groupIndex) { + group.forEach(function (prop, propIndex) { + order[prop] = { + group: groupIndex, + prop: propIndex + }; }); }); } @@ -46,60 +50,52 @@ module.exports = { * @param {object} config */ process(ast, config) { - this._config = config; - // Sort properties only inside blocks. + this._config = config; // Sort properties only inside blocks. + ast.traverseByType('block', this._processBlock.bind(this)); }, _cleanSassLinebreaks(node) { let containsOnlyLinebreaks = true; - - node.forEach((space) => { + node.forEach(space => { if (!space.is('space') || space.content !== '\n') { containsOnlyLinebreaks = false; return null; } }); - - if (containsOnlyLinebreaks) - node.content = []; + if (containsOnlyLinebreaks) node.content = []; }, _extendNode(block, i, spacesBefore) { let nodesToDelete = [i]; let node = block.get(i); - let extendedNode = {i: i, node: node}; + let extendedNode = { + i: i, + node: node + }; let propertyName = this._getSortableName(node); - if (!propertyName) return null; - // Check if current node's property name is in sort order. - let propertyIndex = this.value[propertyName]; - // If the declaration's property is in order's list, save its + if (!propertyName) return null; // Check if current node's property name is in sort order. + + let propertyIndex = this.value[propertyName]; // If the declaration's property is in order's list, save its // group and property indices. Otherwise set them to 10000, so // declaration appears at the bottom of a sorted list: - extendedNode.groupIndex = propertyIndex && propertyIndex.group > -1 ? - propertyIndex.group : this._getLastGroupIndex(); - extendedNode.propertyIndex = propertyIndex && propertyIndex.prop > -1 ? - propertyIndex.prop : this._getLastPropertyIndex(); - // Spaces before node. - nodesToDelete = nodesToDelete.concat(spacesBefore); - extendedNode.spacesBeforeNode = - this._getNodesByIndex(block, spacesBefore); + extendedNode.groupIndex = propertyIndex && propertyIndex.group > -1 ? propertyIndex.group : this._getLastGroupIndex(); + extendedNode.propertyIndex = propertyIndex && propertyIndex.prop > -1 ? propertyIndex.prop : this._getLastPropertyIndex(); // Spaces before node. - // Spaces after node. - let spacesBeforeDelimiter = - this._getSpacesAndCommentsAfterNode(block, i); - nodesToDelete = nodesToDelete.concat(spacesBeforeDelimiter); - extendedNode.spacesBeforeDelimiter = - this._getNodesByIndex(block, spacesBeforeDelimiter); + nodesToDelete = nodesToDelete.concat(spacesBefore); + extendedNode.spacesBeforeNode = this._getNodesByIndex(block, spacesBefore); // Spaces after node. - i += spacesBeforeDelimiter.length; + let spacesBeforeDelimiter = this._getSpacesAndCommentsAfterNode(block, i); - // Spaces after delimiter. + nodesToDelete = nodesToDelete.concat(spacesBeforeDelimiter); + extendedNode.spacesBeforeDelimiter = this._getNodesByIndex(block, spacesBeforeDelimiter); + i += spacesBeforeDelimiter.length; // Spaces after delimiter. // If there is `;` right after the declaration, save it with the // declaration and mark it for removing from parent node: + if (block.get(i + 1) && block.get(i + 1).is('declarationDelimiter')) { i += 1; node = block.get(i); @@ -109,35 +105,31 @@ module.exports = { if (node.syntax !== 'sass') { // Save spaces and comments which follow right after // the declaration and mark them for removing from parent node: - let spacesAfterDelimiter = - this._getSpacesAndCommentsAfterNode(block, i); + let spacesAfterDelimiter = this._getSpacesAndCommentsAfterNode(block, i); + i += spacesAfterDelimiter.length; nodesToDelete = nodesToDelete.concat(spacesAfterDelimiter); - extendedNode.spacesAfterDelimiter = - this._getNodesByIndex(block, spacesAfterDelimiter); + extendedNode.spacesAfterDelimiter = this._getNodesByIndex(block, spacesAfterDelimiter); } } - extendedNode.endIndex = i; - // Remove all nodes, that were moved to `sortables` list, + extendedNode.endIndex = i; // Remove all nodes, that were moved to `sortables` list, // from block node: - extendedNode.nodesToDelete = nodesToDelete; + extendedNode.nodesToDelete = nodesToDelete; return extendedNode; }, _getLastGroupIndex() { - return this.value && this.value['...'] ? - this.value['...'].group : Infinity; + return this.value && this.value['...'] ? this.value['...'].group : Infinity; }, _getLastPropertyIndex() { - return this.value && this.value['...'] ? - this.value['...'].prop : Infinity; + return this.value && this.value['...'] ? this.value['...'].prop : Infinity; }, _getNodesByIndex(block, index) { - return index.map((i) => block.get(i)); + return index.map(i => block.get(i)); }, _getSortableIncludeName(node) { @@ -158,63 +150,58 @@ module.exports = { } let includeMixinName = '$include ' + mixinName; - return this.value.hasOwnProperty(includeMixinName) ? - includeMixinName : - '$include'; + return this.value.hasOwnProperty(includeMixinName) ? includeMixinName : '$include'; }, _getSortableName(node) { if (node.is('extend')) return '$extend'; - if (node.is('include')) return this._getSortableIncludeName(node); - else return this._getSortablePropertyName(node); + if (node.is('include')) return this._getSortableIncludeName(node);else return this._getSortablePropertyName(node); }, _getSortablePropertyName(node) { if (node.is('declaration')) { let property = node.first('property'); if (property === null) property = node.first('customProperty'); - property = property.first(); return property.is('variable') ? '$variable' : property.content; } let atkeyword = node.first('atkeyword'); - if (atkeyword && atkeyword.first().content === 'import') - return '$import'; + if (atkeyword && atkeyword.first().content === 'import') return '$import'; }, _getSpacesAndCommentsAfterNode(node, i) { // List of start positions for nodes with spaces and comments: - let positions = []; + let positions = []; // Skip node itself. - // Skip node itself. i++; for (let l = node.length; i < l; i++) { - let currentNode = node.get(i); + let currentNode = node.get(i); // If node is nor spaces neither comment, stop. - // If node is nor spaces neither comment, stop. if (!this._isSpaceOrComment(currentNode)) break; - if (currentNode.is('multilineComment') || - currentNode.is('singlelineComment')) { + if (currentNode.is('multilineComment') || currentNode.is('singlelineComment')) { positions.push(i); continue; - } - - // If there are any line breaks in a node with spaces, stop and + } // If there are any line breaks in a node with spaces, stop and // split the node into two: one with spaces before line break // and one with `\n` symbol and everything that goes after. // Combine the first one with declaration/@-rule's node: + + let linebreakIndex = currentNode.content.indexOf('\n'); + if (linebreakIndex !== -1) { var s = currentNode.content.substring(0, linebreakIndex); if (s === '') break; - var space = gonzales.createNode({type: 'space', content: s}); + var space = gonzales.createNode({ + type: 'space', + content: s + }); node.insert(i + 1, space); positions.push(i + 1); - currentNode.content = currentNode.content - .substring(linebreakIndex); + currentNode.content = currentNode.content.substring(linebreakIndex); break; } @@ -237,10 +224,9 @@ module.exports = { let sendPositions = false; for (let l = node.length; i < l; i++) { - let currentNode = node.get(i); - - // If the node is declaration or @-rule, stop and return all + let currentNode = node.get(i); // If the node is declaration or @-rule, stop and return all // found nodes with spaces and comments (if there are any): + if (!this._isSpaceOrComment(currentNode)) { sendPositions = true; break; @@ -253,8 +239,7 @@ module.exports = { }, _insertSortablesToBlock(nodesToSort, node) { - if (node.syntax === 'sass') - this._cleanSassLinebreaks(node); + if (node.syntax === 'sass') this._cleanSassLinebreaks(node); for (let i = nodesToSort.length - 1, l = -1; i > l; i--) { let currentNode = nodesToSort[i]; @@ -270,16 +255,13 @@ module.exports = { spacesBeforeNode.reverse().map(this._removeEmptyLines); spacesBeforeDelimiter.reverse().map(this._removeEmptyLines); - spacesAfterDelimiter.reverse().map(this._removeEmptyLines); - - // Divide declarations from different groups with + spacesAfterDelimiter.reverse().map(this._removeEmptyLines); // Divide declarations from different groups with // an empty line: + if (prevNode && currentNode.groupIndex > prevNode.groupIndex) { let space = spacesBeforeNode[0]; - if (space && space.is('space') && - (space.syntax === 'sass' || - space.content.match(/\n/g) && - space.content.match(/\n/g).length < 2)) { + + if (space && space.is('space') && (space.syntax === 'sass' || space.content.match(/\n/g) && space.content.match(/\n/g).length < 2)) { space.content = '\n' + space.content; } } @@ -290,9 +272,7 @@ module.exports = { if (currentNode.delim) { node.content.unshift(currentNode.delim); - } else if (i !== nodesToSort.length - 1 && - (currentNode.node.is('declaration') || - currentNode.node.is('extend'))) { + } else if (i !== nodesToSort.length - 1 && (currentNode.node.is('declaration') || currentNode.node.is('extend'))) { let delimiter = gonzales.createNode({ type: 'declarationDelimiter', content: currentNode.node.syntax === 'sass' ? '\n' : ';' @@ -314,8 +294,7 @@ module.exports = { // Types of nodes that can be sorted. _isAcceptableNode(node) { - const NODES = ['atrule', 'declaration', 'extend', 'include', - 'multilineComment', 'singlelineComment', 'space']; + const NODES = ['atrule', 'declaration', 'extend', 'include', 'multilineComment', 'singlelineComment', 'space']; return NODES.indexOf(node.type) !== -1; }, @@ -332,7 +311,9 @@ module.exports = { // combine it with spaces, semicolon and comments and move them from // current node to a separate list for further sorting: let nodesToSort = this._separateSortablesFromBlock(block); + this._sortNodes(nodesToSort); + this._insertSortablesToBlock(nodesToSort, block); }, @@ -346,42 +327,38 @@ module.exports = { _separateSortablesFromBlock(block) { let sortables = []; - let nodesToDelete = []; + let nodesToDelete = []; // Don't cache `block.length` since we may insert new nodes into it. - // Don't cache `block.length` since we may insert new nodes into it. for (let i = 0; i < block.length; i++) { let node = block.get(i); - if (!this._isAcceptableNode(node)) continue; - - // Save preceding spaces and comments, if there are any, + if (!this._isAcceptableNode(node)) continue; // Save preceding spaces and comments, if there are any, // and mark them for removing from parent node: - let spacesBeforeNode = - this._getSpacesAndCommentsBeforeNode(block, i); - if (!spacesBeforeNode) break; + let spacesBeforeNode = this._getSpacesAndCommentsBeforeNode(block, i); + + if (!spacesBeforeNode) break; i += spacesBeforeNode.length; node = block.get(i); let extendedNode = this._extendNode(block, i, spacesBeforeNode); - if (!extendedNode) continue; + if (!extendedNode) continue; nodesToDelete = nodesToDelete.concat(extendedNode.nodesToDelete); i = extendedNode.endIndex; sortables.push(extendedNode); } nodesToDelete.sort((a, b) => a - b); - for (let x = nodesToDelete.length - 1; x > -1; x--) - block.removeChild(nodesToDelete[x]); + + for (let x = nodesToDelete.length - 1; x > -1; x--) block.removeChild(nodesToDelete[x]); return sortables; }, _sortLeftovers(a, b) { let prefixes = ['-webkit-', '-moz-', '-ms-', '-o-', '']; - let prefixesRegExp = /^(-webkit-|-moz-|-ms-|-o-)(.*)$/; + let prefixesRegExp = /^(-webkit-|-moz-|-ms-|-o-)(.*)$/; // Get property name (i.e. `color`, `-o-animation`): - // Get property name (i.e. `color`, `-o-animation`): a = a.node.first().first().content; b = b.node.first().first().content; @@ -391,11 +368,11 @@ module.exports = { if (Array.isArray(b)) { b = b[0].content; - } - - // Get prefix and unprefixed part. For example: + } // Get prefix and unprefixed part. For example: // ['-o-animation', '-o-', 'animation'] // ['color', '', 'color'] + + a = a.match(prefixesRegExp) || [a, '', a]; b = b.match(prefixesRegExp) || [b, '', b]; @@ -403,17 +380,17 @@ module.exports = { // If unprefixed parts are different (i.e. `border` and // `color`), compare them: return a[2] < b[2] ? -1 : 1; - } - - // If unprefixed parts are identical (i.e. `border` in + } // If unprefixed parts are identical (i.e. `border` in // `-moz-border` and `-o-border`), compare prefixes. // They should be untouched if they are equal: + + if (prefixes.indexOf(a[1]) === prefixes.indexOf(b[1])) { return 0; - } - - // They should go in the same order they are set + } // They should go in the same order they are set // in `prefixes` array. + + return prefixes.indexOf(a[1]) < prefixes.indexOf(b[1]) ? -1 : 1; }, @@ -421,28 +398,23 @@ module.exports = { nodes.sort((a, b) => { // If a's group index is higher than b's group index, in // a sorted list a appears after b: - if (a.groupIndex !== b.groupIndex) - return a.groupIndex - b.groupIndex; - - // If a and b belong to leftovers and `sort-order-fallback` + if (a.groupIndex !== b.groupIndex) return a.groupIndex - b.groupIndex; // If a and b belong to leftovers and `sort-order-fallback` // option is set to `abc`, sort properties alphabetically: - if (a.groupIndex === this._getLastGroupIndex() && - this._config['sort-order-fallback']) { - return this._sortLeftovers(a, b); - } - // If a and b have the same group index, and a's property index + if (a.groupIndex === this._getLastGroupIndex() && this._config['sort-order-fallback']) { + return this._sortLeftovers(a, b); + } // If a and b have the same group index, and a's property index // is higher than b's property index, in a sorted list // a appears after b: - if (a.propertyIndex !== b.propertyIndex) - return a.propertyIndex - b.propertyIndex; - // If a and b have the same group index and the same property + + if (a.propertyIndex !== b.propertyIndex) return a.propertyIndex - b.propertyIndex; // If a and b have the same group index and the same property // index, in a sorted list they appear in the same order // they were in original array: + return a.i - b.i; }); }, detect: () => [] -}; +}; \ No newline at end of file diff --git a/src/options/space-after-colon.js b/lib/options/space-after-colon.js similarity index 63% rename from src/options/space-after-colon.js rename to lib/options/space-after-colon.js index bd3007fb..67f45ac5 100644 --- a/src/options/space-after-colon.js +++ b/lib/options/space-after-colon.js @@ -4,11 +4,8 @@ var gonzales = require('gonzales-pe'); module.exports = { name: 'space-after-colon', - runBefore: 'block-indent', - syntax: ['css', 'less', 'sass', 'scss'], - accepts: { number: true, string: /^[ \t\n]*$/ @@ -19,17 +16,13 @@ module.exports = { * * @param {node} ast */ - process: function(ast) { + process: function (ast) { let value = this.value; + ast.traverseByType('propertyDelimiter', function (delimiter, i, parent) { + if (delimiter.syntax === 'sass' && !parent.get(i - 1)) return null; // Remove any spaces after colon: - ast.traverseByType('propertyDelimiter', function(delimiter, i, parent) { - if (delimiter.syntax === 'sass' && !parent.get(i - 1)) - return null; + if (parent.get(i + 1) && parent.get(i + 1).is('space')) parent.removeChild(i + 1); // If the value set in config is not empty, add spaces: - // Remove any spaces after colon: - if (parent.get(i + 1) && parent.get(i + 1).is('space')) - parent.removeChild(i + 1); - // If the value set in config is not empty, add spaces: if (value !== '') { var space = gonzales.createNode({ type: 'space', @@ -47,10 +40,9 @@ module.exports = { * * @param {node} ast */ - detect: function(ast) { + detect: function (ast) { let detected = []; - - ast.traverseByType('propertyDelimiter', function(delimiter, i, parent) { + ast.traverseByType('propertyDelimiter', function (delimiter, i, parent) { var nextNode = parent.get(i + 1); if (nextNode.is('space')) { @@ -59,7 +51,6 @@ module.exports = { detected.push(''); } }); - return detected; } -}; +}; \ No newline at end of file diff --git a/src/options/space-after-combinator.js b/lib/options/space-after-combinator.js similarity index 82% rename from src/options/space-after-combinator.js rename to lib/options/space-after-combinator.js index 556204b4..cebecea2 100644 --- a/src/options/space-after-combinator.js +++ b/lib/options/space-after-combinator.js @@ -4,11 +4,8 @@ var gonzales = require('gonzales-pe'); module.exports = { name: 'space-after-combinator', - runBefore: 'block-indent', - syntax: ['css', 'less', 'sass', 'scss'], - accepts: { number: true, string: /^[ \t\n]*$/ @@ -19,10 +16,9 @@ module.exports = { * * @param {node} ast */ - process: function(ast) { + process: function (ast) { let value = this.value; - - ast.traverseByType('combinator', function(combinator, i, parent) { + ast.traverseByType('combinator', function (combinator, i, parent) { var nextNode = parent.get(i + 1); if (nextNode && nextNode.is('space')) { @@ -42,10 +38,9 @@ module.exports = { * * @param {node} ast */ - detect: function(ast) { + detect: function (ast) { let detected = []; - - ast.traverseByType('combinator', function(combinator, i, parent) { + ast.traverseByType('combinator', function (combinator, i, parent) { var nextNode = parent.get(i + 1); if (nextNode.is('space')) { @@ -54,7 +49,6 @@ module.exports = { detected.push(''); } }); - return detected; } -}; +}; \ No newline at end of file diff --git a/src/options/space-after-opening-brace.js b/lib/options/space-after-opening-brace.js similarity index 84% rename from src/options/space-after-opening-brace.js rename to lib/options/space-after-opening-brace.js index ed04b1f3..fe66946f 100644 --- a/src/options/space-after-opening-brace.js +++ b/lib/options/space-after-opening-brace.js @@ -4,11 +4,8 @@ var gonzales = require('gonzales-pe'); module.exports = { name: 'space-after-opening-brace', - runBefore: 'block-indent', - syntax: ['css', 'less', 'scss'], - accepts: { number: true, string: /^[ \t\n]*$/ @@ -19,15 +16,13 @@ module.exports = { * * @param {node} ast */ - process: function(ast) { + process: function (ast) { let value = this.value; - - ast.traverse(function(node) { + ast.traverse(function (node) { // If found block node stop at the next one for space check if (!node.is('block') && !node.is('atrulers')) return; - if (node.first() && - node.first().is('space')) { + if (node.first() && node.first().is('space')) { node.first().content = value; } else if (value !== '') { var space = gonzales.createNode({ @@ -44,10 +39,9 @@ module.exports = { * * @param {node} ast */ - detect: function(ast) { + detect: function (ast) { let detected = []; - - ast.traverse(function(node) { + ast.traverse(function (node) { if (!node.is('block') && !node.is('atrulers')) return; if (node.first().is('space')) { @@ -56,7 +50,6 @@ module.exports = { detected.push(''); } }); - return detected; } -}; +}; \ No newline at end of file diff --git a/src/options/space-after-selector-delimiter.js b/lib/options/space-after-selector-delimiter.js similarity index 86% rename from src/options/space-after-selector-delimiter.js rename to lib/options/space-after-selector-delimiter.js index 995ed373..e6459967 100644 --- a/src/options/space-after-selector-delimiter.js +++ b/lib/options/space-after-selector-delimiter.js @@ -4,11 +4,8 @@ var gonzales = require('gonzales-pe'); module.exports = { name: 'space-after-selector-delimiter', - runBefore: 'block-indent', - syntax: ['css', 'less', 'sass', 'scss'], - accepts: { number: true, string: /^[ \t\n]*$/ @@ -19,12 +16,10 @@ module.exports = { * * @param {node} ast */ - process: function(ast) { + process: function (ast) { let value = this.value; - - ast.traverseByType('delimiter', function(delimiter, i, parent) { + ast.traverseByType('delimiter', function (delimiter, i, parent) { if (parent.is('arguments')) return; - var nextNode = parent.get(i + 1); if (!nextNode) return; @@ -47,12 +42,10 @@ module.exports = { * * @param {node} ast */ - detect: function(ast) { + detect: function (ast) { let detected = []; - - ast.traverseByType('delimiter', function(delimiter, i, parent) { + ast.traverseByType('delimiter', function (delimiter, i, parent) { if (parent.is('arguments')) return; - var nextNode = parent.get(i + 1); if (nextNode && nextNode.is('space')) { @@ -63,7 +56,6 @@ module.exports = { detected.push(''); } }); - return detected; } -}; +}; \ No newline at end of file diff --git a/src/options/space-before-closing-brace.js b/lib/options/space-before-closing-brace.js similarity index 80% rename from src/options/space-before-closing-brace.js rename to lib/options/space-before-closing-brace.js index 1cd276e2..ab7937b5 100644 --- a/src/options/space-before-closing-brace.js +++ b/lib/options/space-before-closing-brace.js @@ -2,45 +2,38 @@ var gonzales = require('gonzales-pe'); -module.exports = (function() { +module.exports = function () { var valueFromSettings; var blockIndent; function getLastWhitespaceNode(node) { var lastNode = node.last(); - if (!lastNode || !lastNode.content) return null; - if (lastNode.is('block')) return null; if (lastNode.is('space')) return lastNode; - return getLastWhitespaceNode(lastNode); } function processBlock(x, level) { level = level || 0; - - x.forEach(function(node) { - if (!node.is('block') && - !node.is('atrulers')) return processBlock(node, level); - + x.forEach(function (node) { + if (!node.is('block') && !node.is('atrulers')) return processBlock(node, level); level++; - var value = valueFromSettings; + if (value.indexOf('\n') > -1) { // TODO: Check that it works for '' block indent value if (blockIndent) { value += new Array(level).join(blockIndent); } - } - - // If found block node stop at the next one for space check + } // If found block node stop at the next one for space check // For the pre-block node, find its last (the deepest) child - var whitespaceNode = getLastWhitespaceNode(node); - // If it's spaces, modify this node + + var whitespaceNode = getLastWhitespaceNode(node); // If it's spaces, modify this node // If it's something different from spaces, add a space node // to the end + if (whitespaceNode) { whitespaceNode.content = value; } else if (value !== '') { @@ -55,14 +48,10 @@ module.exports = (function() { }); } - return { name: 'space-before-closing-brace', - runBefore: 'tab-size', - syntax: ['css', 'less', 'scss'], - accepts: { number: true, string: /^[ \t\n]*$/ @@ -73,10 +62,9 @@ module.exports = (function() { * @param {node} ast * @param {Object} config */ - process: function(ast, config) { + process: function (ast, config) { valueFromSettings = this.value; blockIndent = config['block-indent']; - processBlock(ast); }, @@ -85,20 +73,19 @@ module.exports = (function() { * * @param {node} ast */ - detect: function(ast) { + detect: function (ast) { let detected = []; - - ast.traverseByTypes(['block', 'atrulers'], function(node) { + ast.traverseByTypes(['block', 'atrulers'], function (node) { // For the block node, find its last (the deepest) child var whitespaceNode = getLastWhitespaceNode(node); + if (whitespaceNode) { detected.push(whitespaceNode.content); } else { detected.push(''); } }); - return detected; } }; -})(); +}(); \ No newline at end of file diff --git a/src/options/space-before-colon.js b/lib/options/space-before-colon.js similarity index 69% rename from src/options/space-before-colon.js rename to lib/options/space-before-colon.js index 1490bcb3..9a6b1b20 100644 --- a/src/options/space-before-colon.js +++ b/lib/options/space-before-colon.js @@ -4,11 +4,8 @@ var gonzales = require('gonzales-pe'); module.exports = { name: 'space-before-colon', - runBefore: 'block-indent', - syntax: ['css', 'less', 'sass', 'scss'], - accepts: { number: true, string: /^[ \t\n]*$/ @@ -19,19 +16,16 @@ module.exports = { * * @param {node} ast */ - process: function(ast) { + process: function (ast) { let value = this.value; + ast.traverseByType('propertyDelimiter', function (delimiter, i, parent) { + if (delimiter.syntax === 'sass' && !parent.get(i - 1)) return; // Remove any spaces before colon: - ast.traverseByType('propertyDelimiter', function(delimiter, i, parent) { - if (delimiter.syntax === 'sass' && !parent.get(i - 1)) - return; - - // Remove any spaces before colon: if (parent.get(i - 1).is('space')) { parent.removeChild(--i); - } + } // If the value set in config is not empty, add spaces: + - // If the value set in config is not empty, add spaces: if (value !== '') { var space = gonzales.createNode({ type: 'space', @@ -47,10 +41,9 @@ module.exports = { * * @param {node} ast */ - detect: function(ast) { + detect: function (ast) { let detected = []; - - ast.traverseByType('propertyDelimiter', function(delimiter, i, parent) { + ast.traverseByType('propertyDelimiter', function (delimiter, i, parent) { var previousNode = parent.get(i - 1); if (previousNode && previousNode.is('space')) { @@ -59,7 +52,6 @@ module.exports = { detected.push(''); } }); - return detected; } -}; +}; \ No newline at end of file diff --git a/src/options/space-before-combinator.js b/lib/options/space-before-combinator.js similarity index 83% rename from src/options/space-before-combinator.js rename to lib/options/space-before-combinator.js index 6360e6ea..074912ad 100644 --- a/src/options/space-before-combinator.js +++ b/lib/options/space-before-combinator.js @@ -4,11 +4,8 @@ var gonzales = require('gonzales-pe'); module.exports = { name: 'space-before-combinator', - runBefore: 'block-indent', - syntax: ['css', 'less', 'sass', 'scss'], - accepts: { number: true, string: /^[ \t\n]*$/ @@ -19,12 +16,10 @@ module.exports = { * * @param {node} ast */ - process: function(ast) { + process: function (ast) { let value = this.value; - - ast.traverseByType('combinator', function(combinator, i, parent) { + ast.traverseByType('combinator', function (combinator, i, parent) { var previousNode = parent.get(i - 1); - if (!previousNode) return; if (previousNode.is('space')) { @@ -44,10 +39,9 @@ module.exports = { * * @param {node} ast */ - detect: function(ast) { + detect: function (ast) { let detected = []; - - ast.traverseByType('combinator', function(combinator, i, parent) { + ast.traverseByType('combinator', function (combinator, i, parent) { var previousNode = parent.get(i - 1); if (previousNode && previousNode.is('space')) { @@ -56,7 +50,6 @@ module.exports = { detected.push(''); } }); - return detected; } -}; +}; \ No newline at end of file diff --git a/src/options/space-before-opening-brace.js b/lib/options/space-before-opening-brace.js similarity index 72% rename from src/options/space-before-opening-brace.js rename to lib/options/space-before-opening-brace.js index e3eca162..9ed26bbb 100644 --- a/src/options/space-before-opening-brace.js +++ b/lib/options/space-before-opening-brace.js @@ -2,14 +2,11 @@ var gonzales = require('gonzales-pe'); -module.exports = (function() { +module.exports = function () { return { name: 'space-before-opening-brace', - runBefore: 'block-indent', - syntax: ['css', 'less', 'scss'], - accepts: { number: true, string: /^[ \t\n]*$/ @@ -20,19 +17,16 @@ module.exports = (function() { * * @param {node} ast */ - process: function(ast) { - let value = this.value; + process: function (ast) { + let value = this.value; // If found block node stop at the next one for space check. - // If found block node stop at the next one for space check. - ast.traverseByTypes(['block', 'value'], function(block, i, parent) { + ast.traverseByTypes(['block', 'value'], function (block, i, parent) { if (block.is('value') && !block.first().is('block')) return; - var previousNode = parent.get(i - 1); - if (!previousNode) return; - - // If it's spaces, modify this node. + if (!previousNode) return; // If it's spaces, modify this node. // If it's something different from spaces, add a space node to // the end: + if (previousNode.is('space')) { previousNode.content = value; } else if (value !== '') { @@ -50,26 +44,22 @@ module.exports = (function() { * * @param {node} ast */ - detect: function(ast) { + detect: function (ast) { var detected = []; - - ast.traverseByTypes(['block', 'value'], function(block, i, parent) { + ast.traverseByTypes(['block', 'value'], function (block, i, parent) { if (block.is('value') && !block.first().is('block')) return; - var previousNode = parent.get(i - 1); - if (!previousNode) return; - - // If it's spaces, modify this node. + if (!previousNode) return; // If it's spaces, modify this node. // If it's something different from spaces, add a space node to // the end: + if (previousNode.is('space')) { detected.push(previousNode.content); } else { detected.push(''); } }); - return detected; } }; -})(); +}(); \ No newline at end of file diff --git a/src/options/space-before-selector-delimiter.js b/lib/options/space-before-selector-delimiter.js similarity index 84% rename from src/options/space-before-selector-delimiter.js rename to lib/options/space-before-selector-delimiter.js index 29f153e2..4492d5d9 100644 --- a/src/options/space-before-selector-delimiter.js +++ b/lib/options/space-before-selector-delimiter.js @@ -4,11 +4,8 @@ var gonzales = require('gonzales-pe'); module.exports = { name: 'space-before-selector-delimiter', - runBefore: 'block-indent', - syntax: ['css', 'less', 'sass', 'scss'], - accepts: { number: true, string: /^[ \t\n]*$/ @@ -19,12 +16,10 @@ module.exports = { * * @param {node} ast */ - process: function(ast) { + process: function (ast) { let value = this.value; - - ast.traverseByType('delimiter', function(delimiter, i, parent) { + ast.traverseByType('delimiter', function (delimiter, i, parent) { if (parent.is('arguments')) return; - var previousNode = parent.get(i - 1); if (previousNode && previousNode.is('space')) { @@ -44,12 +39,10 @@ module.exports = { * * @param {node} ast */ - detect: function(ast) { + detect: function (ast) { let detected = []; - - ast.traverseByType('delimiter', function(delimiter, i, parent) { + ast.traverseByType('delimiter', function (delimiter, i, parent) { if (parent.is('arguments')) return; - var previousNode = parent.get(i - 1); if (previousNode && previousNode.is('space')) { @@ -58,7 +51,6 @@ module.exports = { detected.push(''); } }); - return detected; } -}; +}; \ No newline at end of file diff --git a/src/options/space-between-declarations.js b/lib/options/space-between-declarations.js similarity index 87% rename from src/options/space-between-declarations.js rename to lib/options/space-between-declarations.js index 2c14e60c..489e178a 100644 --- a/src/options/space-between-declarations.js +++ b/lib/options/space-between-declarations.js @@ -2,7 +2,7 @@ var gonzales = require('gonzales-pe'); -module.exports = (function() { +module.exports = function () { function getDeclarationEnd(node, i) { for (; i < node.length; i++) { if (!node.get(i + 1) || typeof node.get(i + 1) === 'string') { @@ -14,13 +14,11 @@ module.exports = (function() { } else { return 0; } - } else if (node.get(i + 2) && - node.get(i + 2).is('multilineComment')) { + } else if (node.get(i + 2) && node.get(i + 2).is('multilineComment')) { if (node.get(i + 3) && node.get(i + 3).is('declaration')) { return i + 2; } else if (node.get(i + 3) && node.get(i + 3).is('space')) { - if (node.get(i + 4) && - node.get(i + 4).is('declaration')) { + if (node.get(i + 4) && node.get(i + 4).is('declaration')) { return i + 2; } else { return 0; @@ -28,8 +26,7 @@ module.exports = (function() { } else { return 0; } - } else if (node.get(i + 2) && - node.get(i + 2).is('declaration')) { + } else if (node.get(i + 2) && node.get(i + 2).is('declaration')) { return i; } } else if (node.get(i + 1).is('declaration')) { @@ -52,11 +49,8 @@ module.exports = (function() { return { name: 'space-between-declarations', - runBefore: 'block-indent', - syntax: ['css', 'less', 'scss'], - accepts: { number: true, string: /^[ \t\n]*$/ @@ -67,14 +61,14 @@ module.exports = (function() { * * @param {node} ast */ - process: function(ast) { + process: function (ast) { let value = this.value; - ast.traverseByType('declarationDelimiter', (delimiter, i, parent) => { // Grom user's point of view "declaration" includes semicolons // and comments placed on the same line. // So group those things together: var declarationEnd = getDeclarationEnd(parent, i); + if (!declarationEnd) { return; } else { @@ -82,6 +76,7 @@ module.exports = (function() { } var nextNode = parent.get(i + 1); + if (nextNode && nextNode.is('space')) { nextNode.content = value; } else { @@ -94,4 +89,4 @@ module.exports = (function() { }); } }; -})(); +}(); \ No newline at end of file diff --git a/src/options/strip-spaces.js b/lib/options/strip-spaces.js similarity index 68% rename from src/options/strip-spaces.js rename to lib/options/strip-spaces.js index 50ea4ae9..cf603e7f 100644 --- a/src/options/strip-spaces.js +++ b/lib/options/strip-spaces.js @@ -1,6 +1,6 @@ 'use strict'; -module.exports = (function() { +module.exports = function () { /** * Trim trailing spaces on each line. * @private @@ -13,9 +13,7 @@ module.exports = (function() { return { name: 'strip-spaces', - syntax: ['css', 'less', 'sass', 'scss'], - accepts: { boolean: [true] }, @@ -24,19 +22,17 @@ module.exports = (function() { * Processes tree node. * @param {node} ast */ - process: function(ast) { + process: function (ast) { var lastChild = ast.last(); + if (lastChild.is('space')) { - lastChild.content = trim(lastChild.content) - .replace(/[ \t]+$/, '') - .replace(/[\n]+/g, '\n'); + lastChild.content = trim(lastChild.content).replace(/[ \t]+$/, '').replace(/[\n]+/g, '\n'); } - ast.traverseByType('space', function(space) { + ast.traverseByType('space', function (space) { space.content = trim(space.content); }); }, - detectDefault: true, /** @@ -46,21 +42,18 @@ module.exports = (function() { * * @param {node} ast */ - detect: function(ast) { + detect: function (ast) { let detected = []; - var lastChild = ast.last(); - if (lastChild.is('space') && - lastChild.content !== '\n' && - lastChild.content.match(/^[ \n\t]+$/)) { + + if (lastChild.is('space') && lastChild.content !== '\n' && lastChild.content.match(/^[ \n\t]+$/)) { detected.push(false); } - ast.traverseByType('space', function(space) { + ast.traverseByType('space', function (space) { if (space.content.match(/[ \t]\n/)) detected.push(false); }); - return detected; } }; -})(); +}(); \ No newline at end of file diff --git a/src/options/tab-size.js b/lib/options/tab-size.js similarity index 79% rename from src/options/tab-size.js rename to lib/options/tab-size.js index d9a4b753..459662c8 100644 --- a/src/options/tab-size.js +++ b/lib/options/tab-size.js @@ -2,11 +2,8 @@ module.exports = { name: 'tab-size', - runBefore: 'vendor-prefix-align', - syntax: ['css', 'less', 'sass', 'scss'], - accepts: { number: true }, @@ -16,11 +13,10 @@ module.exports = { * * @param {node} ast */ - process: function(ast) { + process: function (ast) { let value = this.value; - - ast.traverseByType('space', function(space) { + ast.traverseByType('space', function (space) { space.content = space.content.replace(/\t/, value); }); } -}; +}; \ No newline at end of file diff --git a/src/options/unitless-zero.js b/lib/options/unitless-zero.js similarity index 60% rename from src/options/unitless-zero.js rename to lib/options/unitless-zero.js index 467db682..c26ccdd0 100644 --- a/src/options/unitless-zero.js +++ b/lib/options/unitless-zero.js @@ -2,9 +2,7 @@ module.exports = { name: 'unitless-zero', - syntax: ['css', 'less', 'sass', 'scss'], - accepts: { boolean: [true] }, @@ -14,21 +12,21 @@ module.exports = { * * @param {node} ast */ - process: function(ast) { + process: function (ast) { var UNITS = ['cm', 'em', 'ex', 'pt', 'px']; - - ast.traverseByTypes(['value', 'parentheses'], function(node) { - node.forEach(function(value) { + ast.traverseByTypes(['value', 'parentheses'], function (node) { + node.forEach(function (value) { if (typeof value === 'string') return; if (value.is('dimension')) { var unit = value.first('ident').content; - if (value.first('number').content === '0' && - UNITS.indexOf(unit) !== -1) { + + if (value.first('number').content === '0' && UNITS.indexOf(unit) !== -1) { value.removeChild(1); } } else if (value.is('percentage')) { var number = value.first('number').content; + if (number === '0') { value.type = 'number'; value.content = number; @@ -43,35 +41,27 @@ module.exports = { * * @param {node} ast */ - detect: function(ast) { + detect: function (ast) { let detected = []; - - ast.traverse(function(node, index, parent) { + ast.traverse(function (node, index, parent) { // If we see a zero with unit and it is not degree, // then we don’t have an option - if (node.is('percentage') && - node.first('number').content[1] === '0') { + if (node.is('percentage') && node.first('number').content[1] === '0') { detected.push(false); return; } - if (node.is('dimension') && - node.first('number').content === '0' && - node.first('ident').content !== 'deg') { + if (node.is('dimension') && node.first('number').content === '0' && node.first('ident').content !== 'deg') { detected.push(false); return; - } - - // If we see a zero and previous node is not percentage + } // If we see a zero and previous node is not percentage // or dimension, then we have an option - if (node.is('number') && - node.content === '0' && - !parent.is('percentage') && - !parent.is('dimension')) { + + + if (node.is('number') && node.content === '0' && !parent.is('percentage') && !parent.is('dimension')) { detected.push(true); } }); - return detected; } -}; +}; \ No newline at end of file diff --git a/src/options/vendor-prefix-align.js b/lib/options/vendor-prefix-align.js similarity index 82% rename from src/options/vendor-prefix-align.js rename to lib/options/vendor-prefix-align.js index a816340e..77fc2023 100644 --- a/src/options/vendor-prefix-align.js +++ b/lib/options/vendor-prefix-align.js @@ -2,29 +2,21 @@ var gonzales = require('gonzales-pe'); -module.exports = (function() { +module.exports = function () { // Vendor prefixes list: - var PREFIXES = [ - 'webkit', - 'khtml', - 'moz', - 'ms', - 'o' - ]; - + var PREFIXES = ['webkit', 'khtml', 'moz', 'ms', 'o']; var oneline; - /** * Makes namespace from property name. * * @param {String} propertyName * @returns {String|undefined} */ + function makeNamespace(propertyName) { var info = getPrefixInfo(propertyName); return info && info.baseName; } - /** * Creates object which contains info about vendor prefix used * in propertyName. @@ -34,25 +26,21 @@ module.exports = (function() { * @param {Number} [extraSymbols=0] extra symbols count * @returns {Object|undefined} */ + + function getPrefixInfo(propertyName, namespace, extraSymbols) { var baseName = propertyName; var prefixLength = 0; - namespace = namespace || ''; extraSymbols = extraSymbols || 0; - if (!propertyName) return; - - PREFIXES.some(function(prefix) { + PREFIXES.some(function (prefix) { prefix = '-' + prefix + '-'; if (propertyName.indexOf(prefix) !== 0) return; - baseName = baseName.substr(prefix.length); prefixLength = prefix.length; - return true; }); - return { id: namespace + baseName, baseName: baseName, @@ -60,16 +48,16 @@ module.exports = (function() { extra: extraSymbols }; } - /** * Returns extra indent for item in arguments * * @param {Array} nodes nodes to process * @returns {Number|undefined} */ + + function extraIndent(nodes) { if (!nodes || !nodes.length) return; - var node; var crPos; var tabPos; @@ -86,14 +74,13 @@ module.exports = (function() { if (tabPos > crPos) crPos = tabPos; } - if (crPos !== -1) - oneline = false; + if (crPos !== -1) oneline = false; if (node.is('space')) { result += node.content.length - crPos - 1; - if (crPos !== -1) - break; + if (crPos !== -1) break; } + if (node.is('multilineComment')) { if (crPos === -1) { // Comment symbols length @@ -110,29 +97,32 @@ module.exports = (function() { return result; } - /** * Wrapper for extra indent function for `property` node. * * @param {Array} nodes all nodes * @param {Number} i position in nodes array */ + + function extraIndentProperty(nodes, i) { var subset = []; + while (i--) { - if (!nodes.get(i) || nodes.get(i).is('declarationDelimiter')) - break; + if (!nodes.get(i) || nodes.get(i).is('declarationDelimiter')) break; subset.unshift(nodes.get(i)); } + return extraIndent(subset); } - /** * Wrapper for extra indent function for val-node. * * @param {Array} nodes all nodes * @param {Number} i position in nodes array */ + + function extraIndentVal(nodes, i) { var subset = []; var declaration = nodes.get(i); @@ -140,7 +130,6 @@ module.exports = (function() { for (var x = declaration.length; x--;) { if (!declaration.get(x).is('value')) continue; - x--; while (!declaration.get(x).is('propertyDelimiter')) { @@ -150,9 +139,9 @@ module.exports = (function() { break; } + return extraIndent(subset); } - /** * Walks across nodes, and call payload for every node that pass * selector check. @@ -166,19 +155,18 @@ module.exports = (function() { * getExtraSymbols: {Number} extra symbols count * } */ + + function walk(args) { - args.node.forEach(function(item, i) { + args.node.forEach(function (item, i) { var name = args.selector(item); - var namespace = args.namespaceSelector && - makeNamespace(args.namespaceSelector(item)); + var namespace = args.namespaceSelector && makeNamespace(args.namespaceSelector(item)); var extraSymbols = args.getExtraSymbols(args.node, i); - var info = name && getPrefixInfo(name, namespace, extraSymbols); if (!info) return; args.payload(info, i); }); } - /** * Returns property name. * e.g. @@ -188,12 +176,13 @@ module.exports = (function() { * @param {node} node * @returns {String|undefined} */ + + function getPropertyName(node) { - if (!node.is('declaration')) return; - // TODO: Check that it's not a variable + if (!node.is('declaration')) return; // TODO: Check that it's not a variable + return node.get(0).get(0).content; } - /** * Returns property value name. * e.g. @@ -205,27 +194,31 @@ module.exports = (function() { * @param {node} node * @returns {String|undefined} */ + + function getValName(node) { if (!node.is('declaration')) return; - var value = node.first('value'); if (value.get(0).is('ident')) return value.get(0).content; if (value.get(0).is('function')) return value.get(0).get(0).content; } - /** * Updates dict which contains info about items align. * * @param {Object} info * @param {Object} dict */ - function updateDict(info, dict) { - if (info.prefixLength === 0 && info.extra === 0) return; - var indent = dict[info.id] || {prefixLength: 0, extra: 0}; + function updateDict(info, dict) { + if (info.prefixLength === 0 && info.extra === 0) return; + var indent = dict[info.id] || { + prefixLength: 0, + extra: 0 + }; let indentLength = indent.prefixLength + indent.extra; let infoLength = info.prefixLength + info.extra; + if (indentLength > infoLength) { dict[info.id] = indent; } else { @@ -235,7 +228,6 @@ module.exports = (function() { }; } } - /** * Returns string with correct number of spaces for info.baseName property. * @@ -244,30 +236,22 @@ module.exports = (function() { * @param {String} whitespaceNode * @returns {String} */ + + function updateIndent(info, dict, whitespaceNode) { var item = dict[info.id]; - if (!item) - return whitespaceNode; - + if (!item) return whitespaceNode; var crPos = whitespaceNode.lastIndexOf('\n'); var tabPos = whitespaceNode.lastIndexOf('\t'); if (tabPos > crPos) crPos = tabPos; - var firstPart = whitespaceNode.substr(0, crPos + 1); - var extraIndent = new Array( - (item.prefixLength - info.prefixLength) + - (item.extra - info.extra) + - whitespaceNode.length - firstPart.length + - 1).join(' '); - + var extraIndent = new Array(item.prefixLength - info.prefixLength + (item.extra - info.extra) + whitespaceNode.length - firstPart.length + 1).join(' '); return firstPart.concat(extraIndent); } return { name: 'vendor-prefix-align', - syntax: ['css', 'less', 'sass', 'scss'], - accepts: { boolean: [true] }, @@ -277,46 +261,42 @@ module.exports = (function() { * * @param {node} ast */ - process: function(ast) { - ast.traverseByType('block', function(node) { + process: function (ast) { + ast.traverseByType('block', function (node) { oneline = true; + var dict = {}; // Gathering Info - var dict = {}; - - // Gathering Info walk({ node: node, selector: getPropertyName, getExtraSymbols: extraIndentProperty, - payload: function(info) { + payload: function (info) { updateDict(info, dict); } }); - walk({ node: node, selector: getValName, namespaceSelector: getPropertyName, getExtraSymbols: extraIndentVal, - payload: function(info) { + payload: function (info) { updateDict(info, dict); } }); + if (oneline && ast.syntax !== 'sass') return; // Update nodes - if (oneline && ast.syntax !== 'sass') return; - - // Update nodes walk({ node: node, selector: getValName, namespaceSelector: getPropertyName, getExtraSymbols: extraIndentVal, - payload: function(info, i) { + payload: function (info, i) { for (var x = node.get(i).length; x--;) { if (node.get(i).get(x).is('value')) break; } let prevNode = node.get(i).get(x - 1); + if (!prevNode.is('space')) { var space = gonzales.createNode({ type: 'space', @@ -331,18 +311,16 @@ module.exports = (function() { node.get(i).get(x - 1).content = updatedIndent; } }); - if (ast.syntax === 'sass') return; - walk({ node: node, selector: getPropertyName, getExtraSymbols: extraIndentProperty, - payload: function(info, i) { + payload: function (info, i) { // `node.get(i - 1)` can be either space or comment: var whitespaceNode = node.get(i - 1); - if (!whitespaceNode) return; - // If it's a comment, insert an empty space node: + if (!whitespaceNode) return; // If it's a comment, insert an empty space node: + if (!whitespaceNode.is('space')) { whitespaceNode = gonzales.createNode({ type: 'space', @@ -350,6 +328,7 @@ module.exports = (function() { }); node.insert(i - 1, whitespaceNode); } + let content = whitespaceNode.content; let updatedContent = updateIndent(info, dict, content); whitespaceNode.content = updatedContent; @@ -363,38 +342,38 @@ module.exports = (function() { * * @param {node} ast */ - detect: function(ast) { + detect: function (ast) { let detected = []; - - ast.traverseByType('block', function(node) { + ast.traverseByType('block', function (node) { var result = { true: 0, false: 0 }; - var maybePrefix = false; var prevPrefixLength = false; var prevProp; var prevSum; var partialResult = null; - var getResult = function(options) { - let {node, sum, info, i} = options; - var prop = info.baseName; - - // If this is the last item in a row and we have a result, + var getResult = function (options) { + let node = options.node, + sum = options.sum, + info = options.info, + i = options.i; + var prop = info.baseName; // If this is the last item in a row and we have a result, // then catch it + if (prop !== prevProp && partialResult !== null) { if (partialResult) { result.true++; } else { result.false++; } + partialResult = null; } - if (prop === prevProp && - info.prefixLength !== prevPrefixLength) { + if (prop === prevProp && info.prefixLength !== prevPrefixLength) { maybePrefix = true; } else { maybePrefix = false; @@ -424,37 +403,44 @@ module.exports = (function() { prevPrefixLength = info.prefixLength; prevProp = prop; prevSum = sum; - }; + }; // Gathering Info + - // Gathering Info walk({ node: node, selector: getPropertyName, getExtraSymbols: extraIndentProperty, - payload: function(info, i) { + payload: function (info, i) { if (node.get(i - 1) && node.get(i - 1).content) { - let nodeLength = node.get(i - 1).content - .replace(/^[ \t]*\n+/, '').length; + let nodeLength = node.get(i - 1).content.replace(/^[ \t]*\n+/, '').length; var sum = nodeLength + info.prefixLength; - getResult({node: node, sum: sum, info: info, i: i}); + getResult({ + node: node, + sum: sum, + info: info, + i: i + }); } } }); - walk({ node: node, selector: getValName, getExtraSymbols: extraIndentVal, - payload: function(info, i) { + payload: function (info, i) { for (var x = node.get(i).length; x--;) { if (node.get(i).get(x).is('value')) break; } if (node.get(i).get(x - 1)) { - let nodeLength = node.get(i).get(x - 1).content - .replace(/^[ \t]*\n+/, '').length; + let nodeLength = node.get(i).get(x - 1).content.replace(/^[ \t]*\n+/, '').length; var sum = nodeLength + info.prefixLength; - getResult({node: node, sum: sum, info: info, i: i}); + getResult({ + node: node, + sum: sum, + info: info, + i: i + }); } } }); @@ -467,8 +453,7 @@ module.exports = (function() { } } }); - return detected; } }; -})(); +}(); \ No newline at end of file diff --git a/src/plugin.js b/lib/plugin.js similarity index 58% rename from src/plugin.js rename to lib/plugin.js index a08046f8..7b29d4b6 100644 --- a/src/plugin.js +++ b/lib/plugin.js @@ -1,12 +1,10 @@ 'use strict'; - let Errors = require('./errors'); -let Plugin = function(methods) { +let Plugin = function (methods) { for (let method in methods) { - this[method] = typeof method === 'function'? - methods[method].bind(this) : methods[method]; + this[method] = typeof method === 'function' ? methods[method].bind(this) : methods[method]; } this.validate(); @@ -39,11 +37,12 @@ Plugin.prototype = { * @type {Function} */ lint: null, - value_: null, + get value() { return this.value_; }, + set value(value) { let valueType = typeof value; let pattern = this.accepts && this.accepts[valueType]; @@ -53,26 +52,22 @@ Plugin.prototype = { return this.value_; } - if (!pattern) - throw new Error(Errors.unacceptableValueType(valueType, this.accepts)); + if (!pattern) throw new Error(Errors.unacceptableValueType(valueType, this.accepts)); if (valueType === 'boolean') { - if (pattern.indexOf(value) < 0) - throw new Error(Errors.unacceptableBoolean(pattern)); + if (pattern.indexOf(value) < 0) throw new Error(Errors.unacceptableBoolean(pattern)); this.value_ = value; return this.value_; } if (valueType === 'number') { - if (value !== parseInt(value)) - throw new Error(Errors.unacceptableNumber()); + if (value !== parseInt(value)) throw new Error(Errors.unacceptableNumber()); this.value_ = new Array(value + 1).join(' '); return this.value_; } if (valueType = 'string') { - if (!value.match(pattern)) - throw new Error(Errors.unacceptableString(pattern)); + if (!value.match(pattern)) throw new Error(Errors.unacceptableString(pattern)); this.value_ = value; return this.value_; } @@ -81,16 +76,10 @@ Plugin.prototype = { }, validate() { - if (typeof this.name !== 'string' || !this.name) - throw new Error(Errors.missingName()); - - if (!Array.isArray(this.syntax) || this.syntax.length === 0) - throw new Error(Errors.missingSyntax()); - - if (typeof this.accepts !== 'object' && - typeof this.setValue !== 'function') - throw new Error(Errors.missingSetValue()); + if (typeof this.name !== 'string' || !this.name) throw new Error(Errors.missingName()); + if (!Array.isArray(this.syntax) || this.syntax.length === 0) throw new Error(Errors.missingSyntax()); + if (typeof this.accepts !== 'object' && typeof this.setValue !== 'function') throw new Error(Errors.missingSetValue()); } -}; -module.exports = Plugin; +}; +module.exports = Plugin; \ No newline at end of file diff --git a/logo.png b/logo.png deleted file mode 100644 index 04fa74dc..00000000 Binary files a/logo.png and /dev/null differ diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 23a1f0ed..00000000 --- a/package-lock.json +++ /dev/null @@ -1,4190 +0,0 @@ -{ - "name": "csscomb", - "version": "4.3.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/cli": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.4.3.tgz", - "integrity": "sha512-cbC5H9iTDV9H7sMxK5rUm18UbdVPNTPqgdzmQAkOUP3YLysgDWLZaysVAfylK49rgTlzL01a6tXyq9rCb3yLhQ==", - "dev": true, - "requires": { - "chokidar": "^2.0.4", - "commander": "^2.8.1", - "convert-source-map": "^1.1.0", - "fs-readdir-recursive": "^1.1.0", - "glob": "^7.0.0", - "lodash": "^4.17.11", - "mkdirp": "^0.5.1", - "output-file-sync": "^2.0.0", - "slash": "^2.0.0", - "source-map": "^0.5.0" - } - }, - "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/core": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.3.tgz", - "integrity": "sha512-oDpASqKFlbspQfzAE7yaeTmdljSH2ADIvBlb0RwbStltTuWa0+7CCI1fYVINNv9saHPa1W7oaKeuNuKj+RQCvA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.0", - "@babel/helpers": "^7.4.3", - "@babel/parser": "^7.4.3", - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0", - "convert-source-map": "^1.1.0", - "debug": "^4.1.0", - "json5": "^2.1.0", - "lodash": "^4.17.11", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "@babel/generator": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", - "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==", - "dev": true, - "requires": { - "@babel/types": "^7.4.0", - "jsesc": "^2.5.1", - "lodash": "^4.17.11", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - } - }, - "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", - "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==", - "dev": true - }, - "@babel/helper-split-export-declaration": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz", - "integrity": "sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==", - "dev": true, - "requires": { - "@babel/types": "^7.4.0" - } - }, - "@babel/helpers": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.3.tgz", - "integrity": "sha512-BMh7X0oZqb36CfyhvtbSmcWc3GXocfxv3yNsAEuM0l+fAqSO22rQrUpijr3oE/10jCTrB6/0b9kzmG4VetCj8Q==", - "dev": true, - "requires": { - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0" - } - }, - "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - } - }, - "@babel/node": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/node/-/node-7.2.2.tgz", - "integrity": "sha512-jPqgTycE26uFsuWpLika9Ohz9dmLQHWjOnMNxBOjYb1HXO+eLKxEr5FfKSXH/tBvFwwaw+pzke3gagnurGOfCA==", - "dev": true, - "requires": { - "@babel/polyfill": "^7.0.0", - "@babel/register": "^7.0.0", - "commander": "^2.8.1", - "lodash": "^4.17.10", - "v8flags": "^3.1.1" - } - }, - "@babel/parser": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.3.tgz", - "integrity": "sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ==", - "dev": true - }, - "@babel/plugin-transform-destructuring": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.3.tgz", - "integrity": "sha512-rVTLLZpydDFDyN4qnXdzwoVpk1oaXHIvPEOkOLyr88o7oHxVc/LyrnDx+amuBWGOwUb7D1s/uLsKBNTx08htZg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-strict-mode": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-strict-mode/-/plugin-transform-strict-mode-7.2.0.tgz", - "integrity": "sha512-BJ5BF9+9zWTVCLe+nfLSfHUC0V/ly+ipMxVUdFjwlHFJ+Ue8WudbNh0ddzN0NnAQX5Kg0uk+DgRoGOJdnfNJgg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/polyfill": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.4.3.tgz", - "integrity": "sha512-rkv8WIvJshA5Ev8iNMGgz5WZkRtgtiPexiT7w5qevGTuT7ZBfM3de9ox1y9JR5/OXb/sWGBbWlHNa7vQKqku3Q==", - "requires": { - "core-js": "^2.6.5", - "regenerator-runtime": "^0.13.2" - } - }, - "@babel/register": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.4.0.tgz", - "integrity": "sha512-ekziebXBnS/7V6xk8sBfLSSD6YZuy6P29igBtR6OL/tswKdxOV+Yqq0nzICMguVYtGRZYUCGpfGV8J9Za2iBdw==", - "dev": true, - "requires": { - "core-js": "^3.0.0", - "find-cache-dir": "^2.0.0", - "lodash": "^4.17.11", - "mkdirp": "^0.5.1", - "pirates": "^4.0.0", - "source-map-support": "^0.5.9" - }, - "dependencies": { - "core-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.0.1.tgz", - "integrity": "sha512-sco40rF+2KlE0ROMvydjkrVMMG1vYilP2ALoRXcYR4obqbYIuV3Bg+51GEDW+HF8n7NRA+iaA4qD0nD9lo9mew==", - "dev": true - } - } - }, - "@babel/template": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.0.tgz", - "integrity": "sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.4.0", - "@babel/types": "^7.4.0" - } - }, - "@babel/traverse": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.3.tgz", - "integrity": "sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.0", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/types": "^7.4.0", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.11" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", - "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.11", - "to-fast-properties": "^2.0.0" - } - }, - "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", - "dev": true - }, - "acorn-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", - "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", - "dev": true - }, - "ajv": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", - "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true - }, - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "optional": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "optional": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true, - "optional": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true, - "optional": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true, - "optional": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true, - "optional": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true, - "optional": true - }, - "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true - }, - "async-each": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", - "dev": true, - "optional": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true, - "optional": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "optional": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "optional": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "optional": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "optional": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "optional": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, - "chokidar": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz", - "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==", - "dev": true, - "optional": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "optional": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "cli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", - "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=", - "dev": true, - "requires": { - "exit": "0.1.2", - "glob": "^7.1.1" - } - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "optional": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true, - "optional": true - }, - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true, - "optional": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "optional": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", - "dev": true, - "requires": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" - }, - "dependencies": { - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", - "dev": true - } - } - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "domhandler": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", - "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "entities": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", - "dev": true - }, - "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.0", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" - } - }, - "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "eslint": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", - "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.9.1", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^4.0.3", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^5.0.1", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", - "js-yaml": "^3.13.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.11", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", - "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", - "dev": true - }, - "eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", - "dev": true - }, - "espree": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", - "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", - "dev": true, - "requires": { - "acorn": "^6.0.7", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", - "dev": true, - "requires": { - "estraverse": "^4.0.0" - } - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", - "dev": true - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "optional": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "optional": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "optional": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "optional": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "external-editor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", - "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "optional": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "optional": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "optional": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", - "dev": true, - "requires": { - "flat-cache": "^2.0.1" - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "optional": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "optional": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - }, - "dependencies": { - "is-buffer": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", - "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", - "dev": true - } - } - }, - "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", - "dev": true, - "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" - } - }, - "flatted": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", - "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", - "dev": true - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true, - "optional": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "optional": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fs-readdir-recursive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", - "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.8.tgz", - "integrity": "sha512-tPvHgPGB7m40CZ68xqFGkKuzN+RnpGmSV+hgeKxhRpbxdqKXUFJGC3yonBOLzQBcJyGpdZFDfCsdOC2KFsXzeA==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.3.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^4.1.0", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true, - "optional": true - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "optional": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "optional": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "globals": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", - "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", - "dev": true - }, - "gonzales-pe": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.2.4.tgz", - "integrity": "sha512-v0Ts/8IsSbh9n1OJRnSfa7Nlxi4AkXIsWB6vPept8FDbL4bXn3FNuxjYtO/nmBGu7GDkL9MFeGebeSu6l55EPQ==", - "requires": { - "minimist": "1.1.x" - }, - "dependencies": { - "minimist": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz", - "integrity": "sha1-O+39kaktOQFvz6ocaB6Pqhoe/ag=" - } - } - }, - "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", - "dev": true - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "optional": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "optional": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "optional": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "htmlparser2": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", - "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", - "dev": true, - "requires": { - "domelementtype": "1", - "domhandler": "2.3", - "domutils": "1.5", - "entities": "1.0", - "readable-stream": "1.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, - "import-fresh": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", - "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "inquirer": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", - "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", - "dev": true, - "requires": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.11", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "optional": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "optional": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true, - "optional": true - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "optional": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "optional": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "optional": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true, - "optional": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "optional": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "optional": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "optional": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, - "requires": { - "has": "^1.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", - "dev": true, - "requires": { - "has-symbols": "^1.0.0" - } - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "optional": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true, - "optional": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "optional": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "jshint": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.10.2.tgz", - "integrity": "sha512-e7KZgCSXMJxznE/4WULzybCMNXNAd/bf5TSrvVEq78Q/K8ZwFpmBqQeDtNiHc3l49nV4E/+YeHU/JZjSUIrLAA==", - "dev": true, - "requires": { - "cli": "~1.0.0", - "console-browserify": "1.1.x", - "exit": "0.1.x", - "htmlparser2": "3.8.x", - "lodash": "~4.17.11", - "minimatch": "~3.0.2", - "shelljs": "0.3.x", - "strip-json-comments": "1.0.x" - }, - "dependencies": { - "strip-json-comments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", - "dev": true - } - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "json5": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", - "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true, - "optional": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", - "dev": true - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true, - "optional": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "optional": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - }, - "dependencies": { - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - } - } - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "optional": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "optional": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "optional": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } - } - }, - "mocha": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.1.3.tgz", - "integrity": "sha512-QdE/w//EPHrqgT5PNRUjRVHy6IJAzAf1R8n2O8W8K2RZ+NbPfOD5cBDp+PGa2Gptep37C/TdBiaNwakppEzEbg==", - "dev": true, - "requires": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.0", - "log-symbols": "2.2.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "ms": "2.1.1", - "node-environment-flags": "1.0.5", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.2.2", - "yargs-parser": "13.0.0", - "yargs-unparser": "1.5.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "js-yaml": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz", - "integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true, - "optional": true - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "nan": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", - "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "optional": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node-environment-flags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", - "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - } - }, - "node-modules-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", - "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", - "dev": true - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "optional": true - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "optional": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "optional": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "optional": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "optional": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - } - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "output-file-sync": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-2.0.1.tgz", - "integrity": "sha512-mDho4qm7WgIXIGf4eYU1RHN2UU5tPfVYVSRwDJw0uTmj35DQUt/eNp19N7v6T3SrR0ESTEf2up2CGO73qI35zQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "is-plain-obj": "^1.1.0", - "mkdirp": "^0.5.1" - } - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", - "dev": true - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true, - "optional": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true, - "optional": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "pirates": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", - "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", - "dev": true, - "requires": { - "node-modules-regexp": "^1.0.0" - } - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true, - "optional": true - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true, - "optional": true - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "regenerator-runtime": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", - "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "optional": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", - "dev": true - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true, - "optional": true - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true, - "optional": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true, - "optional": true - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "resolve": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true, - "optional": true - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true, - "optional": true - }, - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "rxjs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", - "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "optional": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, - "optional": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "optional": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "shelljs": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", - "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - } - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "optional": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "optional": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "optional": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "optional": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "optional": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, - "optional": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.5.12", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", - "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true, - "optional": true - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "optional": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "optional": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "optional": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "table": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/table/-/table-5.2.3.tgz", - "integrity": "sha512-N2RsDAMvDLvYwFcwbPyF3VmVSSkuF+G1e+8inhBLtHpvwXGw4QRPEZhihQNeEN0i1up6/f6ObCJXNdlRG3YVyQ==", - "dev": true, - "requires": { - "ajv": "^6.9.1", - "lodash": "^4.17.11", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "optional": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "optional": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "optional": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "dev": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, - "optional": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "optional": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "optional": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "optional": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "optional": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "optional": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true, - "optional": true - } - } - }, - "upath": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", - "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==", - "dev": true, - "optional": true - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true, - "optional": true - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true, - "optional": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true, - "optional": true - }, - "uuid": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", - "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=" - }, - "v8flags": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.2.tgz", - "integrity": "sha512-MtivA7GF24yMPte9Rp/BWGCYQNaUj86zeYxV/x2RRJMKagImbbv3u8iJC57lNhWLPcGLJmHcHmFWkNsplbbLWw==", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "vow": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/vow/-/vow-0.4.19.tgz", - "integrity": "sha512-S+0+CiQlbUhTNWMlJdqo/ARuXOttXdvw5ACGyh1W97NFHUdwt3Fzyaus03Kvdmo733dwnYS9AGJSDg0Zu8mNfA==" - }, - "vow-fs": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/vow-fs/-/vow-fs-0.3.6.tgz", - "integrity": "sha1-LUxZviLivyYY3fWXq0uqkjvnIA0=", - "requires": { - "glob": "^7.0.5", - "uuid": "^2.0.2", - "vow": "^0.4.7", - "vow-queue": "^0.4.1" - } - }, - "vow-queue": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/vow-queue/-/vow-queue-0.4.3.tgz", - "integrity": "sha512-/poAKDTFL3zYbeQg7cl4BGcfP4sGgXKrHnRFSKj97dteUFu8oyXMwIcdwu8NSx/RmPGIuYx1Bik/y5vU4H/VKw==", - "requires": { - "vow": "^0.4.17" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, - "yargs": { - "version": "13.2.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz", - "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "os-locale": "^3.1.0", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "yargs-parser": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz", - "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "yargs-unparser": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz", - "integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==", - "dev": true, - "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.11", - "yargs": "^12.0.5" - }, - "dependencies": { - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - } - } -} diff --git a/scripts/build.sh b/scripts/build.sh deleted file mode 100755 index bbfd5f36..00000000 --- a/scripts/build.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -printf "\n\ ------------------------\n\ - Building source files\n\ ------------------------\n\n" -./node_modules/.bin/babel --plugins @babel/plugin-transform-destructuring --loose all src --out-dir lib diff --git a/scripts/coverage.sh b/scripts/coverage.sh deleted file mode 100755 index d0200e61..00000000 --- a/scripts/coverage.sh +++ /dev/null @@ -1 +0,0 @@ -rm -rf lib-cov && jscoverage lib lib-cov && TEST_COV=true node test/mocha > ./test/test-coverage.html diff --git a/scripts/test.sh b/scripts/test.sh deleted file mode 100755 index 1948c810..00000000 --- a/scripts/test.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -EXIT_CODE=0 - -function test { - "$@" - if [ $? -ne 0 ]; then - EXIT_CODE=1 - fi -} - -# Run linters -printf "\n\ -----------------\n\ - Running JSHint\n\ -----------------\n\n" -test ./node_modules/.bin/jshint ./src - -# Run tests -printf "\n\ ----------------\n\ - Running Mocha\n\ ----------------\n\n" -test ./node_modules/.bin/babel-node --plugins @babel/plugin-transform-strict-mode ./test/mocha - -if [ $EXIT_CODE -ne 0 ]; then -printf "\n\ -----------------------------------------------------\n\ - Please, fix errors shown above and run tests again\n\ -----------------------------------------------------\n" -else -printf "\n\ -------------------------\n\ - Everything looks fine!\n\ -------------------------\n" -fi - -exit $EXIT_CODE diff --git a/scripts/watch.sh b/scripts/watch.sh deleted file mode 100755 index 2a237f9e..00000000 --- a/scripts/watch.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -printf "\n\ ------------------------\n\ - Watching source files\n\ ------------------------\n\n" - -./node_modules/.bin/babel --loose all --watch src --out-dir lib diff --git a/src/options/quotes.js b/src/options/quotes.js deleted file mode 100644 index 3e591783..00000000 --- a/src/options/quotes.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -module.exports = { - name: 'quotes', - - syntax: ['css', 'less', 'sass', 'scss'], - - accepts: { - string: /^single|double$/ - }, - - /** - * Processes tree node. - * @param {node} ast - */ - process: function(ast) { - let value = this.value; - - ast.traverseByType('string', function(string) { - if (string.content[0] === '"' && value === 'single') { - string.content = string.content - // Unescape all escaped double quotes - .replace(/\\"/g, '"') - // Escape all the single quotes - .replace(/([^\\])'/g, '$1\\\'') - // Replace the first and the last quote - .replace(/^"|"$/g, '\''); - } else if (string.content[0] === '\'' && value === 'double') { - string.content = string.content - // Unescape all escaped single quotes - .replace(/\\'/g, '\'') - // Escape all the double quotes - .replace(/([^\\])"/g, '$1\\\"') - // Replace the first and the last quote - .replace(/^'|'$/g, '"'); - } - }); - }, - - /** - * Detects the value of an option at the tree node. - * - * @param {node} ast - */ - detect: function(ast) { - let detected = []; - - ast.traverseByType('string', function(string) { - if (string.content[0] === '"') { - detected.push('double'); - } else if (string.content[0] === '\'') { - detected.push('single'); - } - }); - - return detected; - } -}; diff --git a/test/core/configure/test.js b/test/core/configure/test.js deleted file mode 100644 index 4743df40..00000000 --- a/test/core/configure/test.js +++ /dev/null @@ -1,47 +0,0 @@ -let Comb = process.env.TEST_COV ? - require('../../../lib-cov/csscomb') : - require('../../../lib/csscomb'); -let assert = require('assert'); - -describe('CSScomb#configure', function() { - it('Passing no config to constructor should not configure anything', function() { - let comb = new Comb(); - assert.equal(undefined, comb._handlers); - }); - - it('Passing valid config name to constructor should configure using correct config', function() { - let comb = new Comb('zen'); - let input = 'a { color: tomato; top: 0; }'; - let expected = 'a {top: 0; color: tomato; }'; - return comb.processString(input).then(function(output) { - assert.equal(expected, output); - }); - }); - - it('Passing config object to constructor should configure using that object', function() { - let comb = new Comb({ 'always-semicolon': true }); - let input = 'a { color: tomato }'; - let expected = 'a { color: tomato; }'; - return comb.processString(input).then(function(actual) { - assert.equal(actual, expected); - }); - }); - - it('new Comb() should be chainable', function() { - let input = 'a { color: tomato; top: 0; }'; - let expected = 'a {top: 0; color: tomato; }'; - return (new Comb('zen')).processString(input).then(output => { - assert.equal(expected, output); - }); - }); - - it('configure() should be chainable', function() { - let input = 'a { color: tomato }'; - let expected = 'a { color: tomato; }'; - return (new Comb()).configure({ 'always-semicolon': true }) - .processString(input) - .then(actual => { - assert.equal(actual, expected); - }); - }); -}); diff --git a/test/core/core_test.js b/test/core/core_test.js deleted file mode 100644 index 4384753d..00000000 --- a/test/core/core_test.js +++ /dev/null @@ -1,54 +0,0 @@ -let assert = require('assert'); -let fs = require('fs'); -let path = require('path'); - -let Comb = require('../../lib/csscomb'); - -class CoreTest { - constructor(context, config) { - this.file = context.test.file; - this.syntax = context.test.parent.title; - - this.Comb = Comb; - this.comb = new Comb(); - if (config) this.comb.configure(config); - } - - useConfig(name) { - let config = Comb.getConfig(name); - this.comb.configure(config); - } - - getErrors(filename) { - let input = this.readFile(filename); - return this.comb.lintString(input, {syntax: this.syntax}); - } - - shouldBeEqual(inputFile, expectedFile) { - let input = this.readFile(inputFile); - let expected = expectedFile ? this.readFile(expectedFile) : input; - - return this.comb.processString(input, {syntax: this.syntax}) - .then(string => assert.equal(string, expected)); - } - - /** - * Detect options in a file and compare result with expected. - * File names should be relative to test suite's folder. - * @param {Array} options List of options that should be detected - * @param {String} input Name of template file - * @param {Object} expected Expected config with detected options - */ - shouldDetect(options, input, expected) { - let detectedConfig = Comb.detectInString(input, options); - assert.deepEqual(detectedConfig, expected); - } - - readFile(filename) { - let dirname = path.dirname(this.file); - let filePath = path.join(dirname, filename); - return fs.readFileSync(filePath, 'utf8'); - } -} - -module.exports = CoreTest; diff --git a/test/core/css/test.js b/test/core/css/test.js deleted file mode 100644 index a3bbbb93..00000000 --- a/test/core/css/test.js +++ /dev/null @@ -1,11 +0,0 @@ -const Test = require('../core_test'); - -describe('css', function() { - it('Should parse variables', function() { - const test = new Test(this); - - test.comb.configure({}); - - return test.shouldBeEqual('variable.css'); - }); -}); diff --git a/test/core/css/variable.css b/test/core/css/variable.css deleted file mode 100644 index dd6becf9..00000000 --- a/test/core/css/variable.css +++ /dev/null @@ -1,3 +0,0 @@ -div { - --color: red; -} diff --git a/test/core/get-config/test.js b/test/core/get-config/test.js deleted file mode 100644 index 8db70a2f..00000000 --- a/test/core/get-config/test.js +++ /dev/null @@ -1,63 +0,0 @@ -var assert = require('assert'); -let Test = require('../core_test'); - -describe('csscomb methods', function() { - it('getConfig()', function() { - let test = new Test(this); - var config = require('../../../config/csscomb.json'); - - assert.equal(test.Comb.getConfig(), config); - }); - - it('getConfig(number)', function() { - let test = new Test(this); - - assert.throws(function() { - test.Comb.getConfig(16); - }); - }); - - it('getConfig(boolean)', function() { - let test = new Test(this); - - assert.throws(function() { - test.Comb.getConfig(true); - }); - }); - - it('getConfig(empty string)', function() { - let test = new Test(this); - var config = require('../../../config/csscomb.json'); - - assert.equal(test.Comb.getConfig(''), config); - }); - - it('getConfig(invalid string)', function() { - let test = new Test(this); - - assert.throws(function() { - test.Comb.getConfig('nani'); - }); - }); - - it('getConfig(csscomb)', function() { - let test = new Test(this); - var config = require('../../../config/csscomb.json'); - - assert.equal(test.Comb.getConfig('csscomb'), config); - }); - - it('getConfig(zen)', function() { - let test = new Test(this); - var config = require('../../../config/zen.json'); - - assert.equal(test.Comb.getConfig('zen'), config); - }); - - it('getConfig(yandex)', function() { - let test = new Test(this); - var config = require('../../../config/yandex.json'); - - assert.equal(test.Comb.getConfig('yandex'), config); - }); -}); diff --git a/test/core/less/import.less b/test/core/less/import.less deleted file mode 100644 index 8faa1263..00000000 --- a/test/core/less/import.less +++ /dev/null @@ -1,4 +0,0 @@ -div { - @import "foo.css"; - top: 0; -} diff --git a/test/core/less/interpolated-variable-1.less b/test/core/less/interpolated-variable-1.less deleted file mode 100644 index b0bc3148..00000000 --- a/test/core/less/interpolated-variable-1.less +++ /dev/null @@ -1,4 +0,0 @@ -div.@{nani} { - color:tomato; - top:0; -} diff --git a/test/core/less/interpolated-variable-2.less b/test/core/less/interpolated-variable-2.less deleted file mode 100644 index 18a66ed2..00000000 --- a/test/core/less/interpolated-variable-2.less +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: @{tomato}; - top:0; -} diff --git a/test/core/less/mixin.less b/test/core/less/mixin.less deleted file mode 100644 index 7e95951f..00000000 --- a/test/core/less/mixin.less +++ /dev/null @@ -1,4 +0,0 @@ -div { - .mixin; - top: 0; -} diff --git a/test/core/less/nested-media.less b/test/core/less/nested-media.less deleted file mode 100644 index 346ddbf4..00000000 --- a/test/core/less/nested-media.less +++ /dev/null @@ -1,6 +0,0 @@ -div { - @media screen and (orientation: landscape) { - color: tomato; - } - top: 0; -} diff --git a/test/core/less/nested-rule.less b/test/core/less/nested-rule.less deleted file mode 100644 index 5f74a2d9..00000000 --- a/test/core/less/nested-rule.less +++ /dev/null @@ -1,6 +0,0 @@ -div { - color: tomato; - a { - top: 0; - } -} diff --git a/test/core/less/operation.less b/test/core/less/operation.less deleted file mode 100644 index a3711aa3..00000000 --- a/test/core/less/operation.less +++ /dev/null @@ -1,8 +0,0 @@ -div { - @base: 5%; - @filler: @base * 2; - @other: @base + @filler; - color: #888 / 4; - background-color: @base-color + #111; - height: 100% / 2 + @filler; -} diff --git a/test/core/less/parent-selector.less b/test/core/less/parent-selector.less deleted file mode 100644 index 61760301..00000000 --- a/test/core/less/parent-selector.less +++ /dev/null @@ -1,8 +0,0 @@ -div { - color: tomato; - &.top { - color: nani; - top: 0; - } - left: 0; -} diff --git a/test/core/less/test.js b/test/core/less/test.js deleted file mode 100644 index 72a54eb4..00000000 --- a/test/core/less/test.js +++ /dev/null @@ -1,66 +0,0 @@ -let Test = require('../core_test'); - -describe('less', function() { - it('Should parse nested rules', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('nested-rule.less'); - }); - - it('Should parse operations', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('operation.less'); - }); - - it('Should parse parent selector &', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('parent-selector.less'); - }); - - it('Should parse variables', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('variable.less'); - }); - - it('Should parse interpolated variables inside selectors', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('interpolated-variable-1.less'); - }); - - it('Should parse interpolated variables inside values', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('interpolated-variable-2.less'); - }); - - it('Should parse @import', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('import.less'); - }); - - it('Should parse included mixins', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('mixin.less'); - }); - - it('Should parse nested @media', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('nested-media.less'); - }); -}); diff --git a/test/core/less/variable.less b/test/core/less/variable.less deleted file mode 100644 index 8eba0cc3..00000000 --- a/test/core/less/variable.less +++ /dev/null @@ -1,5 +0,0 @@ -@red: tomato; -div { - color: @tomato; - top: @@foo; -} diff --git a/test/core/scss/content.scss b/test/core/scss/content.scss deleted file mode 100644 index 6852bccf..00000000 --- a/test/core/scss/content.scss +++ /dev/null @@ -1,5 +0,0 @@ -@mixin nani { - a { - @content; - } -} diff --git a/test/core/scss/default.scss b/test/core/scss/default.scss deleted file mode 100644 index 12c10f9f..00000000 --- a/test/core/scss/default.scss +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato !default; - top: 0; -} diff --git a/test/core/scss/each.scss b/test/core/scss/each.scss deleted file mode 100644 index af596e68..00000000 --- a/test/core/scss/each.scss +++ /dev/null @@ -1,7 +0,0 @@ -div { - @each $animal in puma, sea-slug, erget { - .#{$animal}-icon { - background-image: url("/images/#{$animal}.png"); - } - } -} diff --git a/test/core/scss/empty.scss b/test/core/scss/empty.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/test/core/scss/extend-1.scss b/test/core/scss/extend-1.scss deleted file mode 100644 index c72afeac..00000000 --- a/test/core/scss/extend-1.scss +++ /dev/null @@ -1,4 +0,0 @@ -div { - @extend .nani; - top: 0; -} diff --git a/test/core/scss/extend-2.scss b/test/core/scss/extend-2.scss deleted file mode 100644 index c7bf3b58..00000000 --- a/test/core/scss/extend-2.scss +++ /dev/null @@ -1,4 +0,0 @@ -div { - @extend %nani; - top: 0; -} diff --git a/test/core/scss/for.scss b/test/core/scss/for.scss deleted file mode 100644 index 64ff25aa..00000000 --- a/test/core/scss/for.scss +++ /dev/null @@ -1,7 +0,0 @@ -div { - @for $i from 1 through 3 { - .item-#{$i} { - width: 2em * 1; - } - } -} diff --git a/test/core/scss/function.scss b/test/core/scss/function.scss deleted file mode 100644 index 8fcce438..00000000 --- a/test/core/scss/function.scss +++ /dev/null @@ -1,3 +0,0 @@ -@function nani($n) { - @return $n * 2; -} diff --git a/test/core/scss/if-else-if.scss b/test/core/scss/if-else-if.scss deleted file mode 100644 index f16e287d..00000000 --- a/test/core/scss/if-else-if.scss +++ /dev/null @@ -1,7 +0,0 @@ -div { - @if $type == ocean { - top: 0; - } @else if $type == monster { - left: 0; - } -} diff --git a/test/core/scss/if-else.scss b/test/core/scss/if-else.scss deleted file mode 100644 index 236a6217..00000000 --- a/test/core/scss/if-else.scss +++ /dev/null @@ -1,7 +0,0 @@ -div { - @if $type == ocean { - top: 0; - } @else { - left: 0; - } -} diff --git a/test/core/scss/if.scss b/test/core/scss/if.scss deleted file mode 100644 index af9f4856..00000000 --- a/test/core/scss/if.scss +++ /dev/null @@ -1,5 +0,0 @@ -div { - @if $type == ocean { - top: 0; - } -} diff --git a/test/core/scss/import.scss b/test/core/scss/import.scss deleted file mode 100644 index 8faa1263..00000000 --- a/test/core/scss/import.scss +++ /dev/null @@ -1,4 +0,0 @@ -div { - @import "foo.css"; - top: 0; -} diff --git a/test/core/scss/include.scss b/test/core/scss/include.scss deleted file mode 100644 index 2c918808..00000000 --- a/test/core/scss/include.scss +++ /dev/null @@ -1,4 +0,0 @@ -div { - @include nani($panda); - top: 0; -} diff --git a/test/core/scss/interpolated-variable-1.scss b/test/core/scss/interpolated-variable-1.scss deleted file mode 100644 index a6c28cf4..00000000 --- a/test/core/scss/interpolated-variable-1.scss +++ /dev/null @@ -1,4 +0,0 @@ -div.#{$nani} { - color: tomato; - top:0; -} diff --git a/test/core/scss/interpolated-variable-2.scss b/test/core/scss/interpolated-variable-2.scss deleted file mode 100644 index a19498f5..00000000 --- a/test/core/scss/interpolated-variable-2.scss +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: #{$tomato}; - top: 0; -} diff --git a/test/core/scss/mixin-1.scss b/test/core/scss/mixin-1.scss deleted file mode 100644 index 32a77150..00000000 --- a/test/core/scss/mixin-1.scss +++ /dev/null @@ -1,6 +0,0 @@ -@mixin nani { - color: tomato; -} -.foo { - @include nani; -} diff --git a/test/core/scss/mixin-2.scss b/test/core/scss/mixin-2.scss deleted file mode 100644 index b779b6de..00000000 --- a/test/core/scss/mixin-2.scss +++ /dev/null @@ -1,6 +0,0 @@ -@mixin nani($tomato) { - color: $tomato; -} -.foo { - @include nani(red); -} diff --git a/test/core/scss/mixin-3.scss b/test/core/scss/mixin-3.scss deleted file mode 100644 index 2c19b358..00000000 --- a/test/core/scss/mixin-3.scss +++ /dev/null @@ -1,6 +0,0 @@ -@mixin nani($shadows...) { - box-shadow: $shadows; -} -.foo { - @include nani(0px 4px 5px #666, 2px 6px 10px #999); -} diff --git a/test/core/scss/mixin-4.scss b/test/core/scss/mixin-4.scss deleted file mode 100644 index 4e46ffed..00000000 --- a/test/core/scss/mixin-4.scss +++ /dev/null @@ -1,6 +0,0 @@ -.foo { - @include nani { - color: tomato; - top: 0 - } -} diff --git a/test/core/scss/nested-media.scss b/test/core/scss/nested-media.scss deleted file mode 100644 index 346ddbf4..00000000 --- a/test/core/scss/nested-media.scss +++ /dev/null @@ -1,6 +0,0 @@ -div { - @media screen and (orientation: landscape) { - color: tomato; - } - top: 0; -} diff --git a/test/core/scss/nested-property.scss b/test/core/scss/nested-property.scss deleted file mode 100644 index 2f6384a3..00000000 --- a/test/core/scss/nested-property.scss +++ /dev/null @@ -1,8 +0,0 @@ -div { - color: tomato; - font: 2px/3px { - family: fantasy; - size: 30em; - } - left: 0; -} diff --git a/test/core/scss/nested-rule.scss b/test/core/scss/nested-rule.scss deleted file mode 100644 index 5f74a2d9..00000000 --- a/test/core/scss/nested-rule.scss +++ /dev/null @@ -1,6 +0,0 @@ -div { - color: tomato; - a { - top: 0; - } -} diff --git a/test/core/scss/parent-selector.scss b/test/core/scss/parent-selector.scss deleted file mode 100644 index 61760301..00000000 --- a/test/core/scss/parent-selector.scss +++ /dev/null @@ -1,8 +0,0 @@ -div { - color: tomato; - &.top { - color: nani; - top: 0; - } - left: 0; -} diff --git a/test/core/scss/test.js b/test/core/scss/test.js deleted file mode 100644 index 06c50d67..00000000 --- a/test/core/scss/test.js +++ /dev/null @@ -1,186 +0,0 @@ -let Test = require('../core_test'); - -describe('scss', function() { - it('Should parse nested rules', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('nested-rule.scss'); - }); - - it('Should parse parent selector &', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('parent-selector.scss'); - }); - - it('Should parse nested properties', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('nested-property.scss'); - }); - - it('Should parse variables', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('variable.scss'); - }); - - it('Should parse interpolated variables inside selectors', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('interpolated-variable-1.scss'); - }); - - it('Should parse interpolated variables inside values', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('interpolated-variable-2.scss'); - }); - - it('Should parse defaults', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('default.scss'); - }); - - it('Should parse @import', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('import.scss'); - }); - - it('Should parse @include', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('include.scss'); - }); - - it('Should parse nested @media', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('nested-media.scss'); - }); - - it('Should parse @extend with classes', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('extend-1.scss'); - }); - - it('Should parse @extend with placeholders', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('extend-2.scss'); - }); - - it('Should parse @warn', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('warn.scss'); - }); - - it('Should parse @if', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('if.scss'); - }); - - it('Should parse @if and @else', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('if-else.scss'); - }); - - it('Should parse @if and @else if', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('if-else-if.scss'); - }); - - it('Should parse @for', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('for.scss'); - }); - - it('Should parse @each', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('each.scss'); - }); - - it('Should parse @while', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('while.scss'); - }); - - it('Should parse mixins', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('mixin-1.scss'); - }); - - it('Should parse passing several variables to a mixin', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('mixin-2.scss'); - }); - - it('Should parse passing a list of variables to a mixin', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('mixin-3.scss'); - }); - - it('Should parse passing a content block to a mixin', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('mixin-4.scss'); - }); - - it('Should parse @content', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('content.scss'); - }); - - it('Should parse an empty file', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('empty.scss'); - }); - - it('Should parse functions', function() { - let test = new Test(this); - test.comb.configure({}); - - return test.shouldBeEqual('function.scss'); - }); -}); - diff --git a/test/core/scss/variable.scss b/test/core/scss/variable.scss deleted file mode 100644 index d553b927..00000000 --- a/test/core/scss/variable.scss +++ /dev/null @@ -1,4 +0,0 @@ -$red: tomato; -div { - color: $tomato; -} diff --git a/test/core/scss/warn.scss b/test/core/scss/warn.scss deleted file mode 100644 index c7961a18..00000000 --- a/test/core/scss/warn.scss +++ /dev/null @@ -1,4 +0,0 @@ -div { - @warn "nani"; - top: 0; -} diff --git a/test/core/scss/while.scss b/test/core/scss/while.scss deleted file mode 100644 index 89c6cfa5..00000000 --- a/test/core/scss/while.scss +++ /dev/null @@ -1,8 +0,0 @@ -div { - @while $i > 6 { - .item { - width: 2em * $i; - } - $i: $i - 2; - } -} diff --git a/test/core/use/test.js b/test/core/use/test.js deleted file mode 100644 index 1d3a9aa7..00000000 --- a/test/core/use/test.js +++ /dev/null @@ -1,42 +0,0 @@ -var assert = require('assert'); -let Test = require('../core_test'); - -describe('.use()', function() { - it('Should set predefined options in correct order', function() { - let test = new Test(this); - var config = test.Comb.getConfig('csscomb'); - test.comb.configure(config); - var options = test.comb.plugins.map(function(plugin) { - return plugin.name; - }); - var expected = [ - 'always-semicolon', - 'lines-between-rulesets', - 'remove-empty-rulesets', - 'color-case', - 'color-shorthand', - 'element-case', - 'eof-newline', - 'leading-zero', - 'quotes', - 'sort-order-fallback', - 'space-after-colon', - 'space-after-combinator', - 'space-after-opening-brace', - 'space-after-selector-delimiter', - 'space-before-colon', - 'space-before-combinator', - 'space-before-opening-brace', - 'space-before-selector-delimiter', - 'space-between-declarations', - 'block-indent', - 'sort-order', - 'strip-spaces', - 'space-before-closing-brace', - 'unitless-zero', - 'tab-size', - 'vendor-prefix-align' - ]; - assert.deepEqual(options, expected); - }); -}); diff --git a/test/mocha.js b/test/mocha.js deleted file mode 100644 index 98e0ee7b..00000000 --- a/test/mocha.js +++ /dev/null @@ -1,17 +0,0 @@ -let glob = require('glob'); -let Mocha = require('mocha'); - -let mocha = new Mocha(); -if (process.env.TEST_COV) mocha.reporter('html-cov'); - -// Tell mocha which tests to run: -glob.sync('test/**/test.js').forEach(file => { - mocha.addFile(file); -}); - -mocha.run(failures => { - process.on('exit', () => { - process.exit(failures); - }); -}); - diff --git a/test/options/always-semicolon/detect/css/test-1.css b/test/options/always-semicolon/detect/css/test-1.css deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/always-semicolon/detect/css/test-1.expected.css b/test/options/always-semicolon/detect/css/test-1.expected.css deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/always-semicolon/detect/css/test-2.css b/test/options/always-semicolon/detect/css/test-2.css deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/always-semicolon/detect/css/test-2.expected.css b/test/options/always-semicolon/detect/css/test-2.expected.css deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/always-semicolon/detect/css/test-3.css b/test/options/always-semicolon/detect/css/test-3.css deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/always-semicolon/detect/css/test-3.expected.css b/test/options/always-semicolon/detect/css/test-3.expected.css deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/always-semicolon/detect/css/test-4.css b/test/options/always-semicolon/detect/css/test-4.css deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/always-semicolon/detect/css/test-4.expected.css b/test/options/always-semicolon/detect/css/test-4.expected.css deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/always-semicolon/detect/css/test-5.css b/test/options/always-semicolon/detect/css/test-5.css deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/always-semicolon/detect/css/test-5.expected.css b/test/options/always-semicolon/detect/css/test-5.expected.css deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/always-semicolon/detect/css/test-6.css b/test/options/always-semicolon/detect/css/test-6.css deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/always-semicolon/detect/css/test-6.expected.css b/test/options/always-semicolon/detect/css/test-6.expected.css deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/always-semicolon/detect/css/test-7.css b/test/options/always-semicolon/detect/css/test-7.css deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/always-semicolon/detect/css/test-7.expected.css b/test/options/always-semicolon/detect/css/test-7.expected.css deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/always-semicolon/detect/test.js b/test/options/always-semicolon/detect/test.js deleted file mode 100644 index 6d22001a..00000000 --- a/test/options/always-semicolon/detect/test.js +++ /dev/null @@ -1,72 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `always-semicolon`, detect', function() { - describe('css', function() { - it('Should detect semicolon for last property. Test 1', function() { - let test = new Test(this); - test.shouldDetect( - ['always-semicolon'], - 'div { height: 0 }', - {'always-semicolon': false} - ); - }); - - it('Should detect semicolon for last property. Test 2', function() { - let test = new Test(this); - test.shouldDetect( - ['always-semicolon'], - 'div { height: 0; }', - {'always-semicolon': true} - ); - }); - - it('Should detect semicolon for last property. Test 3', function() { - let test = new Test(this); - test.shouldDetect( - ['always-semicolon'], - 'div { height: 0; } div { height: 0 }', - {'always-semicolon': true} - ); - }); - - it('Should detect semicolon for last property. Test 4', function() { - let test = new Test(this); - test.shouldDetect( - ['always-semicolon'], - 'div { height: 0 } div { height: 0; } div { height: 0 }', - {'always-semicolon': false} - ); - }); - - it('Should detect semicolon for last property. Test 5', function() { - let test = new Test(this); - test.shouldDetect( - ['always-semicolon'], - 'div {\nheight: 0 /* Comment */\n} ' + - 'div { height: 0; }' + - 'div {\ntop: 1px;\nheight: 0 /* 1comment */ /* 2comment */\n}', - {'always-semicolon': false} - ); - }); - - - it('Should detect semicolon for last property. Test 6', function() { - let test = new Test(this); - test.shouldDetect( - ['always-semicolon'], - 'a{\n border:0;\n}', - {'always-semicolon': true} - ); - }); - - it('Should not detect semicolon for last property if there are no properties', function() { - let test = new Test(this); - test.shouldDetect( - ['always-semicolon'], - 'div {}', - {} - ); - }); - }); -}); - diff --git a/test/options/always-semicolon/lint/css/lint-1.css b/test/options/always-semicolon/lint/css/lint-1.css deleted file mode 100644 index 0dbee0fe..00000000 --- a/test/options/always-semicolon/lint/css/lint-1.css +++ /dev/null @@ -1 +0,0 @@ -div { height: 0; } diff --git a/test/options/always-semicolon/lint/css/lint-2.css b/test/options/always-semicolon/lint/css/lint-2.css deleted file mode 100644 index f36f0139..00000000 --- a/test/options/always-semicolon/lint/css/lint-2.css +++ /dev/null @@ -1 +0,0 @@ -div { height: 0 } diff --git a/test/options/always-semicolon/lint/css/lint-3.css b/test/options/always-semicolon/lint/css/lint-3.css deleted file mode 100644 index e47a2a9c..00000000 --- a/test/options/always-semicolon/lint/css/lint-3.css +++ /dev/null @@ -1,9 +0,0 @@ -div { - height: 0 -} - -@media screen { - .a { - color: tomato; - position: panda} -} diff --git a/test/options/always-semicolon/lint/test.js b/test/options/always-semicolon/lint/test.js deleted file mode 100644 index 80cb27de..00000000 --- a/test/options/always-semicolon/lint/test.js +++ /dev/null @@ -1,44 +0,0 @@ -let assert = require('assert'); -let Test = require('../../option_test'); - -describe('Option `always-semicolon`, lint', function() { - describe('css', function() { - it('Should report no errors', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.getErrors('lint-1.css').then(errors => { - assert.equal(errors.length, 0); - }); - }); - - it('Error mesage should be a string', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.getErrors('lint-2.css').then(errors => { - let error = errors[0]; - assert.equal(typeof error.message, 'string'); - }); - }); - - it('Error should provide correct position info', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.getErrors('lint-2.css').then(errors => { - let error = errors[0]; - assert.equal(error.line, 1); - assert.equal(error.column, 16); - }); - }); - - it('Should report multiple errors', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.getErrors('lint-3.css').then(errors => { - assert.equal(errors.length, 2); - - assert.equal(errors[0].line, 2); - assert.equal(errors[0].column, 14); - - assert.equal(errors[1].line, 8); - assert.equal(errors[1].column, 24); - }); - }); - }); -}); - diff --git a/test/options/always-semicolon/process/css/test-1.css b/test/options/always-semicolon/process/css/test-1.css deleted file mode 100644 index f36f0139..00000000 --- a/test/options/always-semicolon/process/css/test-1.css +++ /dev/null @@ -1 +0,0 @@ -div { height: 0 } diff --git a/test/options/always-semicolon/process/css/test-1.expected.css b/test/options/always-semicolon/process/css/test-1.expected.css deleted file mode 100644 index 0dbee0fe..00000000 --- a/test/options/always-semicolon/process/css/test-1.expected.css +++ /dev/null @@ -1 +0,0 @@ -div { height: 0; } diff --git a/test/options/always-semicolon/process/css/test-2.css b/test/options/always-semicolon/process/css/test-2.css deleted file mode 100644 index c1888d9f..00000000 --- a/test/options/always-semicolon/process/css/test-2.css +++ /dev/null @@ -1,3 +0,0 @@ -div { -height: 0 -} diff --git a/test/options/always-semicolon/process/css/test-2.expected.css b/test/options/always-semicolon/process/css/test-2.expected.css deleted file mode 100644 index d5a75f33..00000000 --- a/test/options/always-semicolon/process/css/test-2.expected.css +++ /dev/null @@ -1,3 +0,0 @@ -div { -height: 0; -} diff --git a/test/options/always-semicolon/process/css/test-3.css b/test/options/always-semicolon/process/css/test-3.css deleted file mode 100644 index 8840e0e0..00000000 --- a/test/options/always-semicolon/process/css/test-3.css +++ /dev/null @@ -1 +0,0 @@ -div {height: 0} diff --git a/test/options/always-semicolon/process/css/test-3.expected.css b/test/options/always-semicolon/process/css/test-3.expected.css deleted file mode 100644 index 8fe52809..00000000 --- a/test/options/always-semicolon/process/css/test-3.expected.css +++ /dev/null @@ -1 +0,0 @@ -div {height: 0;} diff --git a/test/options/always-semicolon/process/css/test-4.css b/test/options/always-semicolon/process/css/test-4.css deleted file mode 100644 index d72a31ce..00000000 --- a/test/options/always-semicolon/process/css/test-4.css +++ /dev/null @@ -1,3 +0,0 @@ -div { -height: 0 /* Comment */ -} diff --git a/test/options/always-semicolon/process/css/test-4.expected.css b/test/options/always-semicolon/process/css/test-4.expected.css deleted file mode 100644 index 4710445d..00000000 --- a/test/options/always-semicolon/process/css/test-4.expected.css +++ /dev/null @@ -1,3 +0,0 @@ -div { -height: 0; /* Comment */ -} diff --git a/test/options/always-semicolon/process/css/test-5.css b/test/options/always-semicolon/process/css/test-5.css deleted file mode 100644 index 578fd29c..00000000 --- a/test/options/always-semicolon/process/css/test-5.css +++ /dev/null @@ -1,4 +0,0 @@ -div { -top: 1px; -height: 0 /* 1comment */ /* 2comment */ -} diff --git a/test/options/always-semicolon/process/css/test-5.expected.css b/test/options/always-semicolon/process/css/test-5.expected.css deleted file mode 100644 index 1869f051..00000000 --- a/test/options/always-semicolon/process/css/test-5.expected.css +++ /dev/null @@ -1,4 +0,0 @@ -div { -top: 1px; -height: 0; /* 1comment */ /* 2comment */ -} diff --git a/test/options/always-semicolon/process/less/condition-multiline.less b/test/options/always-semicolon/process/less/condition-multiline.less deleted file mode 100644 index e4213d2f..00000000 --- a/test/options/always-semicolon/process/less/condition-multiline.less +++ /dev/null @@ -1,6 +0,0 @@ -div { - @color: tomato; - div when (@color = tomato) { - top: 0; - } - } diff --git a/test/options/always-semicolon/process/less/condition.less b/test/options/always-semicolon/process/less/condition.less deleted file mode 100644 index 5608abdc..00000000 --- a/test/options/always-semicolon/process/less/condition.less +++ /dev/null @@ -1 +0,0 @@ -div { @color: tomato; div when (@color = tomato) { top: 0; } } diff --git a/test/options/always-semicolon/process/less/include-1-multiline.expected.less b/test/options/always-semicolon/process/less/include-1-multiline.expected.less deleted file mode 100644 index 77cf6660..00000000 --- a/test/options/always-semicolon/process/less/include-1-multiline.expected.less +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - .nani; - } diff --git a/test/options/always-semicolon/process/less/include-1-multiline.less b/test/options/always-semicolon/process/less/include-1-multiline.less deleted file mode 100644 index 9daab170..00000000 --- a/test/options/always-semicolon/process/less/include-1-multiline.less +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - .nani - } diff --git a/test/options/always-semicolon/process/less/include-1.expected.less b/test/options/always-semicolon/process/less/include-1.expected.less deleted file mode 100644 index 9058edc9..00000000 --- a/test/options/always-semicolon/process/less/include-1.expected.less +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; .nani; } diff --git a/test/options/always-semicolon/process/less/include-1.less b/test/options/always-semicolon/process/less/include-1.less deleted file mode 100644 index 4e470177..00000000 --- a/test/options/always-semicolon/process/less/include-1.less +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; .nani } diff --git a/test/options/always-semicolon/process/less/include-2-multiline.expected.less b/test/options/always-semicolon/process/less/include-2-multiline.expected.less deleted file mode 100644 index 6877e14b..00000000 --- a/test/options/always-semicolon/process/less/include-2-multiline.expected.less +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - .nani(2px); - } diff --git a/test/options/always-semicolon/process/less/include-2-multiline.less b/test/options/always-semicolon/process/less/include-2-multiline.less deleted file mode 100644 index c419ae5f..00000000 --- a/test/options/always-semicolon/process/less/include-2-multiline.less +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - .nani(2px) - } diff --git a/test/options/always-semicolon/process/less/include-2.expected.less b/test/options/always-semicolon/process/less/include-2.expected.less deleted file mode 100644 index 3fb43359..00000000 --- a/test/options/always-semicolon/process/less/include-2.expected.less +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; .nani(2px); } diff --git a/test/options/always-semicolon/process/less/include-2.less b/test/options/always-semicolon/process/less/include-2.less deleted file mode 100644 index 1ed55fed..00000000 --- a/test/options/always-semicolon/process/less/include-2.less +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; .nani(2px) } diff --git a/test/options/always-semicolon/process/less/include-3-multiline.expected.less b/test/options/always-semicolon/process/less/include-3-multiline.expected.less deleted file mode 100644 index d51df782..00000000 --- a/test/options/always-semicolon/process/less/include-3-multiline.expected.less +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - .nani(2px) !important; - } diff --git a/test/options/always-semicolon/process/less/include-3-multiline.less b/test/options/always-semicolon/process/less/include-3-multiline.less deleted file mode 100644 index 4d628b86..00000000 --- a/test/options/always-semicolon/process/less/include-3-multiline.less +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - .nani(2px) !important - } diff --git a/test/options/always-semicolon/process/less/include-3.expected.less b/test/options/always-semicolon/process/less/include-3.expected.less deleted file mode 100644 index 117678f1..00000000 --- a/test/options/always-semicolon/process/less/include-3.expected.less +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; .nani(2px) !important; } diff --git a/test/options/always-semicolon/process/less/include-3.less b/test/options/always-semicolon/process/less/include-3.less deleted file mode 100644 index 30988983..00000000 --- a/test/options/always-semicolon/process/less/include-3.less +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; .nani(2px) !important } diff --git a/test/options/always-semicolon/process/less/include-4-multiline.expected.less b/test/options/always-semicolon/process/less/include-4-multiline.expected.less deleted file mode 100644 index 1efba9ef..00000000 --- a/test/options/always-semicolon/process/less/include-4-multiline.expected.less +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - #bundle > .button; - } diff --git a/test/options/always-semicolon/process/less/include-4-multiline.less b/test/options/always-semicolon/process/less/include-4-multiline.less deleted file mode 100644 index f16812dc..00000000 --- a/test/options/always-semicolon/process/less/include-4-multiline.less +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - #bundle > .button - } diff --git a/test/options/always-semicolon/process/less/include-4.expected.less b/test/options/always-semicolon/process/less/include-4.expected.less deleted file mode 100644 index 1b3c6d88..00000000 --- a/test/options/always-semicolon/process/less/include-4.expected.less +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; #bundle > .button; } diff --git a/test/options/always-semicolon/process/less/include-4.less b/test/options/always-semicolon/process/less/include-4.less deleted file mode 100644 index 9221814e..00000000 --- a/test/options/always-semicolon/process/less/include-4.less +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; #bundle > .button } diff --git a/test/options/always-semicolon/process/less/include-5-multiline.expected.less b/test/options/always-semicolon/process/less/include-5-multiline.expected.less deleted file mode 100644 index 4c15e42d..00000000 --- a/test/options/always-semicolon/process/less/include-5-multiline.expected.less +++ /dev/null @@ -1,4 +0,0 @@ -div { - @color: tomato; - #bundle > .button (@color); - } diff --git a/test/options/always-semicolon/process/less/include-5-multiline.less b/test/options/always-semicolon/process/less/include-5-multiline.less deleted file mode 100644 index 15d03fca..00000000 --- a/test/options/always-semicolon/process/less/include-5-multiline.less +++ /dev/null @@ -1,4 +0,0 @@ -div { - @color: tomato; - #bundle > .button (@color) - } diff --git a/test/options/always-semicolon/process/less/include-5.expected.less b/test/options/always-semicolon/process/less/include-5.expected.less deleted file mode 100644 index 718c5c53..00000000 --- a/test/options/always-semicolon/process/less/include-5.expected.less +++ /dev/null @@ -1 +0,0 @@ -div { @color: tomato; #bundle > .button (@color); } diff --git a/test/options/always-semicolon/process/less/include-5.less b/test/options/always-semicolon/process/less/include-5.less deleted file mode 100644 index 6bf447cd..00000000 --- a/test/options/always-semicolon/process/less/include-5.less +++ /dev/null @@ -1 +0,0 @@ -div { @color: tomato; #bundle > .button (@color) } diff --git a/test/options/always-semicolon/process/sass/test.sass b/test/options/always-semicolon/process/sass/test.sass deleted file mode 100644 index 6284097f..00000000 --- a/test/options/always-semicolon/process/sass/test.sass +++ /dev/null @@ -1,7 +0,0 @@ -a - color: tomato - top: 0 - - p - a: b - c:d diff --git a/test/options/always-semicolon/process/scss/block-include-multiline.scss b/test/options/always-semicolon/process/scss/block-include-multiline.scss deleted file mode 100644 index a9e5aa98..00000000 --- a/test/options/always-semicolon/process/scss/block-include-multiline.scss +++ /dev/null @@ -1,7 +0,0 @@ -div { - color: tomato; - @include nani { - top: 0; - content: ''; - } - } diff --git a/test/options/always-semicolon/process/scss/block-include.scss b/test/options/always-semicolon/process/scss/block-include.scss deleted file mode 100644 index 251fa784..00000000 --- a/test/options/always-semicolon/process/scss/block-include.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; @include nani { top: 0; content: ''; } } diff --git a/test/options/always-semicolon/process/scss/block-value-multiline.scss b/test/options/always-semicolon/process/scss/block-value-multiline.scss deleted file mode 100644 index f654043d..00000000 --- a/test/options/always-semicolon/process/scss/block-value-multiline.scss +++ /dev/null @@ -1,7 +0,0 @@ -div { - color: tomato; - font: { - family: fantasy; - size: 16px; - } - } diff --git a/test/options/always-semicolon/process/scss/block-value.scss b/test/options/always-semicolon/process/scss/block-value.scss deleted file mode 100644 index 15f19e27..00000000 --- a/test/options/always-semicolon/process/scss/block-value.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; font: { family: fantasy; size: 16px; } } diff --git a/test/options/always-semicolon/process/scss/condition-multiline.scss b/test/options/always-semicolon/process/scss/condition-multiline.scss deleted file mode 100644 index 7aeb8afa..00000000 --- a/test/options/always-semicolon/process/scss/condition-multiline.scss +++ /dev/null @@ -1,6 +0,0 @@ -div { - $color: tomato; - @if $color == tomato { - top: 0; - } - } diff --git a/test/options/always-semicolon/process/scss/condition.scss b/test/options/always-semicolon/process/scss/condition.scss deleted file mode 100644 index 692cbcae..00000000 --- a/test/options/always-semicolon/process/scss/condition.scss +++ /dev/null @@ -1 +0,0 @@ -div { $color: tomato; @if $color == tomato { top: 0; } } diff --git a/test/options/always-semicolon/process/scss/extend-multiline.expected.scss b/test/options/always-semicolon/process/scss/extend-multiline.expected.scss deleted file mode 100644 index eaaa0c75..00000000 --- a/test/options/always-semicolon/process/scss/extend-multiline.expected.scss +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - @extend .nani; - } diff --git a/test/options/always-semicolon/process/scss/extend-multiline.scss b/test/options/always-semicolon/process/scss/extend-multiline.scss deleted file mode 100644 index 6493e728..00000000 --- a/test/options/always-semicolon/process/scss/extend-multiline.scss +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - @extend .nani - } diff --git a/test/options/always-semicolon/process/scss/extend.expected.scss b/test/options/always-semicolon/process/scss/extend.expected.scss deleted file mode 100644 index ec45b2e0..00000000 --- a/test/options/always-semicolon/process/scss/extend.expected.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; @extend .nani; } diff --git a/test/options/always-semicolon/process/scss/extend.scss b/test/options/always-semicolon/process/scss/extend.scss deleted file mode 100644 index 8f545cc6..00000000 --- a/test/options/always-semicolon/process/scss/extend.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; @extend .nani } diff --git a/test/options/always-semicolon/process/scss/include-1-multiline.expected.scss b/test/options/always-semicolon/process/scss/include-1-multiline.expected.scss deleted file mode 100644 index d8db3e32..00000000 --- a/test/options/always-semicolon/process/scss/include-1-multiline.expected.scss +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - @include nani; - } diff --git a/test/options/always-semicolon/process/scss/include-1-multiline.scss b/test/options/always-semicolon/process/scss/include-1-multiline.scss deleted file mode 100644 index bf95505c..00000000 --- a/test/options/always-semicolon/process/scss/include-1-multiline.scss +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - @include nani - } diff --git a/test/options/always-semicolon/process/scss/include-1.expected.scss b/test/options/always-semicolon/process/scss/include-1.expected.scss deleted file mode 100644 index 2feaaec8..00000000 --- a/test/options/always-semicolon/process/scss/include-1.expected.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; @include nani; } diff --git a/test/options/always-semicolon/process/scss/include-1.scss b/test/options/always-semicolon/process/scss/include-1.scss deleted file mode 100644 index 204e35d3..00000000 --- a/test/options/always-semicolon/process/scss/include-1.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; @include nani } diff --git a/test/options/always-semicolon/process/scss/include-2-multiline.expected.scss b/test/options/always-semicolon/process/scss/include-2-multiline.expected.scss deleted file mode 100644 index e0c36008..00000000 --- a/test/options/always-semicolon/process/scss/include-2-multiline.expected.scss +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - @include nani(10); - } diff --git a/test/options/always-semicolon/process/scss/include-2-multiline.scss b/test/options/always-semicolon/process/scss/include-2-multiline.scss deleted file mode 100644 index ad05456d..00000000 --- a/test/options/always-semicolon/process/scss/include-2-multiline.scss +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - @include nani(10) - } diff --git a/test/options/always-semicolon/process/scss/include-2.expected.scss b/test/options/always-semicolon/process/scss/include-2.expected.scss deleted file mode 100644 index 87719565..00000000 --- a/test/options/always-semicolon/process/scss/include-2.expected.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; @include nani(10); } diff --git a/test/options/always-semicolon/process/scss/include-2.scss b/test/options/always-semicolon/process/scss/include-2.scss deleted file mode 100644 index f5bccc9f..00000000 --- a/test/options/always-semicolon/process/scss/include-2.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; @include nani(10) } diff --git a/test/options/always-semicolon/process/scss/loop-multiline.scss b/test/options/always-semicolon/process/scss/loop-multiline.scss deleted file mode 100644 index 5768e29b..00000000 --- a/test/options/always-semicolon/process/scss/loop-multiline.scss +++ /dev/null @@ -1,6 +0,0 @@ -div { - color: tomato; - @while 1 > 2 { - top: 0; - } - } diff --git a/test/options/always-semicolon/process/scss/loop.scss b/test/options/always-semicolon/process/scss/loop.scss deleted file mode 100644 index afb46f9c..00000000 --- a/test/options/always-semicolon/process/scss/loop.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; @while 1 > 2 { top: 0; } } diff --git a/test/options/always-semicolon/process/test.js b/test/options/always-semicolon/process/test.js deleted file mode 100644 index 7860c44c..00000000 --- a/test/options/always-semicolon/process/test.js +++ /dev/null @@ -1,171 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `always-semicolon`, process', function() { - describe('css', function() { - it('Should add semicolon for last property if missing. Test 1', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('test-1.css', 'test-1.expected.css'); - }); - - it('Should add semicolon for last property if missing. Test 2', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('test-2.css', 'test-2.expected.css'); - }); - - it('Should add semicolon for last property if missing. Test 3', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('test-3.css', 'test-3.expected.css'); - }); - - it('Should add semicolon for last property if missing. Test 4', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('test-4.css', 'test-4.expected.css'); - }); - - it('Should add semicolon for last property if missing. Test 5', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('test-5.css', 'test-5.expected.css'); - }); - }); - - describe('less', function() { - it.skip('Should not add semicolon to condition (single-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('condition.less'); - }); - - it.skip('Should not add semicolon to condition (multi-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('condition-multiline.less'); - }); - - it('Should add semicolon to last included mixin if missing. Test 1 (single-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('include-1.less', 'include-1.expected.less'); - }); - - it('Should add semicolon to last included mixin if missing. Test 1 (multi-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('include-1-multiline.less', 'include-1-multiline.expected.less'); - }); - - it('Should add semicolon to last included mixin if missing. Test 2 (single-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('include-2.less', 'include-2.expected.less'); - }); - - it('Should add semicolon to last included mixin if missing. Test 2 (multi-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('include-2-multiline.less', 'include-2-multiline.expected.less'); - }); - - it('Should add semicolon to last included mixin if missing. Test 3 (single-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('include-3.less', 'include-3.expected.less'); - }); - - it('Should add semicolon to last included mixin if missing. Test 3 (multi-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('include-3-multiline.less', 'include-3-multiline.expected.less'); - }); - - it('Should add semicolon to last included mixin if missing. Test 4 (single-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('include-4.less', 'include-4.expected.less'); - }); - - it('Should add semicolon to last included mixin if missing. Test 4 (multi-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('include-4-multiline.less', 'include-4-multiline.expected.less'); - }); - - it('Should add semicolon to last included mixin if missing. Test 5 (single-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('include-5.less', 'include-5.expected.less'); - }); - - it('Should add semicolon to last included mixin if missing. Test 5 (multi-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('include-5-multiline.less', 'include-5-multiline.expected.less'); - }); - }); - - describe('sass', function() { - it('Should not add semicolon', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('test.sass'); - }); - }); - - describe('scss', function() { - it('Should not add semicolon if last value is block (singl-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('block-value.scss'); - }); - - it('Should not add semicolon if last value is block (multi-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('block-value-multiline.scss'); - }); - - it('Should add semicolon to last included mixin if missing. Test 1 (single-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('include-1.scss', 'include-1.expected.scss'); - }); - - it('Should add semicolon to last included mixin if missing. Test 1 (multi-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('include-1-multiline.scss', 'include-1-multiline.expected.scss'); - }); - - it('Should add semicolon to last included mixin if missing. Test 2 (single-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('include-2.scss', 'include-2.expected.scss'); - }); - - it('Should add semicolon to last included mixin if missing. Test 2 (multi-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('include-2-multiline.scss', 'include-2-multiline.expected.scss'); - }); - - it('Should not add semicolon to last included mixin if there is a block (single-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('block-include.scss'); - }); - - it('Should not add semicolon to last included mixin if there is a block (multi-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('block-include-multiline.scss'); - }); - - it('Should add semicolon to last extend if missing (single-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('extend.scss', 'extend.expected.scss'); - }); - - it('Should add semicolon to last extend if missing (multi-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('extend-multiline.scss', 'extend-multiline.expected.scss'); - }); - - it('Should not add semicolon to condition (single-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('condition.scss'); - }); - - it('Should not add semicolon to condition (multi-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('condition-multiline.scss'); - }); - - it('Should not add semicolon to loop (single-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('loop.scss'); - }); - - it('Should not add semicolon to loop (multi-line style)', function() { - let test = new Test(this, {'always-semicolon': true}); - return test.shouldBeEqual('loop-multiline.scss'); - }); - }); -}); diff --git a/test/options/block-indent/detect/css/test-3.expected.css b/test/options/block-indent/detect/css/test-3.expected.css deleted file mode 100644 index 684ff987..00000000 --- a/test/options/block-indent/detect/css/test-3.expected.css +++ /dev/null @@ -1,36 +0,0 @@ -a {color: tomato; top: 0; -} - -a { color: tomato; - top: 0; -} - -a { color: tomato; - top: 0; -} - -a { - color: tomato; - top: 0; -} - -a { - color: tomato; - top: 0; -} - -a { - color: tomato; - top: 0; -} - -@media print { a {color: tomato; top: 0; - } -} - -@media print { - a { - color: tomato; - top: 0; - } -} diff --git a/test/options/block-indent/detect/css/test.css b/test/options/block-indent/detect/css/test.css deleted file mode 100644 index b1b52eb3..00000000 --- a/test/options/block-indent/detect/css/test.css +++ /dev/null @@ -1,30 +0,0 @@ -a {color: tomato; top: 0;} - -a { color: tomato; -top: 0; } - -a { color: tomato; - top: 0; } - -a { -color: tomato; -top: 0; } - -a { -color: tomato; -top: 0; -} - - a { - color: tomato; - top: 0; - } - -@media print { a {color: tomato; top: 0; } } - - @media print { -a { - color: tomato; - top: 0; - } - } diff --git a/test/options/block-indent/detect/test.js b/test/options/block-indent/detect/test.js deleted file mode 100644 index 6035c3d8..00000000 --- a/test/options/block-indent/detect/test.js +++ /dev/null @@ -1,49 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `block-indent`, detect', function() { - describe('css', function() { - it('Should detect nothing with an empty block, test 1', function() { - let test = new Test(this); - test.shouldDetect( - ['block-indent'], - 'a{ }', - {} - ); - }); - - it('Should detect nothing with an empty block, test 2', function() { - let test = new Test(this); - test.shouldDetect( - ['block-indent'], - 'a{}', - {} - ); - }); - - it('Should detect correct number of spaces', function() { - let test = new Test(this); - test.shouldDetect( - ['block-indent'], - 'a{\n top: 0;\n color: tomato;\n}', - {'block-indent': ' '} - ); - }); - - it('Should detect no indent for one-line code', function() { - let test = new Test(this); - test.shouldDetect( - ['block-indent'], - 'a{ top: 0; color: tomato; }', - {} - ); - }); - - it('Valid string value => should set proper space after combnator', function() { - let test = new Test(this, { - 'block-indent': ' ', - 'space-before-closing-brace': '\n' - }); - return test.shouldBeEqual('test.css', 'test-3.expected.css'); - }); - }); -}); diff --git a/test/options/block-indent/lint/test.js b/test/options/block-indent/lint/test.js deleted file mode 100644 index 231e4209..00000000 --- a/test/options/block-indent/lint/test.js +++ /dev/null @@ -1,4 +0,0 @@ -describe('Option `block-indent`, lint', function() { - describe('css', function() { - }); -}); diff --git a/test/options/block-indent/process/css/issue-379.css b/test/options/block-indent/process/css/issue-379.css deleted file mode 100644 index 46ef2f74..00000000 --- a/test/options/block-indent/process/css/issue-379.css +++ /dev/null @@ -1,3 +0,0 @@ -.pageArea #header { -color: red; -} diff --git a/test/options/block-indent/process/css/issue-379.expected.css b/test/options/block-indent/process/css/issue-379.expected.css deleted file mode 100644 index 3708595d..00000000 --- a/test/options/block-indent/process/css/issue-379.expected.css +++ /dev/null @@ -1,3 +0,0 @@ -.pageArea #header { - color: red; - } diff --git a/test/options/block-indent/process/css/test-2.expected.css b/test/options/block-indent/process/css/test-2.expected.css deleted file mode 100644 index 467a9326..00000000 --- a/test/options/block-indent/process/css/test-2.expected.css +++ /dev/null @@ -1,30 +0,0 @@ -a {color: tomato; top: 0;} - -a { color: tomato; - top: 0; } - -a { color: tomato; - top: 0; } - -a { - color: tomato; - top: 0; } - -a { - color: tomato; - top: 0; - } - -a { - color: tomato; - top: 0; - } - -@media print { a {color: tomato; top: 0; } } - -@media print { - a { - color: tomato; - top: 0; - } - } diff --git a/test/options/block-indent/process/css/test-3.expected.css b/test/options/block-indent/process/css/test-3.expected.css deleted file mode 100644 index 684ff987..00000000 --- a/test/options/block-indent/process/css/test-3.expected.css +++ /dev/null @@ -1,36 +0,0 @@ -a {color: tomato; top: 0; -} - -a { color: tomato; - top: 0; -} - -a { color: tomato; - top: 0; -} - -a { - color: tomato; - top: 0; -} - -a { - color: tomato; - top: 0; -} - -a { - color: tomato; - top: 0; -} - -@media print { a {color: tomato; top: 0; - } -} - -@media print { - a { - color: tomato; - top: 0; - } -} diff --git a/test/options/block-indent/process/css/test.css b/test/options/block-indent/process/css/test.css deleted file mode 100644 index b1b52eb3..00000000 --- a/test/options/block-indent/process/css/test.css +++ /dev/null @@ -1,30 +0,0 @@ -a {color: tomato; top: 0;} - -a { color: tomato; -top: 0; } - -a { color: tomato; - top: 0; } - -a { -color: tomato; -top: 0; } - -a { -color: tomato; -top: 0; -} - - a { - color: tomato; - top: 0; - } - -@media print { a {color: tomato; top: 0; } } - - @media print { -a { - color: tomato; - top: 0; - } - } diff --git a/test/options/block-indent/process/css/test.expected.css b/test/options/block-indent/process/css/test.expected.css deleted file mode 100644 index 0c684ec8..00000000 --- a/test/options/block-indent/process/css/test.expected.css +++ /dev/null @@ -1,30 +0,0 @@ -a {color: tomato; top: 0;} - -a { color: tomato; -top: 0; } - -a { color: tomato; -top: 0; } - -a { -color: tomato; -top: 0; } - -a { -color: tomato; -top: 0; -} - -a { -color: tomato; -top: 0; -} - -@media print { a {color: tomato; top: 0; } } - -@media print { -a { -color: tomato; -top: 0; -} -} diff --git a/test/options/block-indent/process/sass/block.expected.sass b/test/options/block-indent/process/sass/block.expected.sass deleted file mode 100644 index ddae383f..00000000 --- a/test/options/block-indent/process/sass/block.expected.sass +++ /dev/null @@ -1,6 +0,0 @@ -a - color: tomato - top: 0 - -p - bottom: 0 diff --git a/test/options/block-indent/process/sass/block.sass b/test/options/block-indent/process/sass/block.sass deleted file mode 100644 index 9be6816f..00000000 --- a/test/options/block-indent/process/sass/block.sass +++ /dev/null @@ -1,6 +0,0 @@ -a - color: tomato - top: 0 - -p - bottom: 0 diff --git a/test/options/block-indent/process/sass/mixin.expected.sass b/test/options/block-indent/process/sass/mixin.expected.sass deleted file mode 100644 index f9351138..00000000 --- a/test/options/block-indent/process/sass/mixin.expected.sass +++ /dev/null @@ -1,8 +0,0 @@ -@mixin sexy-border($color, $width: 1px) - border: - color: $color - width: $width - style: dashed - -p - +sexy-border(blue) diff --git a/test/options/block-indent/process/sass/mixin.sass b/test/options/block-indent/process/sass/mixin.sass deleted file mode 100644 index d25771d9..00000000 --- a/test/options/block-indent/process/sass/mixin.sass +++ /dev/null @@ -1,8 +0,0 @@ -@mixin sexy-border($color, $width: 1px) - border: - color: $color - width: $width - style: dashed - -p - +sexy-border(blue) diff --git a/test/options/block-indent/process/sass/nested-ruleset.expected.sass b/test/options/block-indent/process/sass/nested-ruleset.expected.sass deleted file mode 100644 index 2c7edc6c..00000000 --- a/test/options/block-indent/process/sass/nested-ruleset.expected.sass +++ /dev/null @@ -1,9 +0,0 @@ -a - color: tomato - top: 0 - - p - bottom: 0 - - &:hover - color: yellow diff --git a/test/options/block-indent/process/sass/nested-ruleset.sass b/test/options/block-indent/process/sass/nested-ruleset.sass deleted file mode 100644 index 8567d2e5..00000000 --- a/test/options/block-indent/process/sass/nested-ruleset.sass +++ /dev/null @@ -1,9 +0,0 @@ -a - color: tomato - top: 0 - - p - bottom: 0 - - &:hover - color: yellow diff --git a/test/options/block-indent/process/scss/nested-include.expected.scss b/test/options/block-indent/process/scss/nested-include.expected.scss deleted file mode 100644 index c419883d..00000000 --- a/test/options/block-indent/process/scss/nested-include.expected.scss +++ /dev/null @@ -1,5 +0,0 @@ -li{ - @include respond-to(mobile){ float: none; } - float: left; - width: 25%; - } diff --git a/test/options/block-indent/process/scss/nested-include.scss b/test/options/block-indent/process/scss/nested-include.scss deleted file mode 100644 index 93504be6..00000000 --- a/test/options/block-indent/process/scss/nested-include.scss +++ /dev/null @@ -1,5 +0,0 @@ -li{ - @include respond-to(mobile){ float: none; } - float: left; - width: 25%; -} diff --git a/test/options/block-indent/process/test.js b/test/options/block-indent/process/test.js deleted file mode 100644 index 3f61e4a6..00000000 --- a/test/options/block-indent/process/test.js +++ /dev/null @@ -1,59 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `block-indent`, process', function() { - describe('css', function() { - it('Array value => should not change anything', function() { - let test = new Test(this, {'block-indent': ['', ' ']}); - return test.shouldBeEqual('test.css'); - }); - - it('Invalid string value => should not change anything', function() { - let test = new Test(this, {'block-indent': ' nani '}); - return test.shouldBeEqual('test.css'); - }); - - it('Float number value => should not change anything', function() { - let test = new Test(this, {'block-indent': 3.5}); - return test.shouldBeEqual('test.css'); - }); - - it('Integer value => should set proper number of spaces', function() { - let test = new Test(this, {'block-indent': 0}); - return test.shouldBeEqual('test.css', 'test.expected.css'); - }); - - it('Valid string value => should set proper number of spaces', function() { - let test = new Test(this, {'block-indent': ' '}); - return test.shouldBeEqual('test.css', 'test-2.expected.css'); - }); - - it('Issue 379', function() { - let test = new Test(this, {'block-indent': 4}); - return test.shouldBeEqual('issue-379.css', 'issue-379.expected.css'); - }); - }); - - describe('sass', function() { - it('First level ruleset\'s block', function() { - let test = new Test(this, {'block-indent': 2}); - return test.shouldBeEqual('block.sass', 'block.expected.sass'); - }); - - it('Nested ruleset', function() { - let test = new Test(this, {'block-indent': 2}); - return test.shouldBeEqual('nested-ruleset.sass', 'nested-ruleset.expected.sass'); - }); - - it('Mixin', function() { - let test = new Test(this, {'block-indent': 4}); - return test.shouldBeEqual('mixin.sass', 'mixin.expected.sass'); - }); - }); - - describe('scss', function() { - it('Issue 213', function() { - let test = new Test(this, {'block-indent': 2}); - return test.shouldBeEqual('nested-include.scss', 'nested-include.expected.scss'); - }); - }); -}); diff --git a/test/options/color-case/detect/test.js b/test/options/color-case/detect/test.js deleted file mode 100644 index cc075c37..00000000 --- a/test/options/color-case/detect/test.js +++ /dev/null @@ -1,59 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `block-indent`, detect', function() { - describe('css', function() { - it('Should detect uppercase color', function() { - let test = new Test(this); - test.shouldDetect( - ['color-case'], - 'a { color: #F3F3F3 }', - {'color-case': 'upper'} - ); - }); - - it('Should detect lowercase color', function() { - let test = new Test(this); - test.shouldDetect( - ['color-case'], - 'a { color: #f6f6f6 }', - {'color-case': 'lower'} - ); - }); - - it('Should detect uppercase color in a shorthand', function() { - let test = new Test(this); - test.shouldDetect( - ['color-case'], - 'a { color: #FFF }', - {'color-case': 'upper'} - ); - }); - - it('Should detect lowercase color in a shorthand', function() { - let test = new Test(this); - test.shouldDetect( - ['color-case'], - 'a { color: #fff }', - {'color-case': 'lower'} - ); - }); - - it('Shouldn’t detect color case if it contains only digits', function() { - let test = new Test(this); - test.shouldDetect( - ['color-case'], - 'a { color: #333 }', - {} - ); - }); - - it('Shouldn’t detect color case if it is in mixed case', function() { - let test = new Test(this); - test.shouldDetect( - ['color-case'], - 'a { color: #fFfFfF }', - {} - ); - }); - }); -}); diff --git a/test/options/color-case/lint/test.js b/test/options/color-case/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/color-case/process/test.js b/test/options/color-case/process/test.js deleted file mode 100644 index 3b8ae697..00000000 --- a/test/options/color-case/process/test.js +++ /dev/null @@ -1,40 +0,0 @@ -let assert = require('assert'); -let Test = require('../../option_test'); - -describe('Option `color-case`, process', function() { - describe('css', function() { - it('Should switch colors to upper case', function() { - let test = new Test(this, {'color-case': 'upper'}); - return test.comb.processString('div { color: #fff }') - .then(actual => { - assert.equal(actual, 'div { color: #FFF }'); - }); - }); - - it('Should switch colors to lower case', function() { - let test = new Test(this, {'color-case': 'lower'}); - return test.comb.processString('div { color: #FFF }') - .then(actual => { - assert.equal(actual, 'div { color: #fff }'); - }); - }); - - it('Should switch color-case in complex rules', function() { - let test = new Test(this, {'color-case': 'lower'}); - return test.comb.processString( - 'div { background: url(img.png#RND) #E3E3E3 0 100% no-repeat;' + - ' box-shadow: 1px 2px 3px 4px #F0F0F0 inset; }' - ).then(actual => { - assert.equal(actual, 'div { background: url(img.png#RND) #e3e3e3 0 100% no-repeat; box-shadow: 1px 2px 3px 4px #f0f0f0 inset; }'); - }); - }); - - it('Should not switch selector case', function() { - let test = new Test(this, {'color-case': 'lower'}); - return test.comb.processString('#Header { color: #FFF }') - .then(function(actual) { - assert.equal(actual, '#Header { color: #fff }'); - }); - }); - }); -}); diff --git a/test/options/color-shorthand/detect/css b/test/options/color-shorthand/detect/css deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/color-shorthand/detect/test.js b/test/options/color-shorthand/detect/test.js deleted file mode 100644 index 59e46933..00000000 --- a/test/options/color-shorthand/detect/test.js +++ /dev/null @@ -1,41 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `color-shorthand`, detect', function() { - describe('css', function() { - it('Should detect non-shorthanded color', function() { - let test = new Test(this); - test.shouldDetect( - ['color-shorthand'], - 'a { color: #FF33EE }', - {'color-shorthand': false} - ); - }); - - it('Should detect shorthanded color', function() { - let test = new Test(this); - test.shouldDetect( - ['color-shorthand'], - 'a { color: #fff }', - {'color-shorthand': true} - ); - }); - - it('Shouldn’t detect if a color is shorthanded if it can’t be shorthanded', function() { - let test = new Test(this); - test.shouldDetect( - ['color-shorthand'], - 'a { color: #F3F3F3 }', - {} - ); - }); - - it('Shouldn’t detect if a color is shorthanded if it is not a vhash', function() { - let test = new Test(this); - test.shouldDetect( - ['color-shorthand'], - 'a { color: rgba(0,0,0,0.5) }', - {} - ); - }); - }); -}); diff --git a/test/options/color-shorthand/lint/css b/test/options/color-shorthand/lint/css deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/color-shorthand/lint/test.js b/test/options/color-shorthand/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/color-shorthand/process/test.js b/test/options/color-shorthand/process/test.js deleted file mode 100644 index b9b1be7a..00000000 --- a/test/options/color-shorthand/process/test.js +++ /dev/null @@ -1,33 +0,0 @@ -var assert = require('assert'); -let Test = require('../../option_test'); - -describe('Option `color-shorthand`, process', function() { - describe('css', function() { - it('Should shrink hexadecimal colors to 3 symbols', function() { - let test = new Test(this, {'color-shorthand': true}); - return test.comb.processString( - 'div { color: #aabbcc }' - ).then(function(actual) { - assert.equal(actual, 'div { color: #abc }'); - }); - }); - - it('Should expand hexadecimal colors to 6 symbols', function() { - let test = new Test(this, {'color-shorthand': false}); - return test.comb.processString( - 'div { color: #7ad }' - ).then(function(actual) { - assert.equal(actual, 'div { color: #77aadd }'); - }); - }); - - it('Should save case while processing', function() { - let test = new Test(this, {'color-shorthand': true}); - return test.comb.processString( - 'div { color: #fFAafF }' - ).then(function(actual) { - assert.equal(actual, 'div { color: #fAf }'); - }); - }); - }); -}); diff --git a/test/options/element-case/detect/test.js b/test/options/element-case/detect/test.js deleted file mode 100644 index 22cc8bbf..00000000 --- a/test/options/element-case/detect/test.js +++ /dev/null @@ -1,59 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `element-case`, detect', function() { - describe('css', function() { - it('Should detect lowercase elements', function() { - let test = new Test(this); - test.shouldDetect( - ['element-case'], - 'a { color: red }', - {'element-case': 'lower'} - ); - }); - - it('Should detect uppercase elements', function() { - let test = new Test(this); - test.shouldDetect( - ['element-case'], - 'A { color: red }', - {'element-case': 'upper'} - ); - }); - - it('Should detect lowercase elements in a long selector', function() { - let test = new Test(this); - test.shouldDetect( - ['element-case'], - 'ul li:not(:hover) A { color: red }', - {'element-case': 'lower'} - ); - }); - - it('Should detect uppercase elements in a long selector', function() { - let test = new Test(this); - test.shouldDetect( - ['element-case'], - 'ul .lol:not(LI) A { color: red }', - {'element-case': 'upper'} - ); - }); - - it('Shouldn’t detect case of elements in a mixed case', function() { - let test = new Test(this); - test.shouldDetect( - ['element-case'], - 'aRtIcLe { color: red }', - {} - ); - }); - - it('Shouldn’t detect case of elements when there are no such', function() { - let test = new Test(this); - test.shouldDetect( - ['element-case'], - '*.lol { color: red }', - {} - ); - }); - }); -}); diff --git a/test/options/element-case/lint/test.js b/test/options/element-case/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/element-case/process/scss/mixin.expected.scss b/test/options/element-case/process/scss/mixin.expected.scss deleted file mode 100644 index 8700a0ea..00000000 --- a/test/options/element-case/process/scss/mixin.expected.scss +++ /dev/null @@ -1,3 +0,0 @@ -a { - @include boxSizingContent(); -} diff --git a/test/options/element-case/process/scss/mixin.scss b/test/options/element-case/process/scss/mixin.scss deleted file mode 100644 index d2b5c33e..00000000 --- a/test/options/element-case/process/scss/mixin.scss +++ /dev/null @@ -1,3 +0,0 @@ -A { - @include boxSizingContent(); -} diff --git a/test/options/element-case/process/test.js b/test/options/element-case/process/test.js deleted file mode 100644 index 350970fe..00000000 --- a/test/options/element-case/process/test.js +++ /dev/null @@ -1,49 +0,0 @@ -var assert = require('assert'); -let Test = require('../../option_test'); - -describe('Option `element-case`, process', function() { - describe('css', function() { - it('Invalid String should not change case of elements', function() { - let test = new Test(this, {'element-case': 'foobar'}); - return test.comb.processString( - 'LI a { color : red }' - ).then(function(actual) { - assert.equal(actual, 'LI a { color : red }'); - }); - }); - - it('Should switch tag name to upper case', function() { - let test = new Test(this, {'element-case': 'upper'}); - return test.comb.processString( - 'div { color: #fff }' - ).then(function(actual) { - assert.equal(actual, 'DIV { color: #fff }'); - }); - }); - - it('Should switch tag name to lower case', function() { - let test = new Test(this, {'element-case': 'lower'}); - return test.comb.processString( - 'DIV { color: #FFF }' - ).then(function(actual) { - assert.equal(actual, 'div { color: #FFF }'); - }); - }); - - it('Should switch element-case in complex rules', function() { - let test = new Test(this, {'element-case': 'lower'}); - return test.comb.processString( - 'UL > LI > .foo:not(A) { color: red }' - ).then(function(actual) { - assert.equal(actual, 'ul > li > .foo:not(a) { color: red }'); - }); - }); - }); - - describe('scss', function() { - it('Should not touch mixin names', function() { - let test = new Test(this, {'element-case': 'lower'}); - return test.shouldBeEqual('mixin.scss', 'mixin.expected.scss'); - }); - }); -}); diff --git a/test/options/eof-newline/detect/test.js b/test/options/eof-newline/detect/test.js deleted file mode 100644 index c7c6cd80..00000000 --- a/test/options/eof-newline/detect/test.js +++ /dev/null @@ -1,42 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `eof-newline`, detect', function() { - describe('css', function() { - it('Shouldn’t detect eof newline', function() { - let test = new Test(this); - test.shouldDetect( - ['eof-newline'], - 'a { color: red }', - {'eof-newline': false} - ); - }); - - it('Should detect eof newline', function() { - let test = new Test(this); - test.shouldDetect( - ['eof-newline'], - 'a { color: red }\n', - {'eof-newline': true} - ); - }); - - it('Shouldn’t detect eof newline with spaces at the end', function() { - let test = new Test(this); - test.shouldDetect( - ['eof-newline'], - 'a { color: red } ', - {'eof-newline': false} - ); - }); - - it('Should detect eof newline with mixed spaces at the end', function() { - let test = new Test(this); - test.shouldDetect( - ['eof-newline'], - 'a { color: red } \n ', - {'eof-newline': true} - ); - }); - }); -}); - diff --git a/test/options/eof-newline/lint/test.js b/test/options/eof-newline/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/eof-newline/process/test.js b/test/options/eof-newline/process/test.js deleted file mode 100644 index 3991f373..00000000 --- a/test/options/eof-newline/process/test.js +++ /dev/null @@ -1,33 +0,0 @@ -var assert = require('assert'); -let Test = require('../../option_test'); - -describe('Option `eof-newline`, process', function() { - describe('css', function() { - it('Invalid value should not change trim trailing brac', function() { - let test = new Test(this, {'eof-newline': 'foobar'}); - return test.comb.processString( - 'a { color: red } \n' - ).then(function(actual) { - assert.equal(actual, 'a { color: red } \n'); - }); - }); - - it('Boolean true value should insert line-break at eof', function() { - let test = new Test(this, {'eof-newline': true}); - return test.comb.processString( - 'a {color:red} ' - ).then(function(actual) { - assert.equal(actual, 'a {color:red} \n'); - }); - }); - - it('Boolean false value should remove line-break from eof', function() { - let test = new Test(this, {'eof-newline': false}); - return test.comb.processString( - 'a {color:red} \n' - ).then(function(actual) { - assert.equal(actual, 'a {color:red} '); - }); - }); - }); -}); diff --git a/test/options/integral/detect/css/integral.expected.css b/test/options/integral/detect/css/integral.expected.css deleted file mode 100644 index f59d0a21..00000000 --- a/test/options/integral/detect/css/integral.expected.css +++ /dev/null @@ -1,151 +0,0 @@ -/* foobar */ -@media all and (min-width:0) -{ - .radio-button_theme_normal .radio-button__radio:before - { - background: rgba(0,0,0,.4); - background: -webkit-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: -moz-linear-gradient(top, rgba(0,0,0,.2) 0, rgba(0,0,0,.4) 100%); - background: -o-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: linear-gradient(to bottom, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - -moz-box-shadow: 0 1px 0 rgba(0,0,0,.07); - box-shadow: 0 1px 0 rgba(0,0,0,.07); - } - - /* :after — фон */ - .radio-button_theme_normal .radio-button__radio[class^='radio']:after - { - content: 'it\'s something different'; - - background: #fff; - background: -webkit-linear-gradient(top, #fff 0,#eee 100%); - background: -moz-linear-gradient(top, #fff 0, #eee 100%); - background: -o-linear-gradient(top, #fff 0,#eee 100%); - background: linear-gradient(to bottom, #fff 0,#eee 100%); - } - - /* _focused_yes */ - .radio-button_theme_normal .radio-button__radio_focused_yes:before - { - content: 'hello'; - - -moz-box-shadow: 0 0 6px 2px rgba(255,204,0,.7), 0 1px 0 rgba(0,0,0,.07); - box-shadow: 0 0 6px 2px rgba(255,204,0,.7), 0 1px 0 rgba(0,0,0,.07); - } -} - -/* Фигурные скобки. Вариант 1 */ -a, -b, -i /* foobar */ -{ - margin: 0; - padding: 0; -} -div p -{ - font-size: 1px; - - top: 0; -} -div p em -{ - font-style: italic; - - border-bottom: 1px solid red; -} - -@media all and (min-width:0) -{ - /* В нажатом состоянии смещается вниз на 1px вся кнопка, текст не смещается */ - .button_pressed_yes.button_shadow_yes - { - top: 1px; - } - - .button_pressed_yes.button_shadow_yes .button__text - { - top: 0; - } -} - -@media all /* media */ -{ - /* foobar */ - .input__control - { - font-size: 100%; - - position: relative; - z-index: 3; - - width: 100%; - margin: 0; - - color: #000; - } -} - -@media screen and (min-width: 35em) /* screen */, - print and (min-width: 40em) /* print */ -{ - /* foobar */ - .input__control - { - -moz-box-sizing: border-box; - box-sizing: border-box; - padding: .4em 0; - - border: 0; - outline: 0; - background: none; - } -} - -/* Фигурные скобки. Вариант 2 */ -div -{ - margin: 0; - padding: 0; -} -div p -{ - font-size: 1px; - - top: 0; -} -div p em -{ - font-style: italic;/* inline comment*/ - - border-bottom: 1px solid red; -} - -/* Фигурные скобки. Вариант 3 */ -div -{ - margin: 0; - padding: 0; -} -/* foo */ div ~ p -{ - font-size: 1px; - - top: 0; -} -div > p + em -{ - /* upline comment*/ - font-style: italic; - - border-bottom: 1px solid red; /* trololo */ /* trololo */ -} - -a:not(b) -{ - top: 0;/* ololo */margin: 0; -} -b -{ - top: 0/* trololo */;margin: 0; -} diff --git a/test/options/integral/detect/test.js b/test/options/integral/detect/test.js deleted file mode 100644 index e4f40a28..00000000 --- a/test/options/integral/detect/test.js +++ /dev/null @@ -1,15 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `integral`, detect', function() { - describe('css', function() { - it('Should detect everything in integral test', function() { - let test = new Test(this); - let input = test.readFile('integral.expected.css'); - // Clone the required config object, otherwise other tests would fail. - let expected = JSON.parse(JSON.stringify(test.Comb.getConfig('csscomb'))); - delete expected['sort-order']; - delete expected.exclude; - test.shouldDetect(undefined, input, expected); - }); - }); -}); diff --git a/test/options/integral/lint/test.js b/test/options/integral/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/integral/process/css/integral.css b/test/options/integral/process/css/integral.css deleted file mode 100644 index cb280a33..00000000 --- a/test/options/integral/process/css/integral.css +++ /dev/null @@ -1,129 +0,0 @@ -/* foobar */ -@media all and (min-width:0px) {.radio-button_theme_normal .radio-button__radio:before - { - background: rgba(0,0,0,0.4); - background: -webkit-linear-gradient(top, rgba(0,0,0,0.2) 0,rgba(0,0,0,0.4) 100%); - background: -moz-linear-gradient(top, rgba(0,0,0,0.2) 0, rgba(0,0,0,0.4) 100%); - background: -o-linear-gradient(top, rgba(0,0,0,0.2) 0,rgba(0,0,0,0.4) 100%); - background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0,rgba(0,0,0,0.4) 100%); - - -moz-box-shadow: 0 1px 0 rgba(0,0,0,.07); - box-shadow: 0 1px 0 rgba(0,0,0,.07); - } - - /* :after — фон */ - .radio-button_theme_normal .radio-button__radio[class^="radio"]:after - { - background: #fFf; - background: -webkit-linear-gradient(top, #FffFff 0,#eeeeEe 100%); - background: -moz-linear-gradient(top, #fff 0, #eEe 100%); - background: -o-linear-gradient(top, #fff 0,#eee 100%); - background: linear-gradient(to bottom, #ffffff 0,#eeEeee 100%); - content: "it's something different"; - } - - /* _focused_yes */ - .radio-button_theme_normal .radio-button__radio_focused_yes:before - { - content: "hello"; - -moz-box-shadow: 0 0 6px 2px rgba(255,204,0,.7), 0px 1px 0px rgba(0,0,0,.07); - box-shadow: 0 0 6px 2px rgba(255,204,0,.7), 0px 1px 0px rgba(0,0,0,.07); - } - -} - -/* Фигурные скобки. Вариант 1 */ -a, b, i /* foobar */ { - padding:0; - margin:0; - } - div p{ - font-size:1px; - top:0; - } - div p em{ - font-style:italic; - border-bottom:1px solid red; -} - -@media all and (min-width:0px){ - /* В нажатом состоянии смещается вниз на 1px вся кнопка, текст не смещается */ - .button_pressed_yes.button_shadow_yes - { - top: 1px; - } - - .button_pressed_yes.button_shadow_yes .button__text - { - top: 0; - } -} - -@media all /* media */ - { /* foobar */ -.input__control -{ - color: #000; - font-size: 100%; - margin: 0; - position: relative; - width: 100%; - z-index: 3; -}} - -@media screen and (min-width: 35em) /* screen */, - print and (min-width: 40em) /* print */ { /* foobar */ -.input__control -{ - -moz-box-sizing: border-box; - background: none; - border: 0; - box-sizing: border-box; - outline: 0; - padding: 0.4em 0; -} -}.empty-rule{} - -/* Фигурные скобки. Вариант 2 */ -div -{ - padding:0; - margin:0; -} - div p - { - font-size:1px; - top:0; - } - div p em - { - font-style:italic;/* inline comment*/ - border-bottom:1px solid red; - } - -/* Фигурные скобки. Вариант 3 */ -div { - padding:0; - margin:0; -} -/* foo */ div~p { - font-size:1px; - top:0 - } - div> P +EM { - /* upline comment*/ - font-style:italic; - - border-bottom:1px solid red /* trololo */ /* trololo */ - } - - a:not(B){ -top: 0;/* ololo */margin :0;} - b - { -top :0/* trololo */;margin : 0} -.empty-rule{} - - - - diff --git a/test/options/integral/process/css/integral.expected.css b/test/options/integral/process/css/integral.expected.css deleted file mode 100644 index f59d0a21..00000000 --- a/test/options/integral/process/css/integral.expected.css +++ /dev/null @@ -1,151 +0,0 @@ -/* foobar */ -@media all and (min-width:0) -{ - .radio-button_theme_normal .radio-button__radio:before - { - background: rgba(0,0,0,.4); - background: -webkit-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: -moz-linear-gradient(top, rgba(0,0,0,.2) 0, rgba(0,0,0,.4) 100%); - background: -o-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: linear-gradient(to bottom, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - -moz-box-shadow: 0 1px 0 rgba(0,0,0,.07); - box-shadow: 0 1px 0 rgba(0,0,0,.07); - } - - /* :after — фон */ - .radio-button_theme_normal .radio-button__radio[class^='radio']:after - { - content: 'it\'s something different'; - - background: #fff; - background: -webkit-linear-gradient(top, #fff 0,#eee 100%); - background: -moz-linear-gradient(top, #fff 0, #eee 100%); - background: -o-linear-gradient(top, #fff 0,#eee 100%); - background: linear-gradient(to bottom, #fff 0,#eee 100%); - } - - /* _focused_yes */ - .radio-button_theme_normal .radio-button__radio_focused_yes:before - { - content: 'hello'; - - -moz-box-shadow: 0 0 6px 2px rgba(255,204,0,.7), 0 1px 0 rgba(0,0,0,.07); - box-shadow: 0 0 6px 2px rgba(255,204,0,.7), 0 1px 0 rgba(0,0,0,.07); - } -} - -/* Фигурные скобки. Вариант 1 */ -a, -b, -i /* foobar */ -{ - margin: 0; - padding: 0; -} -div p -{ - font-size: 1px; - - top: 0; -} -div p em -{ - font-style: italic; - - border-bottom: 1px solid red; -} - -@media all and (min-width:0) -{ - /* В нажатом состоянии смещается вниз на 1px вся кнопка, текст не смещается */ - .button_pressed_yes.button_shadow_yes - { - top: 1px; - } - - .button_pressed_yes.button_shadow_yes .button__text - { - top: 0; - } -} - -@media all /* media */ -{ - /* foobar */ - .input__control - { - font-size: 100%; - - position: relative; - z-index: 3; - - width: 100%; - margin: 0; - - color: #000; - } -} - -@media screen and (min-width: 35em) /* screen */, - print and (min-width: 40em) /* print */ -{ - /* foobar */ - .input__control - { - -moz-box-sizing: border-box; - box-sizing: border-box; - padding: .4em 0; - - border: 0; - outline: 0; - background: none; - } -} - -/* Фигурные скобки. Вариант 2 */ -div -{ - margin: 0; - padding: 0; -} -div p -{ - font-size: 1px; - - top: 0; -} -div p em -{ - font-style: italic;/* inline comment*/ - - border-bottom: 1px solid red; -} - -/* Фигурные скобки. Вариант 3 */ -div -{ - margin: 0; - padding: 0; -} -/* foo */ div ~ p -{ - font-size: 1px; - - top: 0; -} -div > p + em -{ - /* upline comment*/ - font-style: italic; - - border-bottom: 1px solid red; /* trololo */ /* trololo */ -} - -a:not(b) -{ - top: 0;/* ololo */margin: 0; -} -b -{ - top: 0/* trololo */;margin: 0; -} diff --git a/test/options/integral/process/css/issue-374.css b/test/options/integral/process/css/issue-374.css deleted file mode 100644 index bf667383..00000000 --- a/test/options/integral/process/css/issue-374.css +++ /dev/null @@ -1,4 +0,0 @@ -html /deep/ span -{ - display: block; -} diff --git a/test/options/integral/process/sass/issue-252.expected.sass b/test/options/integral/process/sass/issue-252.expected.sass deleted file mode 100644 index f3fb55f5..00000000 --- a/test/options/integral/process/sass/issue-252.expected.sass +++ /dev/null @@ -1,11 +0,0 @@ -.partner - font-size: 0 - - color: transparent - - +inline-block - &--motor - background-image: url('/i/partners1.png') - &--motor - background-image: url('/i/partners2.png') - diff --git a/test/options/integral/process/sass/issue-252.sass b/test/options/integral/process/sass/issue-252.sass deleted file mode 100644 index 6369eefd..00000000 --- a/test/options/integral/process/sass/issue-252.sass +++ /dev/null @@ -1,8 +0,0 @@ -.partner - +inline-block - font-size: 0 - color: transparent - &--motor - background-image: url('/i/partners1.png') - &--motor - background-image: url('/i/partners2.png') diff --git a/test/options/integral/process/test.js b/test/options/integral/process/test.js deleted file mode 100644 index 6cf8055e..00000000 --- a/test/options/integral/process/test.js +++ /dev/null @@ -1,25 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `integral`, process', function() { - describe('css', function() { - it('Process result must be equal to expected.css', function() { - let test = new Test(this); - test.useConfig('csscomb'); - return test.shouldBeEqual('integral.css', 'integral.expected.css'); - }); - - it('Issue 374', function() { - let test = new Test(this); - test.useConfig('csscomb'); - return test.shouldBeEqual('issue-374.css'); - }); - }); - - describe('sass', function() { - it('Issue 252', function() { - let test = new Test(this); - test.useConfig('csscomb'); - return test.shouldBeEqual('issue-252.sass', 'issue-252.expected.sass'); - }); - }); -}); diff --git a/test/options/leading-zero/detect/test.js b/test/options/leading-zero/detect/test.js deleted file mode 100644 index 7656ea99..00000000 --- a/test/options/leading-zero/detect/test.js +++ /dev/null @@ -1,33 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `leading-zero`, detect', function() { - describe('css', function() { - it('Should detect leading zero option', function() { - let test = new Test(this); - test.shouldDetect( - ['leading-zero'], - 'a { width: 0.5em }', - {'leading-zero': true} - ); - }); - - it('Should detect leading zero option set to false', function() { - let test = new Test(this); - test.shouldDetect( - ['leading-zero'], - 'a { width: .5em }', - {'leading-zero': false} - ); - }); - - it('Shouldn’t detect leading zero option', function() { - let test = new Test(this); - test.shouldDetect( - ['leading-zero'], - 'a { width: 10.5em }', - {} - ); - }); - }); -}); - diff --git a/test/options/leading-zero/lint/test.js b/test/options/leading-zero/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/leading-zero/process/test.js b/test/options/leading-zero/process/test.js deleted file mode 100644 index d6eef264..00000000 --- a/test/options/leading-zero/process/test.js +++ /dev/null @@ -1,24 +0,0 @@ -var assert = require('assert'); -let Test = require('../../option_test'); - -describe('Option `leading-zero`, process', function() { - describe('css', function() { - it('Should add leading zero in dimensions', function() { - let test = new Test(this, {'leading-zero': true}); - return test.comb.processString( - 'div { margin: .5em }' - ).then(function(actual) { - assert.equal(actual, 'div { margin: 0.5em }'); - }); - }); - - it('Should remove leading zero in dimensions', function() { - let test = new Test(this, {'leading-zero': false}); - return test.comb.processString( - 'div { margin: 0.5em }' - ).then(function(actual) { - assert.equal(actual, 'div { margin: .5em }'); - }); - }); - }); -}); diff --git a/test/options/lines-between-rulesets/process/css/2-lines-between-rulesets.expected.css b/test/options/lines-between-rulesets/process/css/2-lines-between-rulesets.expected.css deleted file mode 100644 index c8897bbe..00000000 --- a/test/options/lines-between-rulesets/process/css/2-lines-between-rulesets.expected.css +++ /dev/null @@ -1,8 +0,0 @@ -/*comment*/ -.foo {background: red;} - - -/*comment*/.bar{border: 1px solid red;} - - -.baz{color: #fff;} diff --git a/test/options/lines-between-rulesets/process/css/lines-between-rulesets.css b/test/options/lines-between-rulesets/process/css/lines-between-rulesets.css deleted file mode 100644 index 7f8cf597..00000000 --- a/test/options/lines-between-rulesets/process/css/lines-between-rulesets.css +++ /dev/null @@ -1,2 +0,0 @@ -/*comment*/ -.foo {background: red;}/*comment*/.bar{border: 1px solid red;}.baz{color: #fff;} diff --git a/test/options/lines-between-rulesets/process/css/lines-between-rulesets.expected.css b/test/options/lines-between-rulesets/process/css/lines-between-rulesets.expected.css deleted file mode 100644 index 3915e088..00000000 --- a/test/options/lines-between-rulesets/process/css/lines-between-rulesets.expected.css +++ /dev/null @@ -1,6 +0,0 @@ -/*comment*/ -.foo {background: red;} - -/*comment*/.bar{border: 1px solid red;} - -.baz{color: #fff;} diff --git a/test/options/lines-between-rulesets/process/less/2-lines-between-rulesets.expected.less b/test/options/lines-between-rulesets/process/less/2-lines-between-rulesets.expected.less deleted file mode 100644 index 7e8b5e9e..00000000 --- a/test/options/lines-between-rulesets/process/less/2-lines-between-rulesets.expected.less +++ /dev/null @@ -1,40 +0,0 @@ -.foo { - .border-radius(5px); - background: red; - - - /* comment */ - .omg { - .test { - height: 50px; - } - } -} - - -.bar { - border: 1px solid red; - - - /* - ** another comment - ** spanning multiple lines - */ - @media (min-width: 500px) { - width: 50px; - } -} - - -.baz { - @grey: #ccc; - - - // a single-line comment - // another single-line comment - .wtf { - @media only screen { - background-color: @grey; - } - } -} diff --git a/test/options/lines-between-rulesets/process/less/lines-between-rulesets.expected.less b/test/options/lines-between-rulesets/process/less/lines-between-rulesets.expected.less deleted file mode 100644 index ef3a7ef3..00000000 --- a/test/options/lines-between-rulesets/process/less/lines-between-rulesets.expected.less +++ /dev/null @@ -1,35 +0,0 @@ -.foo { - .border-radius(5px); - background: red; - - /* comment */ - .omg { - .test { - height: 50px; - } - } -} - -.bar { - border: 1px solid red; - - /* - ** another comment - ** spanning multiple lines - */ - @media (min-width: 500px) { - width: 50px; - } -} - -.baz { - @grey: #ccc; - - // a single-line comment - // another single-line comment - .wtf { - @media only screen { - background-color: @grey; - } - } -} diff --git a/test/options/lines-between-rulesets/process/less/lines-between-rulesets.less b/test/options/lines-between-rulesets/process/less/lines-between-rulesets.less deleted file mode 100644 index 544895b5..00000000 --- a/test/options/lines-between-rulesets/process/less/lines-between-rulesets.less +++ /dev/null @@ -1,28 +0,0 @@ -.foo { - .border-radius(5px); - background: red; - /* comment */ - .omg { - .test { - height: 50px; - } - } -}.bar { - border: 1px solid red; - /* - ** another comment - ** spanning multiple lines - */ - @media (min-width: 500px) { - width: 50px; - } -}.baz { - @grey: #ccc; - // a single-line comment - // another single-line comment - .wtf { - @media only screen { - background-color: @grey; - } - } -} diff --git a/test/options/lines-between-rulesets/process/sass/2-lines-between-rulesets.expected.sass b/test/options/lines-between-rulesets/process/sass/2-lines-between-rulesets.expected.sass deleted file mode 100644 index b35b9173..00000000 --- a/test/options/lines-between-rulesets/process/sass/2-lines-between-rulesets.expected.sass +++ /dev/null @@ -1,32 +0,0 @@ -.foo - +border-radius(5px) - background: red - - - // comment - .omg - .test - height: 50px - - -.bar - border: 1px solid red - - - /* - * another comment - * spanning multiple lines - */ - @media (min-width: 500px) - width: 50px - - -.baz - $grey: #ccc - - - // a single-line comment - // another single-line comment - .wtf - @media only screen - background-color: $grey diff --git a/test/options/lines-between-rulesets/process/sass/lines-between-rulesets.expected.sass b/test/options/lines-between-rulesets/process/sass/lines-between-rulesets.expected.sass deleted file mode 100644 index 31a2a3d8..00000000 --- a/test/options/lines-between-rulesets/process/sass/lines-between-rulesets.expected.sass +++ /dev/null @@ -1,27 +0,0 @@ -.foo - +border-radius(5px) - background: red - - // comment - .omg - .test - height: 50px - -.bar - border: 1px solid red - - /* - * another comment - * spanning multiple lines - */ - @media (min-width: 500px) - width: 50px - -.baz - $grey: #ccc - - // a single-line comment - // another single-line comment - .wtf - @media only screen - background-color: $grey diff --git a/test/options/lines-between-rulesets/process/sass/lines-between-rulesets.sass b/test/options/lines-between-rulesets/process/sass/lines-between-rulesets.sass deleted file mode 100644 index 10ee7156..00000000 --- a/test/options/lines-between-rulesets/process/sass/lines-between-rulesets.sass +++ /dev/null @@ -1,22 +0,0 @@ -.foo - +border-radius(5px) - background: red - // comment - .omg - .test - height: 50px -.bar - border: 1px solid red - /* - * another comment - * spanning multiple lines - */ - @media (min-width: 500px) - width: 50px -.baz - $grey: #ccc - // a single-line comment - // another single-line comment - .wtf - @media only screen - background-color: $grey diff --git a/test/options/lines-between-rulesets/process/scss/2-lines-between-rulesets.expected.scss b/test/options/lines-between-rulesets/process/scss/2-lines-between-rulesets.expected.scss deleted file mode 100644 index 386fbb18..00000000 --- a/test/options/lines-between-rulesets/process/scss/2-lines-between-rulesets.expected.scss +++ /dev/null @@ -1,40 +0,0 @@ -.foo { - @include border-radius(5px); - background: red; - - - /* comment */ - .omg { - .test { - height: 50px; - } - } -} - - -.bar { - border: 1px solid red; - - - /* - ** another comment - ** spanning multiple lines - */ - @media (min-width: 500px) { - width: 50px; - } -} - - -.baz { - $grey: #ccc; - - - // a single-line comment - // another single-line comment - .wtf { - @media only screen { - background-color: $grey; - } - } -} diff --git a/test/options/lines-between-rulesets/process/scss/lines-between-rulesets.expected.scss b/test/options/lines-between-rulesets/process/scss/lines-between-rulesets.expected.scss deleted file mode 100644 index db92922e..00000000 --- a/test/options/lines-between-rulesets/process/scss/lines-between-rulesets.expected.scss +++ /dev/null @@ -1,35 +0,0 @@ -.foo { - @include border-radius(5px); - background: red; - - /* comment */ - .omg { - .test { - height: 50px; - } - } -} - -.bar { - border: 1px solid red; - - /* - ** another comment - ** spanning multiple lines - */ - @media (min-width: 500px) { - width: 50px; - } -} - -.baz { - $grey: #ccc; - - // a single-line comment - // another single-line comment - .wtf { - @media only screen { - background-color: $grey; - } - } -} diff --git a/test/options/lines-between-rulesets/process/scss/lines-between-rulesets.scss b/test/options/lines-between-rulesets/process/scss/lines-between-rulesets.scss deleted file mode 100644 index efa5b90f..00000000 --- a/test/options/lines-between-rulesets/process/scss/lines-between-rulesets.scss +++ /dev/null @@ -1,28 +0,0 @@ -.foo { - @include border-radius(5px); - background: red; - /* comment */ - .omg { - .test { - height: 50px; - } - } -}.bar { - border: 1px solid red; - /* - ** another comment - ** spanning multiple lines - */ - @media (min-width: 500px) { - width: 50px; - } -}.baz { - $grey: #ccc; - // a single-line comment - // another single-line comment - .wtf { - @media only screen { - background-color: $grey; - } - } -} diff --git a/test/options/lines-between-rulesets/process/test.js b/test/options/lines-between-rulesets/process/test.js deleted file mode 100644 index b6f935ca..00000000 --- a/test/options/lines-between-rulesets/process/test.js +++ /dev/null @@ -1,93 +0,0 @@ -'use strict'; - -let Test = require('../../option_test'); - -describe('Option `lines-between-rulesets`, process', function() { - describe('css', function() { - it('Numeric value => should insert 1 newline between rulesets', function() { - let test = new Test(this, { 'lines-between-rulesets': 1 }); - return test.shouldBeEqual('lines-between-rulesets.css', 'lines-between-rulesets.expected.css'); - }); - - it('Numeric value => should insert multiple newlines between rulesets', function() { - let test = new Test(this, { 'lines-between-rulesets': 2 }); - return test.shouldBeEqual('lines-between-rulesets.css', '2-lines-between-rulesets.expected.css'); - }); - - it('Invalid string value => should should not change anything', function() { - let test = new Test(this, { 'lines-between-rulesets': '\n' }); - return test.shouldBeEqual('lines-between-rulesets.css'); - }); - - it('Float number value => should be rounded', function() { - let test = new Test(this, { 'lines-between-rulesets': 0.5 }); - return test.shouldBeEqual('lines-between-rulesets.css', 'lines-between-rulesets.expected.css'); - }); - }); - - describe('less', function() { - it('Numeric value => should insert 1 newline between rulesets', function() { - let test = new Test(this, { 'lines-between-rulesets': 1 }); - return test.shouldBeEqual('lines-between-rulesets.less', 'lines-between-rulesets.expected.less'); - }); - - it('Numeric value => should insert multiple newlines between rulesets', function() { - let test = new Test(this, { 'lines-between-rulesets': 2 }); - return test.shouldBeEqual('lines-between-rulesets.less', '2-lines-between-rulesets.expected.less'); - }); - - it('Invalid string value => should should not change anything', function() { - let test = new Test(this, { 'lines-between-rulesets': '\n' }); - return test.shouldBeEqual('lines-between-rulesets.less'); - }); - - it('Float number value => should be rounded', function() { - let test = new Test(this, { 'lines-between-rulesets': 0.5 }); - return test.shouldBeEqual('lines-between-rulesets.less', 'lines-between-rulesets.expected.less'); - }); - }); - - describe('scss', function() { - it('Numeric value => should insert 1 newline between rulesets', function() { - let test = new Test(this, { 'lines-between-rulesets': 1 }); - return test.shouldBeEqual('lines-between-rulesets.scss', 'lines-between-rulesets.expected.scss'); - }); - - it('Numeric value => should insert multiple newlines between rulesets', function() { - let test = new Test(this, { 'lines-between-rulesets': 2 }); - return test.shouldBeEqual('lines-between-rulesets.scss', '2-lines-between-rulesets.expected.scss'); - }); - - it('Invalid string value => should should not change anything', function() { - let test = new Test(this, { 'lines-between-rulesets': '\n' }); - return test.shouldBeEqual('lines-between-rulesets.scss'); - }); - - it('Float number value => should be rounded', function() { - let test = new Test(this, { 'lines-between-rulesets': 0.5 }); - return test.shouldBeEqual('lines-between-rulesets.scss', 'lines-between-rulesets.expected.scss'); - }); - }); - - describe('sass', function() { - it('Numeric value => should insert 1 newline between rulesets', function() { - let test = new Test(this, { 'lines-between-rulesets': 1 }); - return test.shouldBeEqual('lines-between-rulesets.sass', 'lines-between-rulesets.expected.sass'); - }); - - it('Numeric value => should insert multiple newlines between rulesets', function() { - let test = new Test(this, { 'lines-between-rulesets': 2 }); - return test.shouldBeEqual('lines-between-rulesets.sass', '2-lines-between-rulesets.expected.sass'); - }); - - it('Invalid string value => should should not change anything', function() { - let test = new Test(this, { 'lines-between-rulesets': '\n' }); - return test.shouldBeEqual('lines-between-rulesets.sass'); - }); - - it('Float number value => should be rounded', function() { - let test = new Test(this, { 'lines-between-rulesets': 0.5 }); - return test.shouldBeEqual('lines-between-rulesets.sass', 'lines-between-rulesets.expected.sass'); - }); - }); -}); diff --git a/test/options/option_test.js b/test/options/option_test.js deleted file mode 100644 index e17e7e87..00000000 --- a/test/options/option_test.js +++ /dev/null @@ -1,54 +0,0 @@ -let assert = require('assert'); -let fs = require('fs'); -let path = require('path'); - -let Comb = require('../../lib/csscomb'); - -class OptionTest { - constructor(context, config) { - this.file = context.test.file; - this.syntax = context.test.parent.title; - - this.Comb = Comb; - this.comb = new Comb(); - if (config) this.comb.configure(config); - } - - useConfig(name) { - let config = Comb.getConfig(name); - this.comb.configure(config); - } - - getErrors(filename) { - let input = this.readFile(filename); - return this.comb.lintString(input, {syntax: this.syntax}); - } - - shouldBeEqual(inputFile, expectedFile) { - let input = this.readFile(inputFile); - let expected = expectedFile ? this.readFile(expectedFile) : input; - - return this.comb.processString(input, {syntax: this.syntax}) - .then(string => assert.equal(string, expected)); - } - - /** - * Detect options in a file and compare result with expected. - * File names should be relative to test suite's folder. - * @param {Array} options List of options that should be detected - * @param {String} input Name of template file - * @param {Object} expected Expected config with detected options - */ - shouldDetect(options, input, expected) { - let detectedConfig = Comb.detectInString(input, options); - assert.deepEqual(detectedConfig, expected); - } - - readFile(filename) { - let dirname = path.dirname(this.file); - let filePath = path.join(dirname, this.syntax, filename); - return fs.readFileSync(filePath, 'utf8'); - } -} - -module.exports = OptionTest; diff --git a/test/options/quotes/detect/test.js b/test/options/quotes/detect/test.js deleted file mode 100644 index 959a4abb..00000000 --- a/test/options/quotes/detect/test.js +++ /dev/null @@ -1,51 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `quotes`, detect', function() { - describe('css', function() { - it('Should not detect quotes when there are none', function() { - let test = new Test(this); - test.shouldDetect( - ['quotes'], - 'a { color:red }', - {} - ); - }); - - it('Should detect double quotes', function() { - let test = new Test(this); - test.shouldDetect( - ['quotes'], - 'a { content: "foo" }', - {quotes: 'double'} - ); - }); - - it('Should detect single quotes', function() { - let test = new Test(this); - test.shouldDetect( - ['quotes'], - 'a { content: \'foo\' }', - {quotes: 'single'} - ); - }); - - it('Should detect single quotes in attribute', function() { - let test = new Test(this); - test.shouldDetect( - ['quotes'], - 'a[class^=\'foo\'] { color: red }', - {quotes: 'single'} - ); - }); - - it('Should detect double quotes in url', function() { - let test = new Test(this); - test.shouldDetect( - ['quotes'], - 'a { background: url("foo.png") }', - {quotes: 'double'} - ); - }); - }); -}); - diff --git a/test/options/quotes/lint/test.js b/test/options/quotes/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/quotes/process/test.js b/test/options/quotes/process/test.js deleted file mode 100644 index e37562e2..00000000 --- a/test/options/quotes/process/test.js +++ /dev/null @@ -1,60 +0,0 @@ -var assert = require('assert'); -let Test = require('../../option_test'); - -describe('Option `quotes`, process', function() { - describe('css', function() { - it('Invalid String should not change quotes', function() { - let test = new Test(this, {quotes: 3}); - return test.comb.processString( - 'a { content: "" }b { content: \'\' }' - ).then(function(actual) { - assert.equal(actual, 'a { content: "" }b { content: \'\' }'); - }); - }); - - it('`single` value should set the quotes to single', function() { - let test = new Test(this, {quotes: 'single'}); - return test.comb.processString( - 'a { content: "" }b { content: \'\' }' - ).then(function(actual) { - assert.equal(actual, 'a { content: \'\' }b { content: \'\' }'); - }); - }); - - it('`double` value should set the quotes to double', function() { - let test = new Test(this, {quotes: 'double'}); - return test.comb.processString( - 'a { content: "" }b { content: \'\' }' - ).then(function(actual) { - assert.equal(actual, 'a { content: "" }b { content: "" }'); - }); - }); - - it('`double` value should set the quotes to double in attrs and urls', function() { - let test = new Test(this, {quotes: 'double'}); - return test.comb.processString( - 'a[class^=\'foo\'] { background: url(\'foo.png\') }' - ).then(function(actual) { - assert.equal(actual, 'a[class^="foo"] { background: url("foo.png") }'); - }); - }); - - it('`double` value should escape the unescaped double quotes on change', function() { - let test = new Test(this, {quotes: 'double'}); - return test.comb.processString( - 'a { content: "\\"" }b { content: \'"\' }' - ).then(function(actual) { - assert.equal(actual, 'a { content: "\\"" }b { content: "\\"" }'); - }); - }); - - it('`single` value should unescape the escaped double quotes on change', function() { - let test = new Test(this, {quotes: 'single'}); - return test.comb.processString( - 'a { content: "\\"" }' - ).then(function(actual) { - assert.equal(actual, 'a { content: \'"\' }'); - }); - }); - }); -}); diff --git a/test/options/remove-empty-rulesets/detect/test.js b/test/options/remove-empty-rulesets/detect/test.js deleted file mode 100644 index 2fa734f5..00000000 --- a/test/options/remove-empty-rulesets/detect/test.js +++ /dev/null @@ -1,78 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `remove-empty-rulesets`, detect', function() { - describe('css', function() { - it('Should detect test option set to `true`', function() { - let test = new Test(this); - test.shouldDetect( - ['remove-empty-rulesets'], - 'a { color: red }', - {'remove-empty-rulesets': true} - ); - }); - - it('Should detect test option set to `false` with empty block', function() { - let test = new Test(this); - test.shouldDetect( - ['remove-empty-rulesets'], - 'a {}', - {'remove-empty-rulesets': false} - ); - }); - - it('Should detect test option set to `false` with block containing whitespace', function() { - let test = new Test(this); - test.shouldDetect( - ['remove-empty-rulesets'], - 'a { }', - {'remove-empty-rulesets': false} - ); - }); - - it('Should detect test option set to `true` with block containing comment', function() { - let test = new Test(this); - test.shouldDetect( - ['remove-empty-rulesets'], - 'a { /* Hello */ }', - {'remove-empty-rulesets': true} - ); - }); - - it('Should detect test option set to `true` with media query containing block', function() { - let test = new Test(this); - test.shouldDetect( - ['remove-empty-rulesets'], - '@media all and (min-width:0) { a { /* Hello */ } }', - {'remove-empty-rulesets': true} - ); - }); - - it('Should detect test option set to `true` with media query containing comment', function() { - let test = new Test(this); - test.shouldDetect( - ['remove-empty-rulesets'], - '@media all and (min-width:0) {/* Hello */}', - {'remove-empty-rulesets': true} - ); - }); - - it('Should detect test option set to `false` with empty media query', function() { - let test = new Test(this); - test.shouldDetect( - ['remove-empty-rulesets'], - '@media all and (min-width:0) {}', - {'remove-empty-rulesets': false} - ); - }); - - it('Should detect test option set to `false` with media query containing whitespace', function() { - let test = new Test(this); - test.shouldDetect( - ['remove-empty-rulesets'], - '@media all and (min-width:0) { \n }', - {'remove-empty-rulesets': false} - ); - }); - }); -}); - diff --git a/test/options/remove-empty-rulesets/lint/test.js b/test/options/remove-empty-rulesets/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/remove-empty-rulesets/process/less/1.expected.less b/test/options/remove-empty-rulesets/process/less/1.expected.less deleted file mode 100644 index fbb76512..00000000 --- a/test/options/remove-empty-rulesets/process/less/1.expected.less +++ /dev/null @@ -1,14 +0,0 @@ -#a { - - #b { - text-align: right; - } - - - - #d { - .e { - text-align: center; - } - } -} diff --git a/test/options/remove-empty-rulesets/process/less/1.less b/test/options/remove-empty-rulesets/process/less/1.less deleted file mode 100644 index 6abc2477..00000000 --- a/test/options/remove-empty-rulesets/process/less/1.less +++ /dev/null @@ -1,14 +0,0 @@ -#a { - - #b { - text-align: right; - } - - #c { } - - #d { - .e { - text-align: center; - } - } -} diff --git a/test/options/remove-empty-rulesets/process/scss/empty-nested-rule.expected.scss b/test/options/remove-empty-rulesets/process/scss/empty-nested-rule.expected.scss deleted file mode 100644 index 8b137891..00000000 --- a/test/options/remove-empty-rulesets/process/scss/empty-nested-rule.expected.scss +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/options/remove-empty-rulesets/process/scss/empty-nested-rule.scss b/test/options/remove-empty-rulesets/process/scss/empty-nested-rule.scss deleted file mode 100644 index 89b0d979..00000000 --- a/test/options/remove-empty-rulesets/process/scss/empty-nested-rule.scss +++ /dev/null @@ -1,5 +0,0 @@ -.parent { - .child { - .grandchild { } - } -} diff --git a/test/options/remove-empty-rulesets/process/scss/include.scss b/test/options/remove-empty-rulesets/process/scss/include.scss deleted file mode 100644 index 70d39a59..00000000 --- a/test/options/remove-empty-rulesets/process/scss/include.scss +++ /dev/null @@ -1,4 +0,0 @@ -.parent { - @include mix-all; - @include mix-top; -} diff --git a/test/options/remove-empty-rulesets/process/scss/nested-rule-1.scss b/test/options/remove-empty-rulesets/process/scss/nested-rule-1.scss deleted file mode 100644 index f69f70a2..00000000 --- a/test/options/remove-empty-rulesets/process/scss/nested-rule-1.scss +++ /dev/null @@ -1,6 +0,0 @@ -.parent { - .child { - @include mix-all; - @include mix-top; - } -} diff --git a/test/options/remove-empty-rulesets/process/scss/nested-rule-2.expected.scss b/test/options/remove-empty-rulesets/process/scss/nested-rule-2.expected.scss deleted file mode 100644 index b020e30f..00000000 --- a/test/options/remove-empty-rulesets/process/scss/nested-rule-2.expected.scss +++ /dev/null @@ -1,7 +0,0 @@ -.parent { - .child1 { - @include mix-all; - @include mix-top; - } - -} diff --git a/test/options/remove-empty-rulesets/process/scss/nested-rule-2.scss b/test/options/remove-empty-rulesets/process/scss/nested-rule-2.scss deleted file mode 100644 index f5eedd44..00000000 --- a/test/options/remove-empty-rulesets/process/scss/nested-rule-2.scss +++ /dev/null @@ -1,9 +0,0 @@ -.parent { - .child1 { - @include mix-all; - @include mix-top; - } - .child2 { - .grandchild { } - } -} diff --git a/test/options/remove-empty-rulesets/process/test.js b/test/options/remove-empty-rulesets/process/test.js deleted file mode 100644 index c80097b5..00000000 --- a/test/options/remove-empty-rulesets/process/test.js +++ /dev/null @@ -1,96 +0,0 @@ -var assert = require('assert'); -let Test = require('../../option_test'); - -describe('Option `remove-empty-rulesets`, process', function() { - describe('css', function() { - it('Configured with invalid value, should not remove empty ruleset', function() { - let test = new Test(this, {'remove-empty-rulesets': 'foobar'}); - return test.comb.processString('a { width: 10px; } b {}') - .then(function(actual) { - assert.equal(actual, 'a { width: 10px; } b {}'); - }); - }); - - it('Should remove empty ruleset', function() { - let test = new Test(this, {'remove-empty-rulesets': true}); - return test.comb.processString(' b {} ') - .then(function(actual) { - assert.equal(actual, ' '); - }); - }); - - it('Should remove ruleset with spaces', function() { - let test = new Test(this, {'remove-empty-rulesets': true}); - return test.comb.processString(' b { } ') - .then(function(actual) { - assert.equal(actual, ' '); - }); - }); - - it('Should leave ruleset with declarations', function() { - let test = new Test(this, {'remove-empty-rulesets': true}); - return test.comb.processString('a { width: 10px; }\nb {} ') - .then(function(actual) { - assert.equal(actual, 'a { width: 10px; }\n '); - }); - }); - - it('Should leave ruleset with comments', function() { - let test = new Test(this, {'remove-empty-rulesets': true}); - return test.comb.processString('a { /* comment */ }\nb {} ') - .then(function(actual) { - assert.equal(actual, 'a { /* comment */ }\n '); - }); - }); - }); - - describe('less', function() { - it('Issue 201. Test 1', function() { - let test = new Test(this, {'remove-empty-rulesets': true}); - return test.shouldBeEqual('1.less', '1.expected.less'); - }); - - it('Issue 201. Test 2', function() { - let test = new Test(this, {'remove-empty-rulesets': true}); - let string = '#a {#b {} #d {}}'; - return test.comb.processString(string, {syntax: 'less'}) - .then(function(actual) { - assert.equal(actual, ''); - }); - }); - - it('Issue 201. Test 3', function() { - let test = new Test(this, { - 'remove-empty-rulesets': false, - 'always-semicolon': true - }); - let string = '#a {#b {} #d {}}'; - return test.comb.processString(string, {syntax: 'less'}) - .then(function(actual) { - assert.equal(actual, string); - }); - }); - }); - - describe('scss', function() { - it('Should not remove rulesets which contain only includes', function() { - let test = new Test(this, {'remove-empty-rulesets': true}); - return test.shouldBeEqual('include.scss'); - }); - - it('Should remove rulesets with contain only empty nested rules', function() { - let test = new Test(this, {'remove-empty-rulesets': true}); - return test.shouldBeEqual('empty-nested-rule.scss', 'empty-nested-rule.expected.scss'); - }); - - it('Should not remove rulesets with non-empty nested rules. Test 1', function() { - let test = new Test(this, {'remove-empty-rulesets': true}); - return test.shouldBeEqual('nested-rule-1.scss'); - }); - - it('Should not remove rulesets with non-empty nested rules. Test 2', function() { - let test = new Test(this, {'remove-empty-rulesets': true}); - return test.shouldBeEqual('nested-rule-2.scss', 'nested-rule-2.expected.scss'); - }); - }); -}); diff --git a/test/options/sort-order-fallback/detect/test.js b/test/options/sort-order-fallback/detect/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/sort-order-fallback/lint/test.js b/test/options/sort-order-fallback/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/sort-order-fallback/process/css/same-property.css b/test/options/sort-order-fallback/process/css/same-property.css deleted file mode 100644 index 8af2a139..00000000 --- a/test/options/sort-order-fallback/process/css/same-property.css +++ /dev/null @@ -1,4 +0,0 @@ -button { - outline: 1px dotted; - outline: 5px auto -webkit-focus-ring-color; -} diff --git a/test/options/sort-order-fallback/process/css/test-2.expected.css b/test/options/sort-order-fallback/process/css/test-2.expected.css deleted file mode 100644 index dd35868e..00000000 --- a/test/options/sort-order-fallback/process/css/test-2.expected.css +++ /dev/null @@ -1,11 +0,0 @@ -a { - top: 0; - left: 0; - - -moz-color: zebra; - color: tomato; - -webkit-float: left; - float: right; - font-size: 1em; - position: absolute; - } diff --git a/test/options/sort-order-fallback/process/css/test-3.expected.css b/test/options/sort-order-fallback/process/css/test-3.expected.css deleted file mode 100644 index 8e312988..00000000 --- a/test/options/sort-order-fallback/process/css/test-3.expected.css +++ /dev/null @@ -1,11 +0,0 @@ -a { - top: 0; - left: 0; - - color: tomato; - font-size: 1em; - position: absolute; - -webkit-float: left; - -moz-color: zebra; - float: right; - } diff --git a/test/options/sort-order-fallback/process/css/test.css b/test/options/sort-order-fallback/process/css/test.css deleted file mode 100644 index d57de84a..00000000 --- a/test/options/sort-order-fallback/process/css/test.css +++ /dev/null @@ -1,10 +0,0 @@ -a { - color: tomato; - font-size: 1em; - top: 0; - position: absolute; - left: 0; - -webkit-float: left; - -moz-color: zebra; - float: right; - } diff --git a/test/options/sort-order-fallback/process/css/test.expected.css b/test/options/sort-order-fallback/process/css/test.expected.css deleted file mode 100644 index ec1c2a8f..00000000 --- a/test/options/sort-order-fallback/process/css/test.expected.css +++ /dev/null @@ -1,12 +0,0 @@ -a { - top: 0; - left: 0; - - -moz-color: zebra; - -webkit-float: left; - float: right; - font-size: 1em; - position: absolute; - - color: tomato; - } diff --git a/test/options/sort-order-fallback/process/scss/leftovers-variable.expected.scss b/test/options/sort-order-fallback/process/scss/leftovers-variable.expected.scss deleted file mode 100644 index a7d2eca2..00000000 --- a/test/options/sort-order-fallback/process/scss/leftovers-variable.expected.scss +++ /dev/null @@ -1 +0,0 @@ -div {$blue: steelblue; $red: tomato; } diff --git a/test/options/sort-order-fallback/process/scss/leftovers-variable.scss b/test/options/sort-order-fallback/process/scss/leftovers-variable.scss deleted file mode 100644 index efe7eb6c..00000000 --- a/test/options/sort-order-fallback/process/scss/leftovers-variable.scss +++ /dev/null @@ -1 +0,0 @@ -div {$red: tomato; $blue: steelblue; } diff --git a/test/options/sort-order-fallback/process/test.js b/test/options/sort-order-fallback/process/test.js deleted file mode 100644 index 6ef495e0..00000000 --- a/test/options/sort-order-fallback/process/test.js +++ /dev/null @@ -1,55 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `sort-order-fallback`, process', function() { - describe('css', function() { - it('Should sort leftovers alphabetically if `sort-order-fallback` is set', function() { - let config = { - 'sort-order-fallback': 'abc', - 'sort-order': [ - ['top', 'left'], - ['...'], - ['color'] - ] - }; - let test = new Test(this, config); - return test.shouldBeEqual('test.css', 'test.expected.css'); - }); - - it('Should sort unknown properties alphabetically if `sort-order-fallback` is set', function() { - let config = { - 'sort-order-fallback': 'abc', - 'sort-order': ['top', 'left'] - }; - let test = new Test(this, config); - return test.shouldBeEqual('test.css', 'test-2.expected.css'); - }); - - it('Properties of the same name should stay in the same order', function() { - let config = { - 'sort-order': ['...'], - 'sort-order-fallback': 'abc' - }; - let test = new Test(this, config); - return test.shouldBeEqual('same-property.css'); - }); - - it('Should leave leftovers as is if `sort-order-fallback` is not set', function() { - let config = { - 'sort-order': ['top', 'left'] - }; - let test = new Test(this, config); - return test.shouldBeEqual('test.css', 'test-3.expected.css'); - }); - }); - - describe('scss', function() { - it('Should sort leftover variables alphabetically', function() { - let config = { - 'sort-order': [], - 'sort-order-fallback': 'abc' - }; - let test = new Test(this, config); - return test.shouldBeEqual('leftovers-variable.scss', 'leftovers-variable.expected.scss'); - }); - }); -}); diff --git a/test/options/sort-order/detect/test.js b/test/options/sort-order/detect/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/sort-order/lint/test.js b/test/options/sort-order/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/sort-order/process/css/data-uri.css b/test/options/sort-order/process/css/data-uri.css deleted file mode 100644 index 3552dfe5..00000000 --- a/test/options/sort-order/process/css/data-uri.css +++ /dev/null @@ -1,7 +0,0 @@ -a -{ - color: tomato; - background: #D2D2D2 no-repeat url('data:image/svg+xml;charset=US-ASCII.naninani'); - position: absolute; -} - diff --git a/test/options/sort-order/process/css/data-uri.expected.css b/test/options/sort-order/process/css/data-uri.expected.css deleted file mode 100644 index 74b14a23..00000000 --- a/test/options/sort-order/process/css/data-uri.expected.css +++ /dev/null @@ -1,7 +0,0 @@ -a -{ - position: absolute; - background: #D2D2D2 no-repeat url('data:image/svg+xml;charset=US-ASCII.naninani'); - color: tomato; -} - diff --git a/test/options/sort-order/process/css/issue-94-1.css b/test/options/sort-order/process/css/issue-94-1.css deleted file mode 100644 index 54131c51..00000000 --- a/test/options/sort-order/process/css/issue-94-1.css +++ /dev/null @@ -1,18 +0,0 @@ -.test -{ - position: absolute; - top: -1px; - right: -1px; - bottom: -1px; - left: -1px; - - border: 1px solid transparent; - border-color: rgba(0,0,0,0.38) rgba(0,0,0,0.27) rgba(0,0,0,0.16); - - background: -webkit-linear-gradient(#fff, #fff); - background: linear-gradient(#fff, #fff); - background-clip: padding-box; - background-size: 16px 16px; - - -webkit-appearance: textfield; -} diff --git a/test/options/sort-order/process/css/issue-94-1.expected.css b/test/options/sort-order/process/css/issue-94-1.expected.css deleted file mode 100644 index 0943808b..00000000 --- a/test/options/sort-order/process/css/issue-94-1.expected.css +++ /dev/null @@ -1,17 +0,0 @@ -.test -{ - position: absolute; - top: -1px; - right: -1px; - bottom: -1px; - left: -1px; - - border: 1px solid transparent; - border-color: rgba(0,0,0,.38) rgba(0,0,0,.27) rgba(0,0,0,.16); - background: -webkit-linear-gradient(#fff, #fff); - background: linear-gradient(#fff, #fff); - background-clip: padding-box; - background-size: 16px 16px; - - -webkit-appearance: textfield; -} diff --git a/test/options/sort-order/process/css/issue-94-2.css b/test/options/sort-order/process/css/issue-94-2.css deleted file mode 100644 index 0365913c..00000000 --- a/test/options/sort-order/process/css/issue-94-2.css +++ /dev/null @@ -1,19 +0,0 @@ -.test -{ - width: 0; - width: 100%; - height: 0; - - background: #fff; - color: #000; - - display: -moz-inline-stack; - display: inline-block; - - position: absolute; - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; -} diff --git a/test/options/sort-order/process/css/issue-94-2.expected.css b/test/options/sort-order/process/css/issue-94-2.expected.css deleted file mode 100644 index 85e618de..00000000 --- a/test/options/sort-order/process/css/issue-94-2.expected.css +++ /dev/null @@ -1,19 +0,0 @@ -.test -{ - position: absolute; - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - - display: -moz-inline-stack; - display: inline-block; - - width: 0; - width: 100%; - height: 0; - - color: #000; - background: #fff; -} diff --git a/test/options/sort-order/process/css/issue-94-3.css b/test/options/sort-order/process/css/issue-94-3.css deleted file mode 100644 index 872eddcf..00000000 --- a/test/options/sort-order/process/css/issue-94-3.css +++ /dev/null @@ -1,21 +0,0 @@ -.input-view { - position: absolute; - -webkit-appearance: none; - right: -1px; - bottom: -1px; - left: -1px; - - border: 1px solid transparent; - - top: -1px; - - background: -webkit-linear-gradient(#FFF, #FFF); - background: linear-gradient(#FFF, #FFF); - background-clip: padding-box; - background-size: 16px 16px; - box-shadow: 0 1px 0 rgba(255,255,255,0.2), inset 0 1px 1px rgba(0,0,0,0.1); - - border-color: rgba(0,0,0,0.27); - border-top-color: rgba(0,0,0,0.38); - border-bottom-color: rgba(0,0,0,0.16); -} diff --git a/test/options/sort-order/process/css/issue-94-3.expected.css b/test/options/sort-order/process/css/issue-94-3.expected.css deleted file mode 100644 index 92f29432..00000000 --- a/test/options/sort-order/process/css/issue-94-3.expected.css +++ /dev/null @@ -1,20 +0,0 @@ -.input-view -{ - position: absolute; - top: -1px; - right: -1px; - bottom: -1px; - left: -1px; - - border: 1px solid transparent; - border-color: rgba(0,0,0,.27); - border-top-color: rgba(0,0,0,.38); - border-bottom-color: rgba(0,0,0,.16); - background: -webkit-linear-gradient(#fff, #fff); - background: linear-gradient(#fff, #fff); - background-clip: padding-box; - background-size: 16px 16px; - box-shadow: 0 1px 0 rgba(255,255,255,.2), inset 0 1px 1px rgba(0,0,0,.1); - - -webkit-appearance: none; -} diff --git a/test/options/sort-order/process/css/leftovers-1.css b/test/options/sort-order/process/css/leftovers-1.css deleted file mode 100644 index d559d4e3..00000000 --- a/test/options/sort-order/process/css/leftovers-1.css +++ /dev/null @@ -1,20 +0,0 @@ -a -{ - leftover: yay; - z-index: 1; - position: absolute; -} - -b -{ - z-index: 2; - leftover: yay; - position: absolute; -} - -c -{ - z-index: 3; - position: absolute; - leftover: yay; -} diff --git a/test/options/sort-order/process/css/leftovers-1.expected.css b/test/options/sort-order/process/css/leftovers-1.expected.css deleted file mode 100644 index 145b83db..00000000 --- a/test/options/sort-order/process/css/leftovers-1.expected.css +++ /dev/null @@ -1,23 +0,0 @@ -a -{ - position: absolute; - z-index: 1; - - leftover: yay; -} - -b -{ - position: absolute; - z-index: 2; - - leftover: yay; -} - -c -{ - position: absolute; - z-index: 3; - - leftover: yay; -} diff --git a/test/options/sort-order/process/css/leftovers-2.css b/test/options/sort-order/process/css/leftovers-2.css deleted file mode 100644 index d559d4e3..00000000 --- a/test/options/sort-order/process/css/leftovers-2.css +++ /dev/null @@ -1,20 +0,0 @@ -a -{ - leftover: yay; - z-index: 1; - position: absolute; -} - -b -{ - z-index: 2; - leftover: yay; - position: absolute; -} - -c -{ - z-index: 3; - position: absolute; - leftover: yay; -} diff --git a/test/options/sort-order/process/css/leftovers-2.expected.css b/test/options/sort-order/process/css/leftovers-2.expected.css deleted file mode 100644 index 05c82928..00000000 --- a/test/options/sort-order/process/css/leftovers-2.expected.css +++ /dev/null @@ -1,23 +0,0 @@ -a -{ - leftover: yay; - - position: absolute; - z-index: 1; -} - -b -{ - leftover: yay; - - position: absolute; - z-index: 2; -} - -c -{ - leftover: yay; - - position: absolute; - z-index: 3; -} diff --git a/test/options/sort-order/process/css/leftovers-3.css b/test/options/sort-order/process/css/leftovers-3.css deleted file mode 100644 index d559d4e3..00000000 --- a/test/options/sort-order/process/css/leftovers-3.css +++ /dev/null @@ -1,20 +0,0 @@ -a -{ - leftover: yay; - z-index: 1; - position: absolute; -} - -b -{ - z-index: 2; - leftover: yay; - position: absolute; -} - -c -{ - z-index: 3; - position: absolute; - leftover: yay; -} diff --git a/test/options/sort-order/process/css/leftovers-3.expected.css b/test/options/sort-order/process/css/leftovers-3.expected.css deleted file mode 100644 index 9522dc50..00000000 --- a/test/options/sort-order/process/css/leftovers-3.expected.css +++ /dev/null @@ -1,20 +0,0 @@ -a -{ - leftover: yay; - position: absolute; - z-index: 1; -} - -b -{ - leftover: yay; - position: absolute; - z-index: 2; -} - -c -{ - leftover: yay; - position: absolute; - z-index: 3; -} diff --git a/test/options/sort-order/process/css/leftovers-4.css b/test/options/sort-order/process/css/leftovers-4.css deleted file mode 100644 index d559d4e3..00000000 --- a/test/options/sort-order/process/css/leftovers-4.css +++ /dev/null @@ -1,20 +0,0 @@ -a -{ - leftover: yay; - z-index: 1; - position: absolute; -} - -b -{ - z-index: 2; - leftover: yay; - position: absolute; -} - -c -{ - z-index: 3; - position: absolute; - leftover: yay; -} diff --git a/test/options/sort-order/process/css/leftovers-4.expected.css b/test/options/sort-order/process/css/leftovers-4.expected.css deleted file mode 100644 index 874c72a4..00000000 --- a/test/options/sort-order/process/css/leftovers-4.expected.css +++ /dev/null @@ -1,20 +0,0 @@ -a -{ - position: absolute; - leftover: yay; - z-index: 1; -} - -b -{ - position: absolute; - leftover: yay; - z-index: 2; -} - -c -{ - position: absolute; - leftover: yay; - z-index: 3; -} diff --git a/test/options/sort-order/process/css/missing-delimiter.css b/test/options/sort-order/process/css/missing-delimiter.css deleted file mode 100644 index cdba2d46..00000000 --- a/test/options/sort-order/process/css/missing-delimiter.css +++ /dev/null @@ -1,4 +0,0 @@ -a { - z-index: 2; - position: absolute -} diff --git a/test/options/sort-order/process/css/missing-delimiter.expected.css b/test/options/sort-order/process/css/missing-delimiter.expected.css deleted file mode 100644 index f619ac51..00000000 --- a/test/options/sort-order/process/css/missing-delimiter.expected.css +++ /dev/null @@ -1,4 +0,0 @@ -a { - position: absolute; - z-index: 2; -} diff --git a/test/options/sort-order/process/css/multiple-groups-2.css b/test/options/sort-order/process/css/multiple-groups-2.css deleted file mode 100644 index 79291aba..00000000 --- a/test/options/sort-order/process/css/multiple-groups-2.css +++ /dev/null @@ -1,6 +0,0 @@ -a -{ - color: tomato; - top: 0; -} - diff --git a/test/options/sort-order/process/css/multiple-groups-2.expected.css b/test/options/sort-order/process/css/multiple-groups-2.expected.css deleted file mode 100644 index 96a0ec2e..00000000 --- a/test/options/sort-order/process/css/multiple-groups-2.expected.css +++ /dev/null @@ -1,7 +0,0 @@ -a -{ - top: 0; - - color: tomato; -} - diff --git a/test/options/sort-order/process/css/multiple-groups-comments.css b/test/options/sort-order/process/css/multiple-groups-comments.css deleted file mode 100644 index 5012f20f..00000000 --- a/test/options/sort-order/process/css/multiple-groups-comments.css +++ /dev/null @@ -1,5 +0,0 @@ -a, b, i /* foobar */ -{ - padding: 0; - margin: 0; - } diff --git a/test/options/sort-order/process/css/multiple-groups-comments.expected.css b/test/options/sort-order/process/css/multiple-groups-comments.expected.css deleted file mode 100644 index 49a1ba88..00000000 --- a/test/options/sort-order/process/css/multiple-groups-comments.expected.css +++ /dev/null @@ -1,6 +0,0 @@ -a, b, i /* foobar */ -{ - margin: 0; - - padding: 0; - } diff --git a/test/options/sort-order/process/css/multiple-groups.css b/test/options/sort-order/process/css/multiple-groups.css deleted file mode 100644 index a16d45e7..00000000 --- a/test/options/sort-order/process/css/multiple-groups.css +++ /dev/null @@ -1,7 +0,0 @@ -a -{ - z-index: 2; - position: absolute; - height: 2px; - width: 2px; -} diff --git a/test/options/sort-order/process/css/multiple-groups.expected.css b/test/options/sort-order/process/css/multiple-groups.expected.css deleted file mode 100644 index 3f27b458..00000000 --- a/test/options/sort-order/process/css/multiple-groups.expected.css +++ /dev/null @@ -1,8 +0,0 @@ -a -{ - position: absolute; - z-index: 2; - - width: 2px; - height: 2px; -} diff --git a/test/options/sort-order/process/css/single-group-comments.css b/test/options/sort-order/process/css/single-group-comments.css deleted file mode 100644 index dc78ba3b..00000000 --- a/test/options/sort-order/process/css/single-group-comments.css +++ /dev/null @@ -1,5 +0,0 @@ -div p em { - /* upline comment */ - font-style:italic; - border-bottom:1px solid red; /* trololo */ /* trololo */ -} diff --git a/test/options/sort-order/process/css/single-group-comments.expected.css b/test/options/sort-order/process/css/single-group-comments.expected.css deleted file mode 100644 index ca4e1665..00000000 --- a/test/options/sort-order/process/css/single-group-comments.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -div p em { - border-bottom:1px solid red; /* trololo */ /* trololo */ - /* upline comment */ - font-style:italic; -} diff --git a/test/options/sort-order/process/css/single-group.css b/test/options/sort-order/process/css/single-group.css deleted file mode 100644 index ed8925d0..00000000 --- a/test/options/sort-order/process/css/single-group.css +++ /dev/null @@ -1,5 +0,0 @@ -a -{ - z-index: 2; - position: absolute; -} diff --git a/test/options/sort-order/process/css/single-group.expected.css b/test/options/sort-order/process/css/single-group.expected.css deleted file mode 100644 index 5bcb46c2..00000000 --- a/test/options/sort-order/process/css/single-group.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -a -{ - position: absolute; - z-index: 2; -} diff --git a/test/options/sort-order/process/less/comments-1.expected.less b/test/options/sort-order/process/less/comments-1.expected.less deleted file mode 100644 index a9b2976c..00000000 --- a/test/options/sort-order/process/less/comments-1.expected.less +++ /dev/null @@ -1 +0,0 @@ -div {top: 0; /* 3 */ /* 4 *//* 1 */ color: tomato; /* 2 */ } diff --git a/test/options/sort-order/process/less/comments-1.less b/test/options/sort-order/process/less/comments-1.less deleted file mode 100644 index 617d4fdc..00000000 --- a/test/options/sort-order/process/less/comments-1.less +++ /dev/null @@ -1 +0,0 @@ -div {/* 1 */ color: tomato; /* 2 */ top: 0; /* 3 */ /* 4 */} diff --git a/test/options/sort-order/process/less/comments-2.expected.less b/test/options/sort-order/process/less/comments-2.expected.less deleted file mode 100644 index 0aa257a7..00000000 --- a/test/options/sort-order/process/less/comments-2.expected.less +++ /dev/null @@ -1,7 +0,0 @@ -div { - /* 2 */ - /* 3 */ - top: 0; /* 4 */ - color: tomato; /* 1 */ - /* 5 */ -} diff --git a/test/options/sort-order/process/less/comments-2.less b/test/options/sort-order/process/less/comments-2.less deleted file mode 100644 index 18e6319b..00000000 --- a/test/options/sort-order/process/less/comments-2.less +++ /dev/null @@ -1,7 +0,0 @@ -div { - color: tomato; /* 1 */ - /* 2 */ - /* 3 */ - top: 0; /* 4 */ - /* 5 */ -} diff --git a/test/options/sort-order/process/less/comments-3.expected.less b/test/options/sort-order/process/less/comments-3.expected.less deleted file mode 100644 index 7bf0938d..00000000 --- a/test/options/sort-order/process/less/comments-3.expected.less +++ /dev/null @@ -1,6 +0,0 @@ -p { - // Get in line! - @var: white; - /* One hell of a comment */ - color: tomato; -} diff --git a/test/options/sort-order/process/less/comments-3.less b/test/options/sort-order/process/less/comments-3.less deleted file mode 100644 index c7f0a84f..00000000 --- a/test/options/sort-order/process/less/comments-3.less +++ /dev/null @@ -1,6 +0,0 @@ -p { - /* One hell of a comment */ - color: tomato; - // Get in line! - @var: white; -} diff --git a/test/options/sort-order/process/less/comments-4.expected.less b/test/options/sort-order/process/less/comments-4.expected.less deleted file mode 100644 index 349b7702..00000000 --- a/test/options/sort-order/process/less/comments-4.expected.less +++ /dev/null @@ -1,4 +0,0 @@ -p { - @var: white; // Get in line! - color: tomato; /* One hell of a comment */ - } diff --git a/test/options/sort-order/process/less/comments-4.less b/test/options/sort-order/process/less/comments-4.less deleted file mode 100644 index b1db838f..00000000 --- a/test/options/sort-order/process/less/comments-4.less +++ /dev/null @@ -1,4 +0,0 @@ -p { - color: tomato; /* One hell of a comment */ - @var: white; // Get in line! - } diff --git a/test/options/sort-order/process/less/different-groups.expected.less b/test/options/sort-order/process/less/different-groups.expected.less deleted file mode 100644 index dddc16f8..00000000 --- a/test/options/sort-order/process/less/different-groups.expected.less +++ /dev/null @@ -1,5 +0,0 @@ -div { - top: 0; - - color: tomato; -} diff --git a/test/options/sort-order/process/less/different-groups.less b/test/options/sort-order/process/less/different-groups.less deleted file mode 100644 index 7ffa908a..00000000 --- a/test/options/sort-order/process/less/different-groups.less +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - top: 0; -} diff --git a/test/options/sort-order/process/less/extend.expected.less b/test/options/sort-order/process/less/extend.expected.less deleted file mode 100644 index 82f0e172..00000000 --- a/test/options/sort-order/process/less/extend.expected.less +++ /dev/null @@ -1,7 +0,0 @@ -.block { - &:extend(.foo); - color: black; -} -.a:extend(.b) { - color: pink; -} diff --git a/test/options/sort-order/process/less/extend.less b/test/options/sort-order/process/less/extend.less deleted file mode 100644 index 2d1fcff9..00000000 --- a/test/options/sort-order/process/less/extend.less +++ /dev/null @@ -1,7 +0,0 @@ -.block { - color: black; - &:extend(.foo); -} -.a:extend(.b) { - color: pink; -} diff --git a/test/options/sort-order/process/less/import.expected.less b/test/options/sort-order/process/less/import.expected.less deleted file mode 100644 index 9c403dfe..00000000 --- a/test/options/sort-order/process/less/import.expected.less +++ /dev/null @@ -1 +0,0 @@ -div {@import "foo.css"; color: tomato; } diff --git a/test/options/sort-order/process/less/import.less b/test/options/sort-order/process/less/import.less deleted file mode 100644 index 681ccd06..00000000 --- a/test/options/sort-order/process/less/import.less +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; @import "foo.css"; } diff --git a/test/options/sort-order/process/less/mixin-1.expected.less b/test/options/sort-order/process/less/mixin-1.expected.less deleted file mode 100644 index 11ac5fa5..00000000 --- a/test/options/sort-order/process/less/mixin-1.expected.less +++ /dev/null @@ -1,12 +0,0 @@ -.bordered { - border-top: dotted 1px black; - border-bottom: solid 2px black; -} -#menu a { - .bordered; - color: #111; - } -.post a { - .bordered; - color: red; - } diff --git a/test/options/sort-order/process/less/mixin-1.less b/test/options/sort-order/process/less/mixin-1.less deleted file mode 100644 index e5d5ad0b..00000000 --- a/test/options/sort-order/process/less/mixin-1.less +++ /dev/null @@ -1,12 +0,0 @@ -.bordered { - border-bottom: solid 2px black; - border-top: dotted 1px black; -} -#menu a { - color: #111; - .bordered; - } -.post a { - color: red; - .bordered; - } diff --git a/test/options/sort-order/process/less/mixin-2.expected.less b/test/options/sort-order/process/less/mixin-2.expected.less deleted file mode 100644 index 1535db16..00000000 --- a/test/options/sort-order/process/less/mixin-2.expected.less +++ /dev/null @@ -1,6 +0,0 @@ -.test { - .test1(); - .test2(); - top: 0; - color: tomato; - } diff --git a/test/options/sort-order/process/less/mixin-2.less b/test/options/sort-order/process/less/mixin-2.less deleted file mode 100644 index cbd0c8ea..00000000 --- a/test/options/sort-order/process/less/mixin-2.less +++ /dev/null @@ -1,6 +0,0 @@ -.test { - .test1(); - color: tomato; - .test2(); - top: 0; - } diff --git a/test/options/sort-order/process/less/mixin-3.expected.less b/test/options/sort-order/process/less/mixin-3.expected.less deleted file mode 100644 index 0e4c018d..00000000 --- a/test/options/sort-order/process/less/mixin-3.expected.less +++ /dev/null @@ -1,5 +0,0 @@ -.foo { - .linear-gradient(#fff; #000); - border: 1px solid #f00; - color: #0f0; -} diff --git a/test/options/sort-order/process/less/mixin-3.less b/test/options/sort-order/process/less/mixin-3.less deleted file mode 100644 index fce214a5..00000000 --- a/test/options/sort-order/process/less/mixin-3.less +++ /dev/null @@ -1,5 +0,0 @@ -.foo { - color: #0f0; - border: 1px solid #f00; - .linear-gradient(#fff; #000); -} diff --git a/test/options/sort-order/process/less/mixin-4.expected.less b/test/options/sort-order/process/less/mixin-4.expected.less deleted file mode 100644 index 94c24ed9..00000000 --- a/test/options/sort-order/process/less/mixin-4.expected.less +++ /dev/null @@ -1,9 +0,0 @@ -.block { - .last; - .hide-text; - - color: black; - - .media("lap"); - .media("palm"); -} diff --git a/test/options/sort-order/process/less/mixin-4.less b/test/options/sort-order/process/less/mixin-4.less deleted file mode 100644 index b405880c..00000000 --- a/test/options/sort-order/process/less/mixin-4.less +++ /dev/null @@ -1,7 +0,0 @@ -.block { - color: black; - .media("lap"); - .media("palm"); - .last; - .hide-text; -} diff --git a/test/options/sort-order/process/less/nested-rule-1.expected.less b/test/options/sort-order/process/less/nested-rule-1.expected.less deleted file mode 100644 index e85581f5..00000000 --- a/test/options/sort-order/process/less/nested-rule-1.expected.less +++ /dev/null @@ -1,6 +0,0 @@ -div { - color: tomato; a { - top: 0; - color: nani; - } -} diff --git a/test/options/sort-order/process/less/nested-rule-1.less b/test/options/sort-order/process/less/nested-rule-1.less deleted file mode 100644 index af115947..00000000 --- a/test/options/sort-order/process/less/nested-rule-1.less +++ /dev/null @@ -1,6 +0,0 @@ -div { - color: tomato; a { - color: nani; - top: 0; - } -} diff --git a/test/options/sort-order/process/less/nested-rule-2.expected.less b/test/options/sort-order/process/less/nested-rule-2.expected.less deleted file mode 100644 index 30c8b653..00000000 --- a/test/options/sort-order/process/less/nested-rule-2.expected.less +++ /dev/null @@ -1,7 +0,0 @@ -div { - left: 0; - color: tomato; a { - top: 0; - color: nani; - } -} diff --git a/test/options/sort-order/process/less/nested-rule-2.less b/test/options/sort-order/process/less/nested-rule-2.less deleted file mode 100644 index 52df5998..00000000 --- a/test/options/sort-order/process/less/nested-rule-2.less +++ /dev/null @@ -1,7 +0,0 @@ -div { - color: tomato; a { - color: nani; - top: 0; - } - left: 0; -} diff --git a/test/options/sort-order/process/less/rule.expected.less b/test/options/sort-order/process/less/rule.expected.less deleted file mode 100644 index 918bd37c..00000000 --- a/test/options/sort-order/process/less/rule.expected.less +++ /dev/null @@ -1,4 +0,0 @@ -div { - top: 0; - color: tomato; -} diff --git a/test/options/sort-order/process/less/rule.less b/test/options/sort-order/process/less/rule.less deleted file mode 100644 index 7ffa908a..00000000 --- a/test/options/sort-order/process/less/rule.less +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - top: 0; -} diff --git a/test/options/sort-order/process/less/variable.expected.less b/test/options/sort-order/process/less/variable.expected.less deleted file mode 100644 index e391754f..00000000 --- a/test/options/sort-order/process/less/variable.expected.less +++ /dev/null @@ -1 +0,0 @@ -div {@red: tomato; color: @red; } diff --git a/test/options/sort-order/process/less/variable.less b/test/options/sort-order/process/less/variable.less deleted file mode 100644 index 5c6756b9..00000000 --- a/test/options/sort-order/process/less/variable.less +++ /dev/null @@ -1 +0,0 @@ -div { color: @red; @red: tomato; } diff --git a/test/options/sort-order/process/sass/comments.expected.sass b/test/options/sort-order/process/sass/comments.expected.sass deleted file mode 100644 index a7986421..00000000 --- a/test/options/sort-order/process/sass/comments.expected.sass +++ /dev/null @@ -1,6 +0,0 @@ -div - /* 2 */ - /* 3 */ - top: 0 // 4 - color: tomato // 1 - /* 5 */ diff --git a/test/options/sort-order/process/sass/comments.sass b/test/options/sort-order/process/sass/comments.sass deleted file mode 100644 index 5f3f7cc7..00000000 --- a/test/options/sort-order/process/sass/comments.sass +++ /dev/null @@ -1,6 +0,0 @@ -div - color: tomato // 1 - /* 2 */ - /* 3 */ - top: 0 // 4 - /* 5 */ diff --git a/test/options/sort-order/process/sass/condition.expected.sass b/test/options/sort-order/process/sass/condition.expected.sass deleted file mode 100644 index 8ffeb9f6..00000000 --- a/test/options/sort-order/process/sass/condition.expected.sass +++ /dev/null @@ -1,6 +0,0 @@ -div - top: 0 - color: tomato - @if $color == tomato - font-size: 2px - display: block diff --git a/test/options/sort-order/process/sass/condition.sass b/test/options/sort-order/process/sass/condition.sass deleted file mode 100644 index 66379eea..00000000 --- a/test/options/sort-order/process/sass/condition.sass +++ /dev/null @@ -1,6 +0,0 @@ -div - color: tomato - @if $color == tomato - display: block - font-size: 2px - top: 0 diff --git a/test/options/sort-order/process/sass/different-groups.expected.sass b/test/options/sort-order/process/sass/different-groups.expected.sass deleted file mode 100644 index 2ffd1993..00000000 --- a/test/options/sort-order/process/sass/different-groups.expected.sass +++ /dev/null @@ -1,4 +0,0 @@ -div - top: 0 - - color: tomato diff --git a/test/options/sort-order/process/sass/different-groups.sass b/test/options/sort-order/process/sass/different-groups.sass deleted file mode 100644 index 6d835e28..00000000 --- a/test/options/sort-order/process/sass/different-groups.sass +++ /dev/null @@ -1,3 +0,0 @@ -div - color: tomato - top: 0 diff --git a/test/options/sort-order/process/sass/extend.expected.sass b/test/options/sort-order/process/sass/extend.expected.sass deleted file mode 100644 index 62ecc2e7..00000000 --- a/test/options/sort-order/process/sass/extend.expected.sass +++ /dev/null @@ -1,3 +0,0 @@ -div - @extend %nani - color: tomato diff --git a/test/options/sort-order/process/sass/extend.sass b/test/options/sort-order/process/sass/extend.sass deleted file mode 100644 index e4e3550d..00000000 --- a/test/options/sort-order/process/sass/extend.sass +++ /dev/null @@ -1,3 +0,0 @@ -div - color: tomato - @extend %nani diff --git a/test/options/sort-order/process/sass/import.expected.sass b/test/options/sort-order/process/sass/import.expected.sass deleted file mode 100644 index f1f2c6a5..00000000 --- a/test/options/sort-order/process/sass/import.expected.sass +++ /dev/null @@ -1,3 +0,0 @@ - div - @import "foo.css" - color: tomato diff --git a/test/options/sort-order/process/sass/import.sass b/test/options/sort-order/process/sass/import.sass deleted file mode 100644 index 659f76ee..00000000 --- a/test/options/sort-order/process/sass/import.sass +++ /dev/null @@ -1,3 +0,0 @@ - div - color: tomato - @import "foo.css" diff --git a/test/options/sort-order/process/sass/include-specified-1.expected.sass b/test/options/sort-order/process/sass/include-specified-1.expected.sass deleted file mode 100644 index dbc734c2..00000000 --- a/test/options/sort-order/process/sass/include-specified-1.expected.sass +++ /dev/null @@ -1,10 +0,0 @@ -.block - +last - +hide-text - - color: black - - +media(lap) - color: green - +media(palm) - color: red diff --git a/test/options/sort-order/process/sass/include-specified-1.sass b/test/options/sort-order/process/sass/include-specified-1.sass deleted file mode 100644 index 5782d546..00000000 --- a/test/options/sort-order/process/sass/include-specified-1.sass +++ /dev/null @@ -1,10 +0,0 @@ -.block - color: black - +media(lap) - color: green - - +media(palm) - color: red - - +last - +hide-text diff --git a/test/options/sort-order/process/sass/include-specified-2.expected.sass b/test/options/sort-order/process/sass/include-specified-2.expected.sass deleted file mode 100644 index 75cfdaae..00000000 --- a/test/options/sort-order/process/sass/include-specified-2.expected.sass +++ /dev/null @@ -1,10 +0,0 @@ -.block - @include last - @include hide-text - - color: black - - @include media(lap) - color: green - @include media(palm) - color: red diff --git a/test/options/sort-order/process/sass/include-specified-2.sass b/test/options/sort-order/process/sass/include-specified-2.sass deleted file mode 100644 index 9ca4de9c..00000000 --- a/test/options/sort-order/process/sass/include-specified-2.sass +++ /dev/null @@ -1,10 +0,0 @@ -.block - color: black - @include media(lap) - color: green - - @include media(palm) - color: red - - @include last - @include hide-text diff --git a/test/options/sort-order/process/sass/include.expected.sass b/test/options/sort-order/process/sass/include.expected.sass deleted file mode 100644 index 86ab0463..00000000 --- a/test/options/sort-order/process/sass/include.expected.sass +++ /dev/null @@ -1,3 +0,0 @@ -div - @include nani - color: tomato diff --git a/test/options/sort-order/process/sass/include.sass b/test/options/sort-order/process/sass/include.sass deleted file mode 100644 index 5b42a65f..00000000 --- a/test/options/sort-order/process/sass/include.sass +++ /dev/null @@ -1,3 +0,0 @@ -div - color: tomato - @include nani diff --git a/test/options/sort-order/process/sass/issue-332-2.expected.sass b/test/options/sort-order/process/sass/issue-332-2.expected.sass deleted file mode 100644 index 2c86fb96..00000000 --- a/test/options/sort-order/process/sass/issue-332-2.expected.sass +++ /dev/null @@ -1,46 +0,0 @@ -$contest_color: #ffc33c - -.winners_images_button - display: none -.winners_images - height: 100px - padding-left: 0.6% - padding-right: 0.6% - width: 100% - .winner_cell - float: left - height: 100px - width: 85px - .winner_avatar - background-repeat: no-repeat - background-size: 100% - border: 1px solid lightgray - float: left - height: 75px - width: 85px - .winner_year - color: black - float: left - font-family: bold_mic_font - font-size: 17px - height: 20px - margin-bottom: 5px - text-align: center - width: 85px - span - display: none - .winner_info - display: none - .winner_cell:hover - .winner_year - span - display: block - .tooltip-inner - font-size: 10pt - text-align: justify - h6 - color: white - font-family: bold_mic_font - font-size: 12pt - margin: 0 - text-align: center diff --git a/test/options/sort-order/process/sass/issue-332-2.sass b/test/options/sort-order/process/sass/issue-332-2.sass deleted file mode 100644 index d926fa86..00000000 --- a/test/options/sort-order/process/sass/issue-332-2.sass +++ /dev/null @@ -1,46 +0,0 @@ -$contest_color: #ffc33c - -.winners_images_button - display: none -.winners_images - width: 100% - padding-left: 0.6% - padding-right: 0.6% - height: 100px - .winner_cell - width: 85px - height: 100px - float: left - .winner_avatar - width: 85px - height: 75px - border: 1px solid lightgray - float: left - background-repeat: no-repeat - background-size: 100% - .winner_year - margin-bottom: 5px - text-align: center - float: left - width: 85px - height: 20px - font-size: 17px - color: black - font-family: bold_mic_font - span - display: none - .winner_info - display: none - .winner_cell:hover - .winner_year - span - display: block - .tooltip-inner - h6 - text-align: center - margin: 0 - font-family: bold_mic_font - color: white - font-size: 12pt - font-size: 10pt - text-align: justify diff --git a/test/options/sort-order/process/sass/issue-332.expected.sass b/test/options/sort-order/process/sass/issue-332.expected.sass deleted file mode 100644 index 390beee6..00000000 --- a/test/options/sort-order/process/sass/issue-332.expected.sass +++ /dev/null @@ -1,9 +0,0 @@ -.block - color: black - - +media(lap) - color: green - +media(palm) - color: red - +last - +hide-text diff --git a/test/options/sort-order/process/sass/issue-332.sass b/test/options/sort-order/process/sass/issue-332.sass deleted file mode 100644 index 3eee3b09..00000000 --- a/test/options/sort-order/process/sass/issue-332.sass +++ /dev/null @@ -1,11 +0,0 @@ -.block - +media(lap) - color: green - - +media(palm) - color: red - - color: black - - +last - +hide-text diff --git a/test/options/sort-order/process/sass/mixin.expected.sass b/test/options/sort-order/process/sass/mixin.expected.sass deleted file mode 100644 index e4410624..00000000 --- a/test/options/sort-order/process/sass/mixin.expected.sass +++ /dev/null @@ -1,4 +0,0 @@ -.foo - @include nani - top: 0 - color: tomato diff --git a/test/options/sort-order/process/sass/mixin.sass b/test/options/sort-order/process/sass/mixin.sass deleted file mode 100644 index d22987c8..00000000 --- a/test/options/sort-order/process/sass/mixin.sass +++ /dev/null @@ -1,4 +0,0 @@ -.foo - @include nani - color: tomato - top: 0 diff --git a/test/options/sort-order/process/sass/nested-rule-1.expected.sass b/test/options/sort-order/process/sass/nested-rule-1.expected.sass deleted file mode 100644 index 101521f8..00000000 --- a/test/options/sort-order/process/sass/nested-rule-1.expected.sass +++ /dev/null @@ -1,5 +0,0 @@ -div - color: tomato - a - top: 0 - color: nani diff --git a/test/options/sort-order/process/sass/nested-rule-1.sass b/test/options/sort-order/process/sass/nested-rule-1.sass deleted file mode 100644 index 3394a7c1..00000000 --- a/test/options/sort-order/process/sass/nested-rule-1.sass +++ /dev/null @@ -1,5 +0,0 @@ -div - color: tomato - a - color: nani - top: 0 diff --git a/test/options/sort-order/process/sass/nested-rule-2.expected.sass b/test/options/sort-order/process/sass/nested-rule-2.expected.sass deleted file mode 100644 index 54a0fb80..00000000 --- a/test/options/sort-order/process/sass/nested-rule-2.expected.sass +++ /dev/null @@ -1,6 +0,0 @@ -div - left: 0 - color: tomato - a - top: 0 - color: nani diff --git a/test/options/sort-order/process/sass/nested-rule-2.sass b/test/options/sort-order/process/sass/nested-rule-2.sass deleted file mode 100644 index 9815840e..00000000 --- a/test/options/sort-order/process/sass/nested-rule-2.sass +++ /dev/null @@ -1,6 +0,0 @@ -div - color: tomato - a - color: nani - top: 0 - left: 0 diff --git a/test/options/sort-order/process/sass/rule.expected.sass b/test/options/sort-order/process/sass/rule.expected.sass deleted file mode 100644 index c6e1f549..00000000 --- a/test/options/sort-order/process/sass/rule.expected.sass +++ /dev/null @@ -1,3 +0,0 @@ -div - top: 0 - color: tomato diff --git a/test/options/sort-order/process/sass/rule.sass b/test/options/sort-order/process/sass/rule.sass deleted file mode 100644 index 6d835e28..00000000 --- a/test/options/sort-order/process/sass/rule.sass +++ /dev/null @@ -1,3 +0,0 @@ -div - color: tomato - top: 0 diff --git a/test/options/sort-order/process/sass/ruleset.expected.sass b/test/options/sort-order/process/sass/ruleset.expected.sass deleted file mode 100644 index 54a0fb80..00000000 --- a/test/options/sort-order/process/sass/ruleset.expected.sass +++ /dev/null @@ -1,6 +0,0 @@ -div - left: 0 - color: tomato - a - top: 0 - color: nani diff --git a/test/options/sort-order/process/sass/ruleset.sass b/test/options/sort-order/process/sass/ruleset.sass deleted file mode 100644 index 9815840e..00000000 --- a/test/options/sort-order/process/sass/ruleset.sass +++ /dev/null @@ -1,6 +0,0 @@ -div - color: tomato - a - color: nani - top: 0 - left: 0 diff --git a/test/options/sort-order/process/sass/variable.expected.sass b/test/options/sort-order/process/sass/variable.expected.sass deleted file mode 100644 index c7c3634f..00000000 --- a/test/options/sort-order/process/sass/variable.expected.sass +++ /dev/null @@ -1,3 +0,0 @@ -div - $red: tomato - color: $tomato diff --git a/test/options/sort-order/process/sass/variable.sass b/test/options/sort-order/process/sass/variable.sass deleted file mode 100644 index 31bc5a3c..00000000 --- a/test/options/sort-order/process/sass/variable.sass +++ /dev/null @@ -1,3 +0,0 @@ -div - color: $tomato - $red: tomato diff --git a/test/options/sort-order/process/scss/comments-1.expected.scss b/test/options/sort-order/process/scss/comments-1.expected.scss deleted file mode 100644 index 0aa257a7..00000000 --- a/test/options/sort-order/process/scss/comments-1.expected.scss +++ /dev/null @@ -1,7 +0,0 @@ -div { - /* 2 */ - /* 3 */ - top: 0; /* 4 */ - color: tomato; /* 1 */ - /* 5 */ -} diff --git a/test/options/sort-order/process/scss/comments-1.scss b/test/options/sort-order/process/scss/comments-1.scss deleted file mode 100644 index 18e6319b..00000000 --- a/test/options/sort-order/process/scss/comments-1.scss +++ /dev/null @@ -1,7 +0,0 @@ -div { - color: tomato; /* 1 */ - /* 2 */ - /* 3 */ - top: 0; /* 4 */ - /* 5 */ -} diff --git a/test/options/sort-order/process/scss/comments-2.expected.scss b/test/options/sort-order/process/scss/comments-2.expected.scss deleted file mode 100644 index a9b2976c..00000000 --- a/test/options/sort-order/process/scss/comments-2.expected.scss +++ /dev/null @@ -1 +0,0 @@ -div {top: 0; /* 3 */ /* 4 *//* 1 */ color: tomato; /* 2 */ } diff --git a/test/options/sort-order/process/scss/comments-2.scss b/test/options/sort-order/process/scss/comments-2.scss deleted file mode 100644 index 617d4fdc..00000000 --- a/test/options/sort-order/process/scss/comments-2.scss +++ /dev/null @@ -1 +0,0 @@ -div {/* 1 */ color: tomato; /* 2 */ top: 0; /* 3 */ /* 4 */} diff --git a/test/options/sort-order/process/scss/condition.expected.scss b/test/options/sort-order/process/scss/condition.expected.scss deleted file mode 100644 index e56af512..00000000 --- a/test/options/sort-order/process/scss/condition.expected.scss +++ /dev/null @@ -1,8 +0,0 @@ -div { - top: 0; - color: tomato; - @if @color == tomato { - font-size: 2px; - display: block; - } - } diff --git a/test/options/sort-order/process/scss/condition.scss b/test/options/sort-order/process/scss/condition.scss deleted file mode 100644 index 9211813d..00000000 --- a/test/options/sort-order/process/scss/condition.scss +++ /dev/null @@ -1,8 +0,0 @@ -div { - color: tomato; - @if @color == tomato { - display: block; - font-size: 2px; - } - top: 0; - } diff --git a/test/options/sort-order/process/scss/different-groups.expected.scss b/test/options/sort-order/process/scss/different-groups.expected.scss deleted file mode 100644 index dddc16f8..00000000 --- a/test/options/sort-order/process/scss/different-groups.expected.scss +++ /dev/null @@ -1,5 +0,0 @@ -div { - top: 0; - - color: tomato; -} diff --git a/test/options/sort-order/process/scss/different-groups.scss b/test/options/sort-order/process/scss/different-groups.scss deleted file mode 100644 index 7ffa908a..00000000 --- a/test/options/sort-order/process/scss/different-groups.scss +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - top: 0; -} diff --git a/test/options/sort-order/process/scss/extend.expected.scss b/test/options/sort-order/process/scss/extend.expected.scss deleted file mode 100644 index a1ac4c71..00000000 --- a/test/options/sort-order/process/scss/extend.expected.scss +++ /dev/null @@ -1 +0,0 @@ -div {@extend %nani; color: tomato; } diff --git a/test/options/sort-order/process/scss/extend.scss b/test/options/sort-order/process/scss/extend.scss deleted file mode 100644 index 381bc927..00000000 --- a/test/options/sort-order/process/scss/extend.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; @extend %nani; } diff --git a/test/options/sort-order/process/scss/import.expected.scss b/test/options/sort-order/process/scss/import.expected.scss deleted file mode 100644 index 9c403dfe..00000000 --- a/test/options/sort-order/process/scss/import.expected.scss +++ /dev/null @@ -1 +0,0 @@ -div {@import "foo.css"; color: tomato; } diff --git a/test/options/sort-order/process/scss/import.scss b/test/options/sort-order/process/scss/import.scss deleted file mode 100644 index 681ccd06..00000000 --- a/test/options/sort-order/process/scss/import.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; @import "foo.css"; } diff --git a/test/options/sort-order/process/scss/include-specified.expected.scss b/test/options/sort-order/process/scss/include-specified.expected.scss deleted file mode 100644 index 412f47d2..00000000 --- a/test/options/sort-order/process/scss/include-specified.expected.scss +++ /dev/null @@ -1,13 +0,0 @@ -.block { - @include last; - @include hide-text; - - color: black; - - @include media("lap") { - color: green; - } - @include media("palm") { - color: red; - } -} diff --git a/test/options/sort-order/process/scss/include-specified.scss b/test/options/sort-order/process/scss/include-specified.scss deleted file mode 100644 index 40b8c98e..00000000 --- a/test/options/sort-order/process/scss/include-specified.scss +++ /dev/null @@ -1,11 +0,0 @@ -.block { - color: black; - @include media("lap") { - color: green; - } - @include media("palm") { - color: red; - } - @include last; - @include hide-text; -} diff --git a/test/options/sort-order/process/scss/include.expected.scss b/test/options/sort-order/process/scss/include.expected.scss deleted file mode 100644 index 390cd58f..00000000 --- a/test/options/sort-order/process/scss/include.expected.scss +++ /dev/null @@ -1 +0,0 @@ -div {@include nani; color: tomato; } diff --git a/test/options/sort-order/process/scss/include.scss b/test/options/sort-order/process/scss/include.scss deleted file mode 100644 index 2feaaec8..00000000 --- a/test/options/sort-order/process/scss/include.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; @include nani; } diff --git a/test/options/sort-order/process/scss/issue-317.scss b/test/options/sort-order/process/scss/issue-317.scss deleted file mode 100644 index f3589f42..00000000 --- a/test/options/sort-order/process/scss/issue-317.scss +++ /dev/null @@ -1,31 +0,0 @@ -.tv-header-reminders { - display: inline-block; - position: relative; - vertical-align: top; - - &__spin { - background-color: #fff; - display: none; - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; - - .spin { - height: 100%; - text-align: center; - } - - .spin__icon { - margin-top: 4px; - } - } - - &_loading_yes .tv-header-reminders__spin { - display: block; - - - } - -} diff --git a/test/options/sort-order/process/scss/issue-333.scss b/test/options/sort-order/process/scss/issue-333.scss deleted file mode 100644 index 28a52fde..00000000 --- a/test/options/sort-order/process/scss/issue-333.scss +++ /dev/null @@ -1,5 +0,0 @@ -@mixin opacity($opacity) { - $opacity-ie: $opacity * 100; - opacity: $opacity; - filter: alpha(opacity=50); -} diff --git a/test/options/sort-order/process/scss/issue-399.expected.scss b/test/options/sort-order/process/scss/issue-399.expected.scss deleted file mode 100644 index bf69f21b..00000000 --- a/test/options/sort-order/process/scss/issue-399.expected.scss +++ /dev/null @@ -1,14 +0,0 @@ -.block { - @extend .hey; - @extend %ho; - color: black; - - @include media("lap") { - color: green; - } - @include media("palm") { - color: red; - } - @include last; - @include hide-text; -} diff --git a/test/options/sort-order/process/scss/issue-399.scss b/test/options/sort-order/process/scss/issue-399.scss deleted file mode 100644 index 7e090c81..00000000 --- a/test/options/sort-order/process/scss/issue-399.scss +++ /dev/null @@ -1,15 +0,0 @@ -.block { - color: black; - - @extend .hey; - @extend %ho; - - @include media("lap") { - color: green; - } - @include media("palm") { - color: red; - } - @include last; - @include hide-text; -} diff --git a/test/options/sort-order/process/scss/leftovers.expected.scss b/test/options/sort-order/process/scss/leftovers.expected.scss deleted file mode 100644 index d431a118..00000000 --- a/test/options/sort-order/process/scss/leftovers.expected.scss +++ /dev/null @@ -1,36 +0,0 @@ -a { - $red: tomato; - - position: $tomato; - - leftover: yay; - border: 1px solid; - - @include nani; - - font: 20px/16px Arial, sans-serif; -} -b { - $red: tomato; - - position: $tomato; - - leftover: yay; - border: 1px solid; - - @include nani; - - font: 20px/16px Arial, sans-serif; -} -c { - $red: tomato; - - position: $tomato; - - leftover: yay; - border: 1px solid; - - @include nani; - - font: 20px/16px Arial, sans-serif; -} diff --git a/test/options/sort-order/process/scss/leftovers.scss b/test/options/sort-order/process/scss/leftovers.scss deleted file mode 100644 index ff5bc4df..00000000 --- a/test/options/sort-order/process/scss/leftovers.scss +++ /dev/null @@ -1,24 +0,0 @@ -a { - leftover: yay; - border: 1px solid; - @include nani; - font: 20px/16px Arial, sans-serif; - position: $tomato; - $red: tomato; -} -b { - border: 1px solid; - @include nani; - position: $tomato; - leftover: yay; - font: 20px/16px Arial, sans-serif; - $red: tomato; -} -c { - border: 1px solid; - @include nani; - font: 20px/16px Arial, sans-serif; - position: $tomato; - $red: tomato; - leftover: yay; -} diff --git a/test/options/sort-order/process/scss/mixin.expected.scss b/test/options/sort-order/process/scss/mixin.expected.scss deleted file mode 100644 index abfbef4e..00000000 --- a/test/options/sort-order/process/scss/mixin.expected.scss +++ /dev/null @@ -1 +0,0 @@ -.foo { @include nani {top: 0; color: tomato; } } diff --git a/test/options/sort-order/process/scss/mixin.scss b/test/options/sort-order/process/scss/mixin.scss deleted file mode 100644 index b174d3bd..00000000 --- a/test/options/sort-order/process/scss/mixin.scss +++ /dev/null @@ -1 +0,0 @@ -.foo { @include nani { color: tomato; top: 0; } } diff --git a/test/options/sort-order/process/scss/nested-rule-1.expected.scss b/test/options/sort-order/process/scss/nested-rule-1.expected.scss deleted file mode 100644 index 54dada66..00000000 --- a/test/options/sort-order/process/scss/nested-rule-1.expected.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; a {top: 0; color: nani; } } diff --git a/test/options/sort-order/process/scss/nested-rule-1.scss b/test/options/sort-order/process/scss/nested-rule-1.scss deleted file mode 100644 index ee50453a..00000000 --- a/test/options/sort-order/process/scss/nested-rule-1.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; a { color: nani; top: 0; } } diff --git a/test/options/sort-order/process/scss/nested-rule-2.expected.scss b/test/options/sort-order/process/scss/nested-rule-2.expected.scss deleted file mode 100644 index f5c2e9fd..00000000 --- a/test/options/sort-order/process/scss/nested-rule-2.expected.scss +++ /dev/null @@ -1 +0,0 @@ -div { left: 0; color: tomato; a {top: 0; color: nani; }} diff --git a/test/options/sort-order/process/scss/nested-rule-2.scss b/test/options/sort-order/process/scss/nested-rule-2.scss deleted file mode 100644 index 0bc62125..00000000 --- a/test/options/sort-order/process/scss/nested-rule-2.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; a { color: nani; top: 0; } left: 0; } diff --git a/test/options/sort-order/process/scss/rule-multiline.expected.scss b/test/options/sort-order/process/scss/rule-multiline.expected.scss deleted file mode 100644 index 5f6d5e30..00000000 --- a/test/options/sort-order/process/scss/rule-multiline.expected.scss +++ /dev/null @@ -1,4 +0,0 @@ -div { - top: 0; - color: tomato; - } diff --git a/test/options/sort-order/process/scss/rule-multiline.scss b/test/options/sort-order/process/scss/rule-multiline.scss deleted file mode 100644 index 8ae29314..00000000 --- a/test/options/sort-order/process/scss/rule-multiline.scss +++ /dev/null @@ -1,4 +0,0 @@ -div { - color: tomato; - top: 0; - } diff --git a/test/options/sort-order/process/scss/rule.expected.scss b/test/options/sort-order/process/scss/rule.expected.scss deleted file mode 100644 index a7669bdf..00000000 --- a/test/options/sort-order/process/scss/rule.expected.scss +++ /dev/null @@ -1 +0,0 @@ -div {top: 0; color: tomato; } diff --git a/test/options/sort-order/process/scss/rule.scss b/test/options/sort-order/process/scss/rule.scss deleted file mode 100644 index 561b980a..00000000 --- a/test/options/sort-order/process/scss/rule.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: tomato; top: 0; } diff --git a/test/options/sort-order/process/scss/ruleset.expected.scss b/test/options/sort-order/process/scss/ruleset.expected.scss deleted file mode 100644 index 194ff87b..00000000 --- a/test/options/sort-order/process/scss/ruleset.expected.scss +++ /dev/null @@ -1,8 +0,0 @@ -div { - left: 0; - color: tomato; - a { - top: 0; - color: nani; - } -} diff --git a/test/options/sort-order/process/scss/ruleset.scss b/test/options/sort-order/process/scss/ruleset.scss deleted file mode 100644 index d7ed6412..00000000 --- a/test/options/sort-order/process/scss/ruleset.scss +++ /dev/null @@ -1,8 +0,0 @@ -div { - color: tomato; - a { - color: nani; - top: 0; - } - left: 0; -} diff --git a/test/options/sort-order/process/scss/variable.expected.scss b/test/options/sort-order/process/scss/variable.expected.scss deleted file mode 100644 index a7359b10..00000000 --- a/test/options/sort-order/process/scss/variable.expected.scss +++ /dev/null @@ -1 +0,0 @@ -div {$red: tomato; color: $red; } diff --git a/test/options/sort-order/process/scss/variable.scss b/test/options/sort-order/process/scss/variable.scss deleted file mode 100644 index 967fd4f0..00000000 --- a/test/options/sort-order/process/scss/variable.scss +++ /dev/null @@ -1 +0,0 @@ -div { color: $red; $red: tomato; } diff --git a/test/options/sort-order/process/test.js b/test/options/sort-order/process/test.js deleted file mode 100644 index 93d67c73..00000000 --- a/test/options/sort-order/process/test.js +++ /dev/null @@ -1,497 +0,0 @@ -var assert = require('assert'); -let Test = require('../../option_test'); - -describe('Option `sort-order`, process', function() { - describe('css', function() { - it('Should be in expected order in case properties are not grouped', function() { - let test = new Test(this, {'sort-order': ['position', 'z-index']}); - return test.shouldBeEqual('single-group.css', 'single-group.expected.css'); - }); - - it('Should be in expected order in case of 1 group', function() { - let test = new Test(this, {'sort-order': [['position', 'z-index']]}); - return test.shouldBeEqual('single-group.css', 'single-group.expected.css'); - }); - - it('Shuld be in expected order in case of multiple groups', function() { - let test = new Test(this, { - 'sort-order': [ - ['position', 'z-index'], - ['width', 'height'] - ] - }); - return test.shouldBeEqual('multiple-groups.css', 'multiple-groups.expected.css'); - }); - - it('Should work correctly with comments in case of 1 group', function() { - let test = new Test(this, { - 'sort-order': [ - ['border-bottom', 'font-style'], - ] - }); - return test.shouldBeEqual('single-group-comments.css', 'single-group-comments.expected.css'); - }); - - it('Should work correctly with comments in case of multiple groups', function() { - let test = new Test(this, { - 'sort-order': [ - ['margin'], ['padding'] - ] - }); - return test.shouldBeEqual('multiple-groups-comments.css', 'multiple-groups-comments.expected.css'); - }); - - it('Should parse semicolons inside data uri correctly', function() { - let test = new Test(this, { - 'sort-order': [ - ['position', 'background', 'color'] - ] - }); - return test.shouldBeEqual('data-uri.css', 'data-uri.expected.css'); - }); - - it('Should not add more than 1 line between groups', function() { - let test = new Test(this, { - 'sort-order': [ - ['top'], ['color'] - ] - }); - let input = test.readFile('multiple-groups-2.css'); - let expected = test.readFile('multiple-groups-2.expected.css'); - - const processStringAgain = (processed) => { - return test.comb.processString(processed); - }; - - return test.comb.processString(input) - .then(processStringAgain) - .then(processStringAgain) - .then(processStringAgain) - .then(processStringAgain) - .then(processStringAgain) - .then(function(actual) { - assert.equal(actual, expected); - }); - }); - - it('Issue 94. Test 1', function() { - let test = new Test(this); - test.useConfig('csscomb'); - return test.shouldBeEqual('issue-94-1.css', 'issue-94-1.expected.css'); - }); - - it('Issue 94. Test 2', function() { - let test = new Test(this); - test.useConfig('csscomb'); - return test.shouldBeEqual('issue-94-2.css', 'issue-94-2.expected.css'); - }); - - it('Issue 94. Test 3', function() { - let test = new Test(this); - test.useConfig('csscomb'); - return test.shouldBeEqual('issue-94-3.css', 'issue-94-3.expected.css'); - }); - - it('Should place the leftovers in the end', function() { - let test = new Test(this); - test.useConfig('csscomb'); - return test.shouldBeEqual('leftovers-1.css', 'leftovers-1.expected.css'); - }); - - it('Should place the leftovers in the beginning', function() { - let test = new Test(this); - let config = test.Comb.getConfig('csscomb'); - config['sort-order'][0].unshift(['...']); - test.comb.configure(config); - - return test.shouldBeEqual('leftovers-2.css', 'leftovers-2.expected.css') - .then(function() { - config['sort-order'][0].shift(); - }); - }); - - it('Should place the leftovers in the beginning of its group', function() { - let test = new Test(this); - let config = test.Comb.getConfig('csscomb'); - config['sort-order'][1].unshift('...'); - test.comb.configure(config); - return test.shouldBeEqual('leftovers-3.css', 'leftovers-3.expected.css') - .then(function() { - config['sort-order'][1].shift(); - }); - }); - - it('Should place the leftovers in the middle of its group', function() { - let test = new Test(this); - let config = test.Comb.getConfig('csscomb'); - config['sort-order'][1].splice(1, 0, '...'); - test.comb.configure(config); - return test.shouldBeEqual('leftovers-4.css', 'leftovers-4.expected.css') - .then(function() { - config['sort-order'][1].splice(1, 1); - }); - }); - - it('Should add declaration delimiters if they are missing', function() { - let test = new Test(this, {'sort-order': ['position', 'z-index']}); - return test.shouldBeEqual('missing-delimiter.css', 'missing-delimiter.expected.css'); - }); - }); - - describe('less', function() { - it('Should sort properties inside rules', function() { - let test = new Test(this, { - 'sort-order': [['top', 'color']] - }); - return test.shouldBeEqual('rule.less', 'rule.expected.less'); - }); - - it('Should sort properties inside nested rules', function() { - let test = new Test(this, { - 'sort-order': [['top', 'color']] - }); - return test.shouldBeEqual('nested-rule-1.less', 'nested-rule-1.expected.less'); - }); - - it('Should sort properties divided by nested rules', function() { - let test = new Test(this, { - 'sort-order': [['top', 'left', 'color']] - }); - return test.shouldBeEqual('nested-rule-2.less', 'nested-rule-2.expected.less'); - }); - - it('Should group declarations with proper comments and spaces (single line)', function() { - let test = new Test(this, { - 'sort-order': [['top', 'color']] - }); - return test.shouldBeEqual('comments-1.less', 'comments-1.expected.less'); - }); - - it('Should group declarations with proper comments and spaces (multiple lines). Test 1', function() { - let test = new Test(this, { - 'sort-order': [['top', 'color']] - }); - return test.shouldBeEqual('comments-2.less', 'comments-2.expected.less'); - }); - - it('Should group declarations with proper comments and spaces (multiple lines). Test 2', function() { - let test = new Test(this, { - 'sort-order': [['$variable', 'color']] - }); - return test.shouldBeEqual('comments-3.less', 'comments-3.expected.less'); - }); - - it('Should group declarations with proper comments and spaces (multiple lines). Test 3', function() { - let test = new Test(this, { - 'sort-order': [['$variable', 'color']] - }); - return test.shouldBeEqual('comments-3.less', 'comments-3.expected.less'); - }); - - it('Should divide properties from different groups with an empty line', function() { - let test = new Test(this, { - 'sort-order': [['top'], ['color']] - }); - return test.shouldBeEqual('different-groups.less', 'different-groups.expected.less'); - }); - - it('Should sort variables', function() { - let test = new Test(this, { - 'sort-order': [['$variable', 'color']] - }); - return test.shouldBeEqual('variable.less', 'variable.expected.less'); - }); - - it('Should sort imports', function() { - let test = new Test(this, { - 'sort-order': [['$import', 'color']] - }); - return test.shouldBeEqual('import.less', 'import.expected.less'); - }); - - it('Should sort included mixins. Test 1', function() { - let test = new Test(this, { - 'sort-order': [['$include', 'color', 'border-top', 'border-bottom']] - }); - return test.shouldBeEqual('mixin-1.less', 'mixin-1.expected.less'); - }); - - it('Should sort included mixins. Test 2', function() { - let test = new Test(this, { - 'sort-order': [['$include', 'top', 'color']] - }); - return test.shouldBeEqual('mixin-2.less', 'mixin-2.expected.less'); - }); - - it('Should sort included mixins. Test 3', function() { - let test = new Test(this, { - 'sort-order': [['$include', 'border', 'color']] - }); - return test.shouldBeEqual('mixin-3.less', 'mixin-3.expected.less'); - }); - - it('Should sort included mixins with specified name. Test 4', function() { - let test = new Test(this, { - 'sort-order': [['$include'], ['color'], ['$include media']] - }); - return test.shouldBeEqual('mixin-4.less', 'mixin-4.expected.less'); - }); - - it('Should sort @extend-s', function() { - let test = new Test(this, { - 'sort-order': [['$extend', 'color']] - }); - return test.shouldBeEqual('extend.less', 'extend.expected.less'); - }); - }); - - describe('sass', function() { - it('Should sort properties inside rules', function() { - let test = new Test(this, { - 'sort-order': [['top', 'color']] - }); - return test.shouldBeEqual('rule.sass', 'rule.expected.sass'); - }); - - it('Should sort properties inside nested rules', function() { - let test = new Test(this, { - 'sort-order': [['top', 'color']] - }); - return test.shouldBeEqual('nested-rule-1.sass', 'nested-rule-1.expected.sass'); - }); - - it('Should sort properties divided by nested rules', function() { - let test = new Test(this, { - 'sort-order': [['top', 'left', 'color']] - }); - return test.shouldBeEqual('nested-rule-2.sass', 'nested-rule-2.expected.sass'); - }); - - it('Should group declarations with proper comments and spaces (multiple lines)', function() { - let test = new Test(this, { - 'sort-order': [['top', 'color']] - }); - return test.shouldBeEqual('comments.sass', 'comments.expected.sass'); - }); - - it('Should divide properties from different groups with an empty line', function() { - let test = new Test(this, { - 'sort-order': [['top'], ['color']] - }); - return test.shouldBeEqual('different-groups.sass', 'different-groups.expected.sass'); - }); - - it('Should sort variables', function() { - let test = new Test(this, { - 'sort-order': [['$variable', 'color']] - }); - return test.shouldBeEqual('variable.sass', 'variable.expected.sass'); - }); - - it('Should sort imports', function() { - let test = new Test(this, { - 'sort-order': [['$import', 'color']] - }); - return test.shouldBeEqual('import.sass', 'import.expected.sass'); - }); - - it('Should sort @include-s', function() { - let test = new Test(this, { - 'sort-order': [['$include', 'color']] - }); - return test.shouldBeEqual('include.sass', 'include.expected.sass'); - }); - - it('Should sort @extend-s', function() { - let test = new Test(this, { - 'sort-order': [['$extend', 'color']] - }); - return test.shouldBeEqual('extend.sass', 'extend.expected.sass'); - }); - - it('Should sort @include-s with specified name. Test 1', function() { - let test = new Test(this, { - 'sort-order': [['$include'], ['color'], ['$include media']] - }); - return test.shouldBeEqual('include-specified-1.sass', 'include-specified-1.expected.sass'); - }); - - it('Should sort @include-s with specified name. Test 2', function() { - let test = new Test(this, { - 'sort-order': [['$include'], ['color'], ['$include media']] - }); - return test.shouldBeEqual('include-specified-2.sass', 'include-specified-2.expected.sass'); - }); - - it('Should sort properties inside blocks passed to mixins', function() { - let test = new Test(this, { - 'sort-order': [['top', 'color']] - }); - return test.shouldBeEqual('mixin.sass', 'mixin.expected.sass'); - }); - - it('Should handle properties preceeding rulesets', function() { - let test = new Test(this, { - 'sort-order': [['top', 'left', 'color']] - }); - return test.shouldBeEqual('ruleset.sass', 'ruleset.expected.sass'); - }); - - it('Should handle properties preceeding conditions', function() { - let test = new Test(this, { - 'sort-order': [['font-size', 'display', 'top', 'color']] - }); - return test.shouldBeEqual('condition.sass', 'condition.expected.sass'); - }); - - it('Issue 332', function() { - let test = new Test(this, { - 'sort-order': [['color'], ['$include']] - }); - return test.shouldBeEqual('issue-332.sass', 'issue-332.expected.sass'); - }); - - it('Issue 332, test 2', function() { - let test = new Test(this, { - 'sort-order': [['...']], - 'sort-order-fallback': 'abc' - }); - return test.shouldBeEqual('issue-332-2.sass', 'issue-332-2.expected.sass'); - }); - }); - - describe('scss', function() { - it('Should sort properties inside rules (single line)', function() { - let test = new Test(this, { - 'sort-order': [['top', 'color']] - }); - return test.shouldBeEqual('rule.scss', 'rule.expected.scss'); - }); - - it('Should sort properties inside rules (multiple lines)', function() { - let test = new Test(this, { - 'sort-order': [['top', 'color']] - }); - return test.shouldBeEqual('rule.scss', 'rule.expected.scss'); - }); - - it('Should sort properties inside nested rules', function() { - let test = new Test(this, { - 'sort-order': [['top', 'color']] - }); - return test.shouldBeEqual('nested-rule-1.scss', 'nested-rule-1.expected.scss'); - }); - - it('Should sort properties divided by nested rules', function() { - let test = new Test(this, { - 'sort-order': [['top', 'left', 'color']] - }); - return test.shouldBeEqual('nested-rule-2.scss', 'nested-rule-2.expected.scss'); - }); - - it('Should group declarations with proper comments and spaces (multiple lines)', function() { - let test = new Test(this, { - 'sort-order': [['top', 'color']] - }); - return test.shouldBeEqual('comments-1.scss', 'comments-1.expected.scss'); - }); - - it('Should group declarations with proper comments and spaces (single line)', function() { - let test = new Test(this, { - 'sort-order': [['top', 'color']] - }); - return test.shouldBeEqual('comments-2.scss', 'comments-2.expected.scss'); - }); - - it('Should divide properties from different groups with an empty line', function() { - let test = new Test(this, { - 'sort-order': [['top'], ['color']] - }); - return test.shouldBeEqual('different-groups.scss', 'different-groups.expected.scss'); - }); - - it('Should sort variables', function() { - let test = new Test(this, { - 'sort-order': [['$variable', 'color']] - }); - return test.shouldBeEqual('variable.scss', 'variable.expected.scss'); - }); - - it('Should sort imports', function() { - let test = new Test(this, { - 'sort-order': [['$import', 'color']] - }); - return test.shouldBeEqual('import.scss', 'import.expected.scss'); - }); - - it('Should sort @include-s', function() { - let test = new Test(this, { - 'sort-order': [['$include', 'color']] - }); - return test.shouldBeEqual('include.scss', 'include.expected.scss'); - }); - - it('Should sort @include-s with specified name', function() { - let test = new Test(this, { - 'sort-order': [['$include'], ['color'], ['$include media']] - }); - return test.shouldBeEqual('include-specified.scss', 'include-specified.expected.scss'); - }); - - it('Should sort @extend-s', function() { - let test = new Test(this, { - 'sort-order': [['$extend', 'color']] - }); - return test.shouldBeEqual('extend.scss', 'extend.expected.scss'); - }); - - it('Should sort properties inside blocks passed to mixins', function() { - let test = new Test(this, { - 'sort-order': [['top', 'color']] - }); - return test.shouldBeEqual('mixin.scss', 'mixin.expected.scss'); - }); - - it('Should handle properties preceeding rulesets', function() { - let test = new Test(this, { - 'sort-order': [['top', 'left', 'color']] - }); - return test.shouldBeEqual('ruleset.scss', 'ruleset.expected.scss'); - }); - - it('Should handle properties preceeding conditions', function() { - let test = new Test(this, { - 'sort-order': [['font-size', 'display', 'top', 'color']] - }); - return test.shouldBeEqual('condition.scss', 'condition.expected.scss'); - }); - - it('Should sort complex case with leftovers', function() { - let test = new Test(this, { - 'sort-order': [ - ['$variable'], - ['position'], - ['...', 'border'], - ['$include'], - ['font'] - ] - }); - return test.shouldBeEqual('leftovers.scss', 'leftovers.expected.scss'); - }); - - it('Issue 317', function() { - let test = new Test(this, {'sort-order': ['...']}); - return test.shouldBeEqual('issue-317.scss'); - }); - - it('Issue 333', function() { - let test = new Test(this, {'sort-order': ['...']}); - return test.shouldBeEqual('issue-333.scss'); - }); - - it('Issue 399', function() { - let test = new Test(this, {'sort-order': [['$extend', 'color']]}); - return test.shouldBeEqual('issue-399.expected.scss'); - }); - }); -}); diff --git a/test/options/space-after-colon/detect/test.js b/test/options/space-after-colon/detect/test.js deleted file mode 100644 index 5f325223..00000000 --- a/test/options/space-after-colon/detect/test.js +++ /dev/null @@ -1,43 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-after-colon`, detect', function() { - describe('css', function() { - it('Should detect no whitespaces', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-colon'], - 'a { color:red }', - {'space-after-colon': ''} - ); - }); - - it('Should detect space from two variants', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-colon'], - 'a { color: red; color :red }', - {'space-after-colon': ' '} - ); - }); - - it('Should detect no whitespaces along three variants', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-colon'], - 'a { color: red; background :red } b { width:10px }', - {'space-after-colon': ''} - ); - }); - - it('Should detect space', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-colon'], - 'a { color : red; background :red } b { width: 10px }', - {'space-after-colon': ' '} - ); - }); - }); -}); - - diff --git a/test/options/space-after-colon/lint/test.js b/test/options/space-after-colon/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/space-after-colon/process/css/test-2.expected.css b/test/options/space-after-colon/process/css/test-2.expected.css deleted file mode 100644 index c1355f35..00000000 --- a/test/options/space-after-colon/process/css/test-2.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -a { color: red } -a{color: red} -a {color : red} -a {color : /* foo */ red } -a {color /* bar */ : red } diff --git a/test/options/space-after-colon/process/css/test-3.expected.css b/test/options/space-after-colon/process/css/test-3.expected.css deleted file mode 100644 index 63d57dc7..00000000 --- a/test/options/space-after-colon/process/css/test-3.expected.css +++ /dev/null @@ -1,10 +0,0 @@ -a { color: - red } -a{color: - red} -a {color : - red} -a {color : - /* foo */ red } -a {color /* bar */ : - red } diff --git a/test/options/space-after-colon/process/css/test.css b/test/options/space-after-colon/process/css/test.css deleted file mode 100644 index 637656fb..00000000 --- a/test/options/space-after-colon/process/css/test.css +++ /dev/null @@ -1,5 +0,0 @@ -a { color: red } -a{color:red} -a {color : red} -a {color : /* foo */ red } -a {color /* bar */ : red } diff --git a/test/options/space-after-colon/process/css/test.expected.css b/test/options/space-after-colon/process/css/test.expected.css deleted file mode 100644 index 2d137811..00000000 --- a/test/options/space-after-colon/process/css/test.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -a { color:red } -a{color:red} -a {color :red} -a {color :/* foo */ red } -a {color /* bar */ :red } diff --git a/test/options/space-after-colon/process/sass/colon-after-property-name.expected.sass b/test/options/space-after-colon/process/sass/colon-after-property-name.expected.sass deleted file mode 100644 index 9b55f4af..00000000 --- a/test/options/space-after-colon/process/sass/colon-after-property-name.expected.sass +++ /dev/null @@ -1,3 +0,0 @@ -a - color: panda - top: 0 diff --git a/test/options/space-after-colon/process/sass/colon-after-property-name.sass b/test/options/space-after-colon/process/sass/colon-after-property-name.sass deleted file mode 100644 index 5e4e236e..00000000 --- a/test/options/space-after-colon/process/sass/colon-after-property-name.sass +++ /dev/null @@ -1,3 +0,0 @@ -a - color: panda - top:0 diff --git a/test/options/space-after-colon/process/sass/colon-before-property-name.expected.sass b/test/options/space-after-colon/process/sass/colon-before-property-name.expected.sass deleted file mode 100644 index a8a5e3e4..00000000 --- a/test/options/space-after-colon/process/sass/colon-before-property-name.expected.sass +++ /dev/null @@ -1,3 +0,0 @@ -a - :color panda - :top 0 diff --git a/test/options/space-after-colon/process/sass/colon-before-property-name.sass b/test/options/space-after-colon/process/sass/colon-before-property-name.sass deleted file mode 100644 index a8a5e3e4..00000000 --- a/test/options/space-after-colon/process/sass/colon-before-property-name.sass +++ /dev/null @@ -1,3 +0,0 @@ -a - :color panda - :top 0 diff --git a/test/options/space-after-colon/process/scss/pseudo-elements.expected.scss b/test/options/space-after-colon/process/scss/pseudo-elements.expected.scss deleted file mode 100644 index 46b16d28..00000000 --- a/test/options/space-after-colon/process/scss/pseudo-elements.expected.scss +++ /dev/null @@ -1,11 +0,0 @@ -li{ - float: left; - - a:hover{ - text-decoration: underline; - } -} - -li:before { - color: tomato; -} diff --git a/test/options/space-after-colon/process/scss/pseudo-elements.scss b/test/options/space-after-colon/process/scss/pseudo-elements.scss deleted file mode 100644 index dbb4acea..00000000 --- a/test/options/space-after-colon/process/scss/pseudo-elements.scss +++ /dev/null @@ -1,11 +0,0 @@ -li{ - float:left; - - a:hover{ - text-decoration:underline; - } -} - -li:before { - color:tomato; -} diff --git a/test/options/space-after-colon/process/test.js b/test/options/space-after-colon/process/test.js deleted file mode 100644 index 84119b16..00000000 --- a/test/options/space-after-colon/process/test.js +++ /dev/null @@ -1,55 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-after-colon`, process', function() { - describe('css', function() { - it('Array value => should not change anything', function() { - let test = new Test(this, {'space-after-colon': ['', ' ']}); - return test.shouldBeEqual('test.css'); - }); - - it('Invalid string value => should not change anything', function() { - let test = new Test(this, {'space-after-colon': ' nani '}); - return test.shouldBeEqual('test.css'); - }); - - it('Float number value => should not change anything', function() { - let test = new Test(this, {'space-after-colon': 3.5}); - return test.shouldBeEqual('test.css'); - }); - - it('Integer value => should set proper space after colon', function() { - let test = new Test(this, {'space-after-colon': 0}); - return test.shouldBeEqual('test.css', 'test.expected.css'); - }); - - it('Valid string value (spaces only)=> should set proper space after colon', function() { - let test = new Test(this, {'space-after-colon': ' '}); - return test.shouldBeEqual('test.css', 'test-2.expected.css'); - }); - - it('Valid string value (spacesand newlines)=> should set proper space after colon', function() { - let test = new Test(this, {'space-after-colon': '\n '}); - return test.shouldBeEqual('test.css', 'test-3.expected.css'); - }); - }); - - describe('sass', function() { - it('Should set proper space if colon is after property name', function() { - let test = new Test(this, {'space-after-colon': 2}); - return test.shouldBeEqual('colon-after-property-name.sass', 'colon-after-property-name.expected.sass'); - }); - - it('Should not change space after colon which is before property name', function() { - let test = new Test(this, {'space-after-colon': 1}); - return test.shouldBeEqual('colon-before-property-name.sass', 'colon-before-property-name.expected.sass'); - }); - }); - - describe('scss', function() { - it('Space after colon should not affect pseudo elements', function() { - let test = new Test(this, {'space-after-colon': 1}); - return test.shouldBeEqual('pseudo-elements.scss', 'pseudo-elements.expected.scss'); - }); - }); -}); - diff --git a/test/options/space-after-combinator/detect/test.js b/test/options/space-after-combinator/detect/test.js deleted file mode 100644 index 6728f664..00000000 --- a/test/options/space-after-combinator/detect/test.js +++ /dev/null @@ -1,61 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-after-combinator`, detect', function() { - describe('css', function() { - it('Should detect no whitespaces after combinator', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-combinator'], - 'a+b { color:red }', - {'space-after-combinator': ''} - ); - }); - - it('Should detect a space after combinator', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-combinator'], - 'a + \n b { color:red }', - {'space-after-combinator': ' \n '} - ); - }); - - it('Should detect a space after combinator in long selector', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-combinator'], - 'a + b ~ c>d { color:red }', - {'space-after-combinator': ' '} - ); - }); - - it('Should detect a space after combinator in long selector, test 2', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-combinator'], - 'a>b + c + d { color:red }', - {'space-after-combinator': ' '} - ); - }); - - it('Should detect no whitespaces after combinator in long selector', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-combinator'], - 'a+b ~ c+d { color:red }', - {'space-after-combinator': ''} - ); - }); - - it('Shouldn’t detect whitespaces after combinator in selector without combinators', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-combinator'], - 'a { color:red }', - {} - ); - }); - }); -}); - - diff --git a/test/options/space-after-combinator/lint/test.js b/test/options/space-after-combinator/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/space-after-combinator/process/css/test-2.expected.css b/test/options/space-after-combinator/process/css/test-2.expected.css deleted file mode 100644 index 32df4395..00000000 --- a/test/options/space-after-combinator/process/css/test-2.expected.css +++ /dev/null @@ -1,10 +0,0 @@ -a> b { color: red } -a> b { color: red } -a > b { color: red } -a+ b { color: red } -a+ b { color: red } -a + b { color: red } -a~ b { color: red } -a~ b { color: red } -a ~ b { color: red } -a ~ b+ c> d { color: red } diff --git a/test/options/space-after-combinator/process/css/test-3.expected.css b/test/options/space-after-combinator/process/css/test-3.expected.css deleted file mode 100644 index 9d34666a..00000000 --- a/test/options/space-after-combinator/process/css/test-3.expected.css +++ /dev/null @@ -1,22 +0,0 @@ -a> - b { color: red } -a> - b { color: red } -a > - b { color: red } -a+ - b { color: red } -a+ - b { color: red } -a + - b { color: red } -a~ - b { color: red } -a~ - b { color: red } -a ~ - b { color: red } -a ~ - b+ - c> - d { color: red } diff --git a/test/options/space-after-combinator/process/css/test.css b/test/options/space-after-combinator/process/css/test.css deleted file mode 100644 index 4ad8d86e..00000000 --- a/test/options/space-after-combinator/process/css/test.css +++ /dev/null @@ -1,10 +0,0 @@ -a>b { color: red } -a> b { color: red } -a >b { color: red } -a+b { color: red } -a+ b { color: red } -a +b { color: red } -a~b { color: red } -a~ b { color: red } -a ~b { color: red } -a ~b+ c>d { color: red } diff --git a/test/options/space-after-combinator/process/css/test.expected.css b/test/options/space-after-combinator/process/css/test.expected.css deleted file mode 100644 index 186958d1..00000000 --- a/test/options/space-after-combinator/process/css/test.expected.css +++ /dev/null @@ -1,10 +0,0 @@ -a>b { color: red } -a>b { color: red } -a >b { color: red } -a+b { color: red } -a+b { color: red } -a +b { color: red } -a~b { color: red } -a~b { color: red } -a ~b { color: red } -a ~b+c>d { color: red } diff --git a/test/options/space-after-combinator/process/test.js b/test/options/space-after-combinator/process/test.js deleted file mode 100644 index 8af41c68..00000000 --- a/test/options/space-after-combinator/process/test.js +++ /dev/null @@ -1,35 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-after-combinator`, process', function() { - describe('css', function() { - it('Array value => should not change anything', function() { - let test = new Test(this, {'space-after-combinator': ['', ' ']}); - return test.shouldBeEqual('test.css'); - }); - - it('Invalid string value => should not change anything', function() { - let test = new Test(this, {'space-after-combinator': ' nani '}); - return test.shouldBeEqual('test.css'); - }); - - it('Float number value => should not change anything', function() { - let test = new Test(this, {'space-after-combinator': 3.5}); - return test.shouldBeEqual('test.css'); - }); - - it('Integer value => should set proper space after combinator', function() { - let test = new Test(this, {'space-after-combinator': 0}); - return test.shouldBeEqual('test.css', 'test.expected.css'); - }); - - it('Valid string value (spaces only) => should set proper space after combinator', function() { - let test = new Test(this, {'space-after-combinator': ' '}); - return test.shouldBeEqual('test.css', 'test-2.expected.css'); - }); - - it('Valid string value (spaces and newlines) => should set proper space after combinator', function() { - let test = new Test(this, {'space-after-combinator': '\n '}); - return test.shouldBeEqual('test.css', 'test-3.expected.css'); - }); - }); -}); diff --git a/test/options/space-after-opening-brace/detect/test.js b/test/options/space-after-opening-brace/detect/test.js deleted file mode 100644 index 533cc965..00000000 --- a/test/options/space-after-opening-brace/detect/test.js +++ /dev/null @@ -1,59 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-after-opening-brace`, detect', function() { - describe('css', function() { - it('Should detect no whitespace', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-opening-brace'], - 'a{top:0}', - {'space-after-opening-brace': ''} - ); - }); - - it('Should detect whitespace', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-opening-brace'], - 'a{\n\ttop:0}', - {'space-after-opening-brace': '\n\t'} - ); - }); - - it('Should detect no whitespace (2 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-opening-brace'], - 'a{top:0} b{\n left:0}', - {'space-after-opening-brace': ''} - ); - }); - - it('Should detect whitespace (2 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-opening-brace'], - 'a{ top:0 } b{left:0}', - {'space-after-opening-brace': ' '} - ); - }); - - it('Should detect no whitespace (3 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-opening-brace'], - 'a{top:0} b { left: 0 } c{\n\tright:0}', - {'space-after-opening-brace': ''} - ); - }); - - it('Should detect whitespace (3 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-opening-brace'], - 'a{\ntop:0} b{\nleft:0} c{\n right:0}', - {'space-after-opening-brace': '\n'} - ); - }); - }); -}); diff --git a/test/options/space-after-opening-brace/lint/test.js b/test/options/space-after-opening-brace/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/space-after-opening-brace/process/css/issue-387.css b/test/options/space-after-opening-brace/process/css/issue-387.css deleted file mode 100644 index 3b66e1f1..00000000 --- a/test/options/space-after-opening-brace/process/css/issue-387.css +++ /dev/null @@ -1 +0,0 @@ -@media only screen (max-width:479px) {} diff --git a/test/options/space-after-opening-brace/process/css/issue-387.expected.css b/test/options/space-after-opening-brace/process/css/issue-387.expected.css deleted file mode 100644 index aecde5a6..00000000 --- a/test/options/space-after-opening-brace/process/css/issue-387.expected.css +++ /dev/null @@ -1,2 +0,0 @@ -@media only screen (max-width:479px) { -} diff --git a/test/options/space-after-opening-brace/process/css/test-2.expected.css b/test/options/space-after-opening-brace/process/css/test-2.expected.css deleted file mode 100644 index a34ef363..00000000 --- a/test/options/space-after-opening-brace/process/css/test-2.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -a{ top: 0} -a { top: 0 } - -@media print{ a{ top: 0}} -@media print { a { top: 0 } } diff --git a/test/options/space-after-opening-brace/process/css/test-3.expected.css b/test/options/space-after-opening-brace/process/css/test-3.expected.css deleted file mode 100644 index 4c044b43..00000000 --- a/test/options/space-after-opening-brace/process/css/test-3.expected.css +++ /dev/null @@ -1,11 +0,0 @@ -a{ - top: 0} -a { - top: 0 } - -@media print{ - a{ - top: 0}} -@media print { - a { - top: 0 } } diff --git a/test/options/space-after-opening-brace/process/css/test.css b/test/options/space-after-opening-brace/process/css/test.css deleted file mode 100644 index 7c71281c..00000000 --- a/test/options/space-after-opening-brace/process/css/test.css +++ /dev/null @@ -1,5 +0,0 @@ -a{top: 0} -a { top: 0 } - -@media print{a{top: 0}} -@media print { a { top: 0 } } diff --git a/test/options/space-after-opening-brace/process/css/test.expected.css b/test/options/space-after-opening-brace/process/css/test.expected.css deleted file mode 100644 index fa761a52..00000000 --- a/test/options/space-after-opening-brace/process/css/test.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -a{top: 0} -a {top: 0 } - -@media print{a{top: 0}} -@media print {a {top: 0 } } diff --git a/test/options/space-after-opening-brace/process/test.js b/test/options/space-after-opening-brace/process/test.js deleted file mode 100644 index c65c6841..00000000 --- a/test/options/space-after-opening-brace/process/test.js +++ /dev/null @@ -1,41 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-after-opening-brace`, process', function() { - describe('css', function() { - it('Array value => should not change anything', function() { - let test = new Test(this, {'space-after-opening-brace': ['', ' ']}); - return test.shouldBeEqual('test.css'); - }); - - it('Invalid string value => should not change anything', function() { - let test = new Test(this, {'space-after-opening-brace': ' nani '}); - return test.shouldBeEqual('test.css'); - }); - - it('Float number value => should not change anything', function() { - let test = new Test(this, {'space-after-opening-brace': 3.5}); - return test.shouldBeEqual('test.css'); - }); - - it('Integer value => should set proper space after {', function() { - let test = new Test(this, {'space-after-opening-brace': 0}); - return test.shouldBeEqual('test.css', 'test.expected.css'); - }); - - it('Valid string value (spaces only) => should set proper space after {', function() { - let test = new Test(this, {'space-after-opening-brace': ' '}); - return test.shouldBeEqual('test.css', 'test-2.expected.css'); - }); - - it('Valid string value (spaces and newlines) => should set proper space after {', function() { - let test = new Test(this, {'space-after-opening-brace': '\n '}); - return test.shouldBeEqual('test.css', 'test-3.expected.css'); - }); - - it('Issue 387', function() { - let test = new Test(this, {'space-after-opening-brace': '\n'}); - return test.shouldBeEqual('issue-387.css', 'issue-387.expected.css'); - }); - }); -}); - diff --git a/test/options/space-after-selector-delimiter/detect/test.js b/test/options/space-after-selector-delimiter/detect/test.js deleted file mode 100644 index 228942f1..00000000 --- a/test/options/space-after-selector-delimiter/detect/test.js +++ /dev/null @@ -1,59 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-after-selector-delimiter`, detect', function() { - describe('css', function() { - it('Should detect no whitespace', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-selector-delimiter'], - 'a,b{top:0}', - {'space-after-selector-delimiter': ''} - ); - }); - - it('Should detect whitespace', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-selector-delimiter'], - 'a, \n b {top:0}', - {'space-after-selector-delimiter': ' \n '} - ); - }); - - it('Should detect no whitespace (2 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-selector-delimiter'], - 'a,b{top:0} a, b{left:0}', - {'space-after-selector-delimiter': ''} - ); - }); - - it('Should detect whitespace (2 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-selector-delimiter'], - 'a, b {top:0} b,a{left:0}', - {'space-after-selector-delimiter': ' '} - ); - }); - - it('Should detect no whitespace (3 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-selector-delimiter'], - 'a, b{top:0} b,c{left:0} c,d{right:0}', - {'space-after-selector-delimiter': ''} - ); - }); - - it('Should detect whitespace (3 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-after-selector-delimiter'], - 'a,b{top:0} b, c{left:0} c, sd{right:0}', - {'space-after-selector-delimiter': ' '} - ); - }); - }); -}); diff --git a/test/options/space-after-selector-delimiter/lint/test.js b/test/options/space-after-selector-delimiter/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/space-after-selector-delimiter/process/css/test-2.expected.css b/test/options/space-after-selector-delimiter/process/css/test-2.expected.css deleted file mode 100644 index 92d1ece8..00000000 --- a/test/options/space-after-selector-delimiter/process/css/test-2.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -a, b { color: red } -a, b { color: red } -a , b { color: red } -a, b { color: red } -a+b, c>d, e{ color: red } \ No newline at end of file diff --git a/test/options/space-after-selector-delimiter/process/css/test-3.expected.css b/test/options/space-after-selector-delimiter/process/css/test-3.expected.css deleted file mode 100644 index 6a198487..00000000 --- a/test/options/space-after-selector-delimiter/process/css/test-3.expected.css +++ /dev/null @@ -1,11 +0,0 @@ -a, - b { color: red } -a, - b { color: red } -a , - b { color: red } -a, - b { color: red } -a+b, - c>d, - e{ color: red } \ No newline at end of file diff --git a/test/options/space-after-selector-delimiter/process/css/test.css b/test/options/space-after-selector-delimiter/process/css/test.css deleted file mode 100644 index cd8e7d77..00000000 --- a/test/options/space-after-selector-delimiter/process/css/test.css +++ /dev/null @@ -1,6 +0,0 @@ -a,b { color: red } -a, b { color: red } -a ,b { color: red } -a, -b { color: red } -a+b,c>d,e{ color: red } \ No newline at end of file diff --git a/test/options/space-after-selector-delimiter/process/css/test.expected.css b/test/options/space-after-selector-delimiter/process/css/test.expected.css deleted file mode 100644 index b0d4fd20..00000000 --- a/test/options/space-after-selector-delimiter/process/css/test.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -a,b { color: red } -a,b { color: red } -a ,b { color: red } -a,b { color: red } -a+b,c>d,e{ color: red } \ No newline at end of file diff --git a/test/options/space-after-selector-delimiter/process/sass/issue-238.expected.sass b/test/options/space-after-selector-delimiter/process/sass/issue-238.expected.sass deleted file mode 100644 index 18571608..00000000 --- a/test/options/space-after-selector-delimiter/process/sass/issue-238.expected.sass +++ /dev/null @@ -1,5 +0,0 @@ -html, -body, -p - background: #fff - color: #000 diff --git a/test/options/space-after-selector-delimiter/process/sass/issue-238.sass b/test/options/space-after-selector-delimiter/process/sass/issue-238.sass deleted file mode 100644 index 5fc2e131..00000000 --- a/test/options/space-after-selector-delimiter/process/sass/issue-238.sass +++ /dev/null @@ -1,4 +0,0 @@ -html, -body, p - background: #fff - color: #000 diff --git a/test/options/space-after-selector-delimiter/process/test.js b/test/options/space-after-selector-delimiter/process/test.js deleted file mode 100644 index 4875c8a8..00000000 --- a/test/options/space-after-selector-delimiter/process/test.js +++ /dev/null @@ -1,42 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-after-selector-delimiter`, process', function() { - describe('css', function() { - it('Array value => should not change anything', function() { - let test = new Test(this, {'space-after-selector-delimiter': ['', ' ']}); - return test.shouldBeEqual('test.css'); - }); - - it('Invalid string value => should not change anything', function() { - let test = new Test(this, {'space-after-selector-delimiter': ' nani '}); - return test.shouldBeEqual('test.css'); - }); - - it('Float number value => should not change anything', function() { - let test = new Test(this, {'space-after-selector-delimiter': 3.5}); - return test.shouldBeEqual('test.css'); - }); - - it('Integer value => should set proper space after selector delimiter', function() { - let test = new Test(this, {'space-after-selector-delimiter': 0}); - return test.shouldBeEqual('test.css', 'test.expected.css'); - }); - - it('Valid string value (spaces only) => should set proper space after selector delimiter', function() { - let test = new Test(this, {'space-after-selector-delimiter': ' '}); - return test.shouldBeEqual('test.css', 'test-2.expected.css'); - }); - - it('Valid string value (spaces and newlines) => should set proper space after selector delimiter', function() { - let test = new Test(this, {'space-after-selector-delimiter': '\n '}); - return test.shouldBeEqual('test.css', 'test-3.expected.css'); - }); - }); - - describe('sass', function() { - it('Issue 238', function() { - let test = new Test(this, {'space-after-selector-delimiter': '\n'}); - return test.shouldBeEqual('issue-238.sass', 'issue-238.expected.sass'); - }); - }); -}); diff --git a/test/options/space-before-closing-brace/detect/test.js b/test/options/space-before-closing-brace/detect/test.js deleted file mode 100644 index abbed180..00000000 --- a/test/options/space-before-closing-brace/detect/test.js +++ /dev/null @@ -1,50 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-before-closing-brace`, detect', function() { - describe('css', function() { - it('Should detect no whitespace', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-closing-brace'], - 'a{top:0}', - {'space-before-closing-brace': ''} - ); - }); - - it('Should detect no whitespace (2 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-closing-brace'], - 'a{top:0} b { color: tomato; }', - {'space-before-closing-brace': ''} - ); - }); - - it('Should detect whitespace', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-closing-brace'], - 'a { top:0 }', - {'space-before-closing-brace': ' '} - ); - }); - - it('Should detect whitespace (2 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-closing-brace'], - 'a { top:0 } b{color:tomato;}', - {'space-before-closing-brace': ' '} - ); - }); - - it('Should detect whitespace (mix with block indent)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-closing-brace', 'block-indent'], - 'a {\n top:0\n }\nb{\n color:tomato;\n }', - {'block-indent': ' ', 'space-before-closing-brace': '\n '} - ); - }); - }); -}); diff --git a/test/options/space-before-closing-brace/lint/test.js b/test/options/space-before-closing-brace/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/space-before-closing-brace/process/css/test-2.expected.css b/test/options/space-before-closing-brace/process/css/test-2.expected.css deleted file mode 100644 index 86ba2673..00000000 --- a/test/options/space-before-closing-brace/process/css/test-2.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -a{top: 0 } -a {top: 0 } - -@media print{a{top: 0 } } -@media print { a { top: 0 } } diff --git a/test/options/space-before-closing-brace/process/css/test-3.expected.css b/test/options/space-before-closing-brace/process/css/test-3.expected.css deleted file mode 100644 index 9868eaa7..00000000 --- a/test/options/space-before-closing-brace/process/css/test-3.expected.css +++ /dev/null @@ -1,11 +0,0 @@ -a{top: 0 - } -a {top: 0 - } - -@media print{a{top: 0 - } - } -@media print { a { top: 0 - } - } diff --git a/test/options/space-before-closing-brace/process/css/test.css b/test/options/space-before-closing-brace/process/css/test.css deleted file mode 100644 index 2c0a59ca..00000000 --- a/test/options/space-before-closing-brace/process/css/test.css +++ /dev/null @@ -1,5 +0,0 @@ -a{top: 0} -a {top: 0 } - -@media print{a{top: 0}} -@media print { a { top: 0 } } diff --git a/test/options/space-before-closing-brace/process/css/test.expected.css b/test/options/space-before-closing-brace/process/css/test.expected.css deleted file mode 100644 index 9a2f6335..00000000 --- a/test/options/space-before-closing-brace/process/css/test.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -a{top: 0} -a {top: 0} - -@media print{a{top: 0}} -@media print { a { top: 0}} diff --git a/test/options/space-before-closing-brace/process/test.js b/test/options/space-before-closing-brace/process/test.js deleted file mode 100644 index 1bc22dbf..00000000 --- a/test/options/space-before-closing-brace/process/test.js +++ /dev/null @@ -1,36 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-before-closing-brace`, process', function() { - describe('css', function() { - it('Array value => should not change anything', function() { - let test = new Test(this, {'space-before-closing-brace': ['', ' ']}); - return test.shouldBeEqual('test.css'); - }); - - it('Invalid string value => should not change anything', function() { - let test = new Test(this, {'space-before-closing-brace': ' nani '}); - return test.shouldBeEqual('test.css'); - }); - - it('Float number value => should not change anything', function() { - let test = new Test(this, {'space-before-closing-brace': 3.5}); - return test.shouldBeEqual('test.css'); - }); - - it('Integer value => should set proper space before }', function() { - let test = new Test(this, {'space-before-closing-brace': 0}); - return test.shouldBeEqual('test.css', 'test.expected.css'); - }); - - it('Valid string value (spaces only) => should set proper space before }', function() { - let test = new Test(this, {'space-before-closing-brace': ' '}); - return test.shouldBeEqual('test.css', 'test-2.expected.css'); - }); - - it('Valid string value (spaces and newlines) => should set proper space before }', function() { - let test = new Test(this, {'space-before-closing-brace': '\n '}); - return test.shouldBeEqual('test.css', 'test-3.expected.css'); - }); - }); -}); - diff --git a/test/options/space-before-colon/detect/test.js b/test/options/space-before-colon/detect/test.js deleted file mode 100644 index 7189a60a..00000000 --- a/test/options/space-before-colon/detect/test.js +++ /dev/null @@ -1,43 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-before-colon`, detect', function() { - describe('css', function() { - it('Should detect no whitespaces', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-colon'], - 'a { color:red }', - {'space-before-colon': ''} - ); - }); - - it('Should detect no space from two variants', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-colon'], - 'a { color: red; color :red }', - {'space-before-colon': ''} - ); - }); - - it('Should detect no whitespaces along three variants', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-colon'], - 'a { color: red; background :red } b { width:10px }', - {'space-before-colon': ''} - ); - }); - - it('Should detect space', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-colon'], - 'a { color : red; background :red } b { width:10px }', - {'space-before-colon': ' '} - ); - }); - }); -}); - - diff --git a/test/options/space-before-colon/lint/test.js b/test/options/space-before-colon/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/space-before-colon/process/css/test-2.expected.css b/test/options/space-before-colon/process/css/test-2.expected.css deleted file mode 100644 index 8491cff8..00000000 --- a/test/options/space-before-colon/process/css/test-2.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -a { color : red } -a{color :red} -a {color : red} -a {color : /* foo */ red } -a {color /* bar */ : red } diff --git a/test/options/space-before-colon/process/css/test-3.expected.css b/test/options/space-before-colon/process/css/test-3.expected.css deleted file mode 100644 index 2d951a78..00000000 --- a/test/options/space-before-colon/process/css/test-3.expected.css +++ /dev/null @@ -1,10 +0,0 @@ -a { color - : red } -a{color - :red} -a {color - : red} -a {color - : /* foo */ red } -a {color /* bar */ - : red } diff --git a/test/options/space-before-colon/process/css/test.css b/test/options/space-before-colon/process/css/test.css deleted file mode 100644 index 637656fb..00000000 --- a/test/options/space-before-colon/process/css/test.css +++ /dev/null @@ -1,5 +0,0 @@ -a { color: red } -a{color:red} -a {color : red} -a {color : /* foo */ red } -a {color /* bar */ : red } diff --git a/test/options/space-before-colon/process/css/test.expected.css b/test/options/space-before-colon/process/css/test.expected.css deleted file mode 100644 index 9ffc1c4b..00000000 --- a/test/options/space-before-colon/process/css/test.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -a { color: red } -a{color:red} -a {color: red} -a {color: /* foo */ red } -a {color /* bar */: red } diff --git a/test/options/space-before-colon/process/sass/test.expected.sass b/test/options/space-before-colon/process/sass/test.expected.sass deleted file mode 100644 index a61746f7..00000000 --- a/test/options/space-before-colon/process/sass/test.expected.sass +++ /dev/null @@ -1,3 +0,0 @@ -a - color : tomato - top : 0 diff --git a/test/options/space-before-colon/process/sass/test.sass b/test/options/space-before-colon/process/sass/test.sass deleted file mode 100644 index f38512b5..00000000 --- a/test/options/space-before-colon/process/sass/test.sass +++ /dev/null @@ -1,3 +0,0 @@ -a - color: tomato - top: 0 diff --git a/test/options/space-before-colon/process/sass/test2.sass b/test/options/space-before-colon/process/sass/test2.sass deleted file mode 100644 index 3a5df0b2..00000000 --- a/test/options/space-before-colon/process/sass/test2.sass +++ /dev/null @@ -1,3 +0,0 @@ -a - :color tomato - :top 0 diff --git a/test/options/space-before-colon/process/test.js b/test/options/space-before-colon/process/test.js deleted file mode 100644 index c3b860f2..00000000 --- a/test/options/space-before-colon/process/test.js +++ /dev/null @@ -1,48 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-before-colon`, process', function() { - describe('css', function() { - it('Array value => should not change anything', function() { - let test = new Test(this, {'space-before-colon': ['', ' ']}); - return test.shouldBeEqual('test.css'); - }); - - it('Invalid string value => should not change anything', function() { - let test = new Test(this, {'space-before-colon': ' nani '}); - return test.shouldBeEqual('test.css'); - }); - - it('Float number value => should not change anything', function() { - let test = new Test(this, {'space-before-colon': 3.5}); - return test.shouldBeEqual('test.css'); - }); - - it('Integer value => should set proper space before colon', function() { - let test = new Test(this, {'space-before-colon': 0}); - return test.shouldBeEqual('test.css', 'test.expected.css'); - }); - - it('Valid string value (spaces only) => should set proper space before colon', function() { - let test = new Test(this, {'space-before-colon': ' '}); - return test.shouldBeEqual('test.css', 'test-2.expected.css'); - }); - - it('Valid string value (spaces and newlines) => should set proper space before colon', function() { - let test = new Test(this, {'space-before-colon': '\n '}); - return test.shouldBeEqual('test.css', 'test-3.expected.css'); - }); - }); - - describe('sass', function() { - it('Should correct space', function() { - let test = new Test(this, {'space-before-colon': 1}); - return test.shouldBeEqual('test.sass', 'test.expected.sass'); - }); - - it('Should not correct space', function() { - let test = new Test(this, {'space-before-colon': 1}); - return test.shouldBeEqual('test2.sass'); - }); - }); -}); - diff --git a/test/options/space-before-combinator/detect/test.js b/test/options/space-before-combinator/detect/test.js deleted file mode 100644 index e24e9a72..00000000 --- a/test/options/space-before-combinator/detect/test.js +++ /dev/null @@ -1,61 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-before-combinator`, detect', function() { - describe('css', function() { - it('Should detect no whitespaces before combinator', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-combinator'], - 'a+b { color:red }', - {'space-before-combinator': ''} - ); - }); - - it('Should detect a space before combinator', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-combinator'], - 'a + b { color:red }', - {'space-before-combinator': ' '} - ); - }); - - it('Should detect a space before combinator in long selector', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-combinator'], - 'a + b ~ c>d { color:red }', - {'space-before-combinator': ' '} - ); - }); - - it('Should detect a space before combinator in long selector, test 2', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-combinator'], - 'a>b + c + d { color:red }', - {'space-before-combinator': ' '} - ); - }); - - it('Should detect no whitespaces before combinator in long selector', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-combinator'], - 'a+b ~ c+d { color:red }', - {'space-before-combinator': ''} - ); - }); - - it('Shouldn’t detect whitespaces before combinator in selector without combinators', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-combinator'], - 'a { color:red }', - {} - ); - }); - }); -}); - - diff --git a/test/options/space-before-combinator/lint/test.js b/test/options/space-before-combinator/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/space-before-combinator/process/css/test-2.expected.css b/test/options/space-before-combinator/process/css/test-2.expected.css deleted file mode 100644 index d1320b14..00000000 --- a/test/options/space-before-combinator/process/css/test-2.expected.css +++ /dev/null @@ -1,10 +0,0 @@ -a >b { color: red } -a > b { color: red } -a >b { color: red } -a +b { color: red } -a + b { color: red } -a +b { color: red } -a ~b { color: red } -a ~ b { color: red } -a ~b { color: red } -a ~b + c >d { color: red } diff --git a/test/options/space-before-combinator/process/css/test-3.expected.css b/test/options/space-before-combinator/process/css/test-3.expected.css deleted file mode 100644 index 2a7f3179..00000000 --- a/test/options/space-before-combinator/process/css/test-3.expected.css +++ /dev/null @@ -1,22 +0,0 @@ -a - >b { color: red } -a - > b { color: red } -a - >b { color: red } -a - +b { color: red } -a - + b { color: red } -a - +b { color: red } -a - ~b { color: red } -a - ~ b { color: red } -a - ~b { color: red } -a - ~b - + c - >d { color: red } diff --git a/test/options/space-before-combinator/process/css/test.css b/test/options/space-before-combinator/process/css/test.css deleted file mode 100644 index 4ad8d86e..00000000 --- a/test/options/space-before-combinator/process/css/test.css +++ /dev/null @@ -1,10 +0,0 @@ -a>b { color: red } -a> b { color: red } -a >b { color: red } -a+b { color: red } -a+ b { color: red } -a +b { color: red } -a~b { color: red } -a~ b { color: red } -a ~b { color: red } -a ~b+ c>d { color: red } diff --git a/test/options/space-before-combinator/process/css/test.expected.css b/test/options/space-before-combinator/process/css/test.expected.css deleted file mode 100644 index 920bd510..00000000 --- a/test/options/space-before-combinator/process/css/test.expected.css +++ /dev/null @@ -1,10 +0,0 @@ -a>b { color: red } -a> b { color: red } -a>b { color: red } -a+b { color: red } -a+ b { color: red } -a+b { color: red } -a~b { color: red } -a~ b { color: red } -a~b { color: red } -a~b+ c>d { color: red } diff --git a/test/options/space-before-combinator/process/scss/test.expected.scss b/test/options/space-before-combinator/process/scss/test.expected.scss deleted file mode 100644 index d325dfaf..00000000 --- a/test/options/space-before-combinator/process/scss/test.expected.scss +++ /dev/null @@ -1,15 +0,0 @@ -a >b { - color: red; - - & >c { - color: red; - } -} - -a { - color: red; - - >c { - color: red; - } -} diff --git a/test/options/space-before-combinator/process/scss/test.scss b/test/options/space-before-combinator/process/scss/test.scss deleted file mode 100644 index f7d1894b..00000000 --- a/test/options/space-before-combinator/process/scss/test.scss +++ /dev/null @@ -1,15 +0,0 @@ -a>b { - color: red; - - &>c { - color: red; - } -} - -a { - color: red; - - >c { - color: red; - } -} diff --git a/test/options/space-before-combinator/process/test.js b/test/options/space-before-combinator/process/test.js deleted file mode 100644 index 523f3b60..00000000 --- a/test/options/space-before-combinator/process/test.js +++ /dev/null @@ -1,42 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-before-combinator`, process', function() { - describe('css', function() { - it('Array value => should not change anything', function() { - let test = new Test(this, {'space-before-combinator': ['', ' ']}); - return test.shouldBeEqual('test.css'); - }); - - it('Invalid string value => should not change anything', function() { - let test = new Test(this, {'space-before-combinator': ' nani '}); - return test.shouldBeEqual('test.css'); - }); - - it('Float number value => should not change anything', function() { - let test = new Test(this, {'space-before-combinator': 3.5}); - return test.shouldBeEqual('test.css'); - }); - - it('Integer value => should set proper space before combinator', function() { - let test = new Test(this, {'space-before-combinator': 0}); - return test.shouldBeEqual('test.css', 'test.expected.css'); - }); - - it('Valid string value (spaces only) => should set proper space before combinator', function() { - let test = new Test(this, {'space-before-combinator': ' '}); - return test.shouldBeEqual('test.css', 'test-2.expected.css'); - }); - - it('Valid string value (spaces and newlines) => should set proper space before combinator', function() { - let test = new Test(this, {'space-before-combinator': '\n '}); - return test.shouldBeEqual('test.css', 'test-3.expected.css'); - }); - }); - - describe('scss', function() { - it('Should not touch leading combinators', function() { - let test = new Test(this, {'space-before-combinator': ' '}); - return test.shouldBeEqual('test.scss', 'test.expected.scss'); - }); - }); -}); diff --git a/test/options/space-before-opening-brace/detect/test.js b/test/options/space-before-opening-brace/detect/test.js deleted file mode 100644 index b75bfae9..00000000 --- a/test/options/space-before-opening-brace/detect/test.js +++ /dev/null @@ -1,59 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-before-opening-brace`, detect', function() { - describe('css', function() { - it('Should detect no whitespace', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-opening-brace'], - 'a{top:0}', - {'space-before-opening-brace': ''} - ); - }); - - it('Should detect whitespace', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-opening-brace'], - 'a \n {top:0}', - {'space-before-opening-brace': ' \n '} - ); - }); - - it('Should detect no whitespace (2 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-opening-brace'], - 'a{top:0} b {left:0}', - {'space-before-opening-brace': ''} - ); - }); - - it('Should detect whitespace (2 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-opening-brace'], - 'a {top:0} b{left:0}', - {'space-before-opening-brace': ' '} - ); - }); - - it('Should detect no whitespace (3 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-opening-brace'], - 'a {top:0} b{left:0} c{right:0}', - {'space-before-opening-brace': ''} - ); - }); - - it('Should detect whitespace (3 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-opening-brace'], - 'a{top:0} b {left:0} c {right:0}', - {'space-before-opening-brace': ' '} - ); - }); - }); -}); diff --git a/test/options/space-before-opening-brace/lint/test.js b/test/options/space-before-opening-brace/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/space-before-opening-brace/process/css/issue-232.css b/test/options/space-before-opening-brace/process/css/issue-232.css deleted file mode 100644 index bc99e743..00000000 --- a/test/options/space-before-opening-brace/process/css/issue-232.css +++ /dev/null @@ -1,13 +0,0 @@ -@font-face -{ - font-family: Panda; - src: url(panda.ttf); -} - -@media screen and (max-width: 400px) -{ - @-ms-viewport - { - width: 320px; - } -} diff --git a/test/options/space-before-opening-brace/process/css/issue-232.expected.css b/test/options/space-before-opening-brace/process/css/issue-232.expected.css deleted file mode 100644 index 04d76f38..00000000 --- a/test/options/space-before-opening-brace/process/css/issue-232.expected.css +++ /dev/null @@ -1,10 +0,0 @@ -@font-face { - font-family: Panda; - src: url(panda.ttf); -} - -@media screen and (max-width: 400px) { - @-ms-viewport { - width: 320px; - } -} diff --git a/test/options/space-before-opening-brace/process/css/test-2.expected.css b/test/options/space-before-opening-brace/process/css/test-2.expected.css deleted file mode 100644 index 68a688a2..00000000 --- a/test/options/space-before-opening-brace/process/css/test-2.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -a {top: 0} -a {top: 0} - -@media print {a {top: 0}} -@media print { a { top: 0 } } diff --git a/test/options/space-before-opening-brace/process/css/test-3.expected.css b/test/options/space-before-opening-brace/process/css/test-3.expected.css deleted file mode 100644 index 8efc4e9d..00000000 --- a/test/options/space-before-opening-brace/process/css/test-3.expected.css +++ /dev/null @@ -1,11 +0,0 @@ -a - {top: 0} -a - {top: 0} - -@media print - {a - {top: 0}} -@media print - { a - { top: 0 } } diff --git a/test/options/space-before-opening-brace/process/css/test.css b/test/options/space-before-opening-brace/process/css/test.css deleted file mode 100644 index 0f8fadcc..00000000 --- a/test/options/space-before-opening-brace/process/css/test.css +++ /dev/null @@ -1,5 +0,0 @@ -a{top: 0} -a {top: 0} - -@media print{a{top: 0}} -@media print { a { top: 0 } } diff --git a/test/options/space-before-opening-brace/process/css/test.expected.css b/test/options/space-before-opening-brace/process/css/test.expected.css deleted file mode 100644 index 32014ddb..00000000 --- a/test/options/space-before-opening-brace/process/css/test.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -a{top: 0} -a{top: 0} - -@media print{a{top: 0}} -@media print{ a{ top: 0 } } diff --git a/test/options/space-before-opening-brace/process/scss/issue-231.expected.scss b/test/options/space-before-opening-brace/process/scss/issue-231.expected.scss deleted file mode 100644 index 917eb73a..00000000 --- a/test/options/space-before-opening-brace/process/scss/issue-231.expected.scss +++ /dev/null @@ -1,8 +0,0 @@ -li { - float: left; - @include respond-to(mobile) { - float: none; - width: $width; - $width: 100%; - } -} diff --git a/test/options/space-before-opening-brace/process/scss/issue-231.scss b/test/options/space-before-opening-brace/process/scss/issue-231.scss deleted file mode 100644 index f0abf87d..00000000 --- a/test/options/space-before-opening-brace/process/scss/issue-231.scss +++ /dev/null @@ -1,8 +0,0 @@ -li{ - float: left; - @include respond-to(mobile){ - float: none; - width: $width; - $width: 100%; - } -} diff --git a/test/options/space-before-opening-brace/process/scss/issue-319.expected.scss b/test/options/space-before-opening-brace/process/scss/issue-319.expected.scss deleted file mode 100644 index 4b0777bf..00000000 --- a/test/options/space-before-opening-brace/process/scss/issue-319.expected.scss +++ /dev/null @@ -1,9 +0,0 @@ -@import '../../helpers/__helpers'; - -.funky { - font: { - family: fantasy; - size: 30em; - weight: bold; - } -} diff --git a/test/options/space-before-opening-brace/process/scss/issue-319.scss b/test/options/space-before-opening-brace/process/scss/issue-319.scss deleted file mode 100644 index 068141cc..00000000 --- a/test/options/space-before-opening-brace/process/scss/issue-319.scss +++ /dev/null @@ -1,9 +0,0 @@ -@import '../../helpers/__helpers'; - -.funky{ - font:{ - family: fantasy; - size: 30em; - weight: bold; - } -} diff --git a/test/options/space-before-opening-brace/process/test.js b/test/options/space-before-opening-brace/process/test.js deleted file mode 100644 index dbf0de74..00000000 --- a/test/options/space-before-opening-brace/process/test.js +++ /dev/null @@ -1,52 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-before-opening-brace`, process', function() { - describe('css', function() { - it('Array value => should not change anything', function() { - let test = new Test(this, {'space-before-opening-brace': ['', ' ']}); - return test.shouldBeEqual('test.css'); - }); - - it('Invalid string value => should not change anything', function() { - let test = new Test(this, {'space-before-opening-brace': ' nani '}); - return test.shouldBeEqual('test.css'); - }); - - it('Float number value => should not change anything', function() { - let test = new Test(this, {'space-before-opening-brace': 3.5}); - return test.shouldBeEqual('test.css'); - }); - - it('Integer value => should set proper space before {', function() { - let test = new Test(this, {'space-before-opening-brace': 0}); - return test.shouldBeEqual('test.css', 'test.expected.css'); - }); - - it('Valid string value (spaces only) => should set proper space before {', function() { - let test = new Test(this, {'space-before-opening-brace': ' '}); - return test.shouldBeEqual('test.css', 'test-2.expected.css'); - }); - - it('Valid string value (spaces and newlines) => should set proper space before {', function() { - let test = new Test(this, {'space-before-opening-brace': '\n '}); - return test.shouldBeEqual('test.css', 'test-3.expected.css'); - }); - - it('Issue 232', function() { - let test = new Test(this, {'space-before-opening-brace': 1}); - return test.shouldBeEqual('issue-232.css', 'issue-232.expected.css'); - }); - }); - - describe('scss', function() { - it('Issue 231', function() { - let test = new Test(this, {'space-before-opening-brace': 1}); - return test.shouldBeEqual('issue-231.scss', 'issue-231.expected.scss'); - }); - - it('Issue 319', function() { - let test = new Test(this, {'space-before-opening-brace': 1}); - return test.shouldBeEqual('issue-319.scss', 'issue-319.expected.scss'); - }); - }); -}); diff --git a/test/options/space-before-selector-delimiter/detect/test.js b/test/options/space-before-selector-delimiter/detect/test.js deleted file mode 100644 index 72f67296..00000000 --- a/test/options/space-before-selector-delimiter/detect/test.js +++ /dev/null @@ -1,59 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-before-selector-delimiter`, detect', function() { - describe('css', function() { - it('Should detect no whitespace', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-selector-delimiter'], - 'a,b{top:0}', - {'space-before-selector-delimiter': ''} - ); - }); - - it('Should detect whitespace', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-selector-delimiter'], - 'a \n ,b {top:0}', - {'space-before-selector-delimiter': ' \n '} - ); - }); - - it('Should detect no whitespace (2 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-selector-delimiter'], - 'a,b{top:0} a ,b{left:0}', - {'space-before-selector-delimiter': ''} - ); - }); - - it('Should detect whitespace (2 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-selector-delimiter'], - 'a ,b {top:0} b,a{left:0}', - {'space-before-selector-delimiter': ' '} - ); - }); - - it('Should detect no whitespace (3 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-selector-delimiter'], - 'a ,b{top:0} b,c{left:0} c,d{right:0}', - {'space-before-selector-delimiter': ''} - ); - }); - - it('Should detect whitespace (3 blocks)', function() { - let test = new Test(this); - test.shouldDetect( - ['space-before-selector-delimiter'], - 'a,b{top:0} b ,c{left:0} c ,d{right:0}', - {'space-before-selector-delimiter': ' '} - ); - }); - }); -}); diff --git a/test/options/space-before-selector-delimiter/lint/test.js b/test/options/space-before-selector-delimiter/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/space-before-selector-delimiter/process/css/test-2.expected.css b/test/options/space-before-selector-delimiter/process/css/test-2.expected.css deleted file mode 100644 index 90b232e1..00000000 --- a/test/options/space-before-selector-delimiter/process/css/test-2.expected.css +++ /dev/null @@ -1,6 +0,0 @@ -a ,b { color: red } -a , b { color: red } -a ,b { color: red } -a , -b { color: red } -a+b ,c>d ,e{ color: red } \ No newline at end of file diff --git a/test/options/space-before-selector-delimiter/process/css/test-3.expected.css b/test/options/space-before-selector-delimiter/process/css/test-3.expected.css deleted file mode 100644 index 1b454c84..00000000 --- a/test/options/space-before-selector-delimiter/process/css/test-3.expected.css +++ /dev/null @@ -1,12 +0,0 @@ -a - ,b { color: red } -a - , b { color: red } -a - ,b { color: red } -a - , -b { color: red } -a+b - ,c>d - ,e{ color: red } \ No newline at end of file diff --git a/test/options/space-before-selector-delimiter/process/css/test.css b/test/options/space-before-selector-delimiter/process/css/test.css deleted file mode 100644 index cd8e7d77..00000000 --- a/test/options/space-before-selector-delimiter/process/css/test.css +++ /dev/null @@ -1,6 +0,0 @@ -a,b { color: red } -a, b { color: red } -a ,b { color: red } -a, -b { color: red } -a+b,c>d,e{ color: red } \ No newline at end of file diff --git a/test/options/space-before-selector-delimiter/process/css/test.expected.css b/test/options/space-before-selector-delimiter/process/css/test.expected.css deleted file mode 100644 index 3c566c55..00000000 --- a/test/options/space-before-selector-delimiter/process/css/test.expected.css +++ /dev/null @@ -1,6 +0,0 @@ -a,b { color: red } -a, b { color: red } -a,b { color: red } -a, -b { color: red } -a+b,c>d,e{ color: red } \ No newline at end of file diff --git a/test/options/space-before-selector-delimiter/process/test.js b/test/options/space-before-selector-delimiter/process/test.js deleted file mode 100644 index 828e820f..00000000 --- a/test/options/space-before-selector-delimiter/process/test.js +++ /dev/null @@ -1,35 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-before-selector-delimiter`, process', function() { - describe('css', function() { - it('Array value => should not change anything', function() { - let test = new Test(this, {'space-before-selector-delimiter': ['', ' ']}); - return test.shouldBeEqual('test.css'); - }); - - it('Invalid string value => should not change anything', function() { - let test = new Test(this, {'space-before-selector-delimiter': ' nani '}); - return test.shouldBeEqual('test.css'); - }); - - it('Float number value => should not change anything', function() { - let test = new Test(this, {'space-before-selector-delimiter': 3.5}); - return test.shouldBeEqual('test.css'); - }); - - it('Integer value => should set proper space before selector delimiter', function() { - let test = new Test(this, {'space-before-selector-delimiter': 0}); - return test.shouldBeEqual('test.css', 'test.expected.css'); - }); - - it('Valid string value (spaces only) => should set proper space before selector delimiter', function() { - let test = new Test(this, {'space-before-selector-delimiter': ' '}); - return test.shouldBeEqual('test.css', 'test-2.expected.css'); - }); - - it('Valid string value (spaces and newlines) => should set proper space before selector delimiter', function() { - let test = new Test(this, {'space-before-selector-delimiter': '\n '}); - return test.shouldBeEqual('test.css', 'test-3.expected.css'); - }); - }); -}); diff --git a/test/options/space-between-declarations/detect/test.js b/test/options/space-between-declarations/detect/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/space-between-declarations/lint/test.js b/test/options/space-between-declarations/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/space-between-declarations/process/css/comments.css b/test/options/space-between-declarations/process/css/comments.css deleted file mode 100644 index 0d8b9310..00000000 --- a/test/options/space-between-declarations/process/css/comments.css +++ /dev/null @@ -1,8 +0,0 @@ -a { - color: tomato; - /* comment */ - top: 0; /* comment */ - left: 10px; - right: 0; - /* comment */ - } diff --git a/test/options/space-between-declarations/process/css/comments.expected.css b/test/options/space-between-declarations/process/css/comments.expected.css deleted file mode 100644 index 5903c202..00000000 --- a/test/options/space-between-declarations/process/css/comments.expected.css +++ /dev/null @@ -1,6 +0,0 @@ -a { - color: tomato; - /* comment */ - top: 0; /* comment */ left: 10px; right: 0; - /* comment */ - } diff --git a/test/options/space-between-declarations/process/css/integer-value.css b/test/options/space-between-declarations/process/css/integer-value.css deleted file mode 100644 index de2c6491..00000000 --- a/test/options/space-between-declarations/process/css/integer-value.css +++ /dev/null @@ -1,6 +0,0 @@ -a { - color: tomato; - - top: 0; - left: 10px - } diff --git a/test/options/space-between-declarations/process/css/integer-value.expected.css b/test/options/space-between-declarations/process/css/integer-value.expected.css deleted file mode 100644 index 5d120170..00000000 --- a/test/options/space-between-declarations/process/css/integer-value.expected.css +++ /dev/null @@ -1,3 +0,0 @@ -a { - color: tomato;top: 0;left: 10px - } diff --git a/test/options/space-between-declarations/process/css/issue-239.css b/test/options/space-between-declarations/process/css/issue-239.css deleted file mode 100644 index ccf6ba7c..00000000 --- a/test/options/space-between-declarations/process/css/issue-239.css +++ /dev/null @@ -1,2 +0,0 @@ -html{ - color:#444;font-family:proxima-nova;font-size:62.5%;font-weight:300;line-height:1.5;} diff --git a/test/options/space-between-declarations/process/css/issue-239.expected.css b/test/options/space-between-declarations/process/css/issue-239.expected.css deleted file mode 100644 index ab145f70..00000000 --- a/test/options/space-between-declarations/process/css/issue-239.expected.css +++ /dev/null @@ -1,6 +0,0 @@ -html{ - color:#444; - font-family:proxima-nova; - font-size:62.5%; - font-weight:300; - line-height:1.5;} diff --git a/test/options/space-between-declarations/process/css/issue-378.css b/test/options/space-between-declarations/process/css/issue-378.css deleted file mode 100644 index 4c8dbfb6..00000000 --- a/test/options/space-between-declarations/process/css/issue-378.css +++ /dev/null @@ -1,3 +0,0 @@ -@media (min-width: 768px) { - body { background: red; } -} diff --git a/test/options/space-between-declarations/process/css/space-newline-value.css b/test/options/space-between-declarations/process/css/space-newline-value.css deleted file mode 100644 index ff86611c..00000000 --- a/test/options/space-between-declarations/process/css/space-newline-value.css +++ /dev/null @@ -1,4 +0,0 @@ -a { - color: tomato;top: 0; left: 10px; - right: 0; width: 100% \9; -} diff --git a/test/options/space-between-declarations/process/css/space-newline-value.expected.css b/test/options/space-between-declarations/process/css/space-newline-value.expected.css deleted file mode 100644 index 17c237ac..00000000 --- a/test/options/space-between-declarations/process/css/space-newline-value.expected.css +++ /dev/null @@ -1,7 +0,0 @@ -a { - color: tomato; - top: 0; - left: 10px; - right: 0; - width: 100% \9; -} diff --git a/test/options/space-between-declarations/process/css/space-value.css b/test/options/space-between-declarations/process/css/space-value.css deleted file mode 100644 index de2c6491..00000000 --- a/test/options/space-between-declarations/process/css/space-value.css +++ /dev/null @@ -1,6 +0,0 @@ -a { - color: tomato; - - top: 0; - left: 10px - } diff --git a/test/options/space-between-declarations/process/css/space-value.expected.css b/test/options/space-between-declarations/process/css/space-value.expected.css deleted file mode 100644 index 6795d9c4..00000000 --- a/test/options/space-between-declarations/process/css/space-value.expected.css +++ /dev/null @@ -1,3 +0,0 @@ -a { - color: tomato; top: 0; left: 10px - } diff --git a/test/options/space-between-declarations/process/css/test.css b/test/options/space-between-declarations/process/css/test.css deleted file mode 100644 index 7a75e51d..00000000 --- a/test/options/space-between-declarations/process/css/test.css +++ /dev/null @@ -1,2 +0,0 @@ -a { - animal: panda;color: tomato; top: 0; } diff --git a/test/options/space-between-declarations/process/test.js b/test/options/space-between-declarations/process/test.js deleted file mode 100644 index f230d06c..00000000 --- a/test/options/space-between-declarations/process/test.js +++ /dev/null @@ -1,50 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `space-between-declarations`, process', function() { - describe('css', function() { - it('Array value => should not change anything', function() { - let test = new Test(this, {'space-between-declarations': ['', ' ']}); - return test.shouldBeEqual('test.css'); - }); - - it('Invalid string value => should not change anything', function() { - let test = new Test(this, {'space-between-declarations': ' nani '}); - return test.shouldBeEqual('test.css'); - }); - - it('Float number value => should not change anything', function() { - let test = new Test(this, {'space-between-declarations': 3.5}); - return test.shouldBeEqual('test.css'); - }); - - it('Integer value => should set proper space after declaration', function() { - let test = new Test(this, {'space-between-declarations': 0}); - return test.shouldBeEqual('integer-value.css', 'integer-value.expected.css'); - }); - - it('Valid string value (spaces only) => should set proper space after declaration', function() { - let test = new Test(this, {'space-between-declarations': ' '}); - return test.shouldBeEqual('space-value.css', 'space-value.expected.css'); - }); - - it('Valid string value (spaces and newlines) => should set proper space after declaration', function() { - let test = new Test(this, {'space-between-declarations': '\n '}); - return test.shouldBeEqual('space-newline-value.css', 'space-newline-value.expected.css'); - }); - - it('Should leave comments as is', function() { - let test = new Test(this, {'space-between-declarations': 1}); - return test.shouldBeEqual('comments.css', 'comments.expected.css'); - }); - - it('Issue 239', function() { - let test = new Test(this, {'space-between-declarations': '\n '}); - return test.shouldBeEqual('issue-239.css', 'issue-239.expected.css'); - }); - - it('Issue 378', function() { - let test = new Test(this, {'space-between-declarations': '\n'}); - return test.shouldBeEqual('issue-378.css'); - }); - }); -}); diff --git a/test/options/strip-spaces/detect/test.js b/test/options/strip-spaces/detect/test.js deleted file mode 100644 index e121275c..00000000 --- a/test/options/strip-spaces/detect/test.js +++ /dev/null @@ -1,77 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `strip-spaces`, detect', function() { - describe('css', function() { - it('Should detect strip-spaces option set to `true`', function() { - let test = new Test(this); - test.shouldDetect( - ['strip-spaces'], - 'a { color: red }', - {'strip-spaces': true} - ); - }); - - it('Should detect strip-spaces option set to `false`', function() { - let test = new Test(this); - test.shouldDetect( - ['strip-spaces'], - 'a { color: red } ', - {'strip-spaces': false} - ); - }); - - it('Should detect strip-spaces option set to `true` with newline', function() { - let test = new Test(this); - test.shouldDetect( - ['strip-spaces'], - 'a { color: red }\nb { color: blue }', - {'strip-spaces': true} - ); - }); - - it('Should detect strip-spaces option set to `false` with newline', function() { - let test = new Test(this); - test.shouldDetect( - ['strip-spaces'], - 'a { color: red } \nb { color: blue }', - {'strip-spaces': false} - ); - }); - - it('Should detect strip-spaces option set to `true` inside a value', function() { - let test = new Test(this); - test.shouldDetect( - ['strip-spaces'], - 'a {\n color:\n red }', - {'strip-spaces': true} - ); - }); - - it('Should detect strip-spaces option set to `false` inside a value', function() { - let test = new Test(this); - test.shouldDetect( - ['strip-spaces'], - 'a {\n color: \n red }', - {'strip-spaces': false} - ); - }); - - it('Should detect strip-spaces option set to `true` if the only trailing space is the last newline', function() { - let test = new Test(this); - test.shouldDetect( - ['strip-spaces'], - 'a { color: red }\n', - {'strip-spaces': true} - ); - }); - - it('Should detect strip-spaces option set to `false` if there is more than one newline at the end', function() { - let test = new Test(this); - test.shouldDetect( - ['strip-spaces'], - 'a { color: red }\n\n', - {'strip-spaces': false} - ); - }); - }); -}); diff --git a/test/options/strip-spaces/lint/test.js b/test/options/strip-spaces/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/strip-spaces/process/test.js b/test/options/strip-spaces/process/test.js deleted file mode 100644 index 1c73598c..00000000 --- a/test/options/strip-spaces/process/test.js +++ /dev/null @@ -1,37 +0,0 @@ -var assert = require('assert'); -let Test = require('../../option_test'); - -describe('Option `strip-spaces`, process', function() { - describe('css', function() { - it('Invalid value should not trim trailing spaces', function() { - let test = new Test(this, {'strip-spaces': 'foobar'}); - return test.comb.processString('a { color: red } \n') - .then(function(actual) { - assert.equal(actual, 'a { color: red } \n'); - }); - }); - - it('Boolean true value should trim all trailing spaces', function() { - let test = new Test(this, {'strip-spaces': true}); - return test.comb.processString( - 'a { color: red } \n' + - 'a{color:red}\t /* foobar */\t \n' + - 'a {color:red} \n \n' - ).then(function(actual) { - assert.equal(actual, - 'a { color: red }\n' + - 'a{color:red}\t /* foobar */\n' + - 'a {color:red}\n'); - }); - }); - - it('Boolean true value should trim trailing spaces at eof', function() { - let test = new Test(this, {'strip-spaces': true}); - return test.comb.processString( - 'a {color:red} ' - ).then(function(actual) { - assert.equal(actual, 'a {color:red}'); - }); - }); - }); -}); diff --git a/test/options/tab-size/detect/test.js b/test/options/tab-size/detect/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/tab-size/lint/test.js b/test/options/tab-size/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/tab-size/process/css/test.css b/test/options/tab-size/process/css/test.css deleted file mode 100644 index a5ff8ef6..00000000 --- a/test/options/tab-size/process/css/test.css +++ /dev/null @@ -1,4 +0,0 @@ -a { - color: tomato; - top: 0; - } diff --git a/test/options/tab-size/process/css/test.expected.css b/test/options/tab-size/process/css/test.expected.css deleted file mode 100644 index 248453a5..00000000 --- a/test/options/tab-size/process/css/test.expected.css +++ /dev/null @@ -1,4 +0,0 @@ -a { - color: tomato; - top: 0; - } diff --git a/test/options/tab-size/process/test.js b/test/options/tab-size/process/test.js deleted file mode 100644 index ea4a4650..00000000 --- a/test/options/tab-size/process/test.js +++ /dev/null @@ -1,20 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `tab-size`, process', function() { - describe('css', function() { - it('Test 1: String value => should not change anything', function() { - let test = new Test(this, {'tab-size': ' '}); - return test.shouldBeEqual('test.css'); - }); - - it('Test 2: Float value => should not change anything', function() { - let test = new Test(this, {'tab-size': 4.5}); - return test.shouldBeEqual('test.css'); - }); - - it('Test 3: Integer value => should replace tabs with proper number of spaces', function() { - let test = new Test(this, {'tab-size': 4}); - return test.shouldBeEqual('test.css', 'test.expected.css'); - }); - }); -}); diff --git a/test/options/unitless-zero/detect/test.js b/test/options/unitless-zero/detect/test.js deleted file mode 100644 index 5d407a49..00000000 --- a/test/options/unitless-zero/detect/test.js +++ /dev/null @@ -1,69 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `unitless-zero`, detect', function() { - describe('css', function() { - it('Should detect unitless zero option', function() { - let test = new Test(this); - test.shouldDetect( - ['unitless-zero'], - 'a { width: 0 }', - {'unitless-zero': true} - ); - }); - - it('Should detect zero with unit', function() { - let test = new Test(this); - test.shouldDetect( - ['unitless-zero'], - 'a { width: 0px }', - {'unitless-zero': false} - ); - }); - - it('Should detect unitless zero option with multiple values', function() { - let test = new Test(this); - test.shouldDetect( - ['unitless-zero'], - 'a { padding: 0px 0 0 }', - {'unitless-zero': true} - ); - }); - - it('Should detect zero with unit and multiple values', function() { - let test = new Test(this); - test.shouldDetect( - ['unitless-zero'], - 'a { padding: 0px 0 0em }', - {'unitless-zero': false} - ); - }); - - it('Shouldn’t detect unitless zero option if there is no unit', function() { - let test = new Test(this); - test.shouldDetect( - ['unitless-zero'], - 'a { color: red }', - {} - ); - }); - - it('Shouldn’t detect unitless zero option if there is `deg` unit', function() { - let test = new Test(this); - test.shouldDetect( - ['unitless-zero'], - 'a { transform: rotate(0deg) }', - {} - ); - }); - - it('Should detect unitless zero option with percents', function() { - let test = new Test(this); - test.shouldDetect( - ['unitless-zero'], - 'a { padding: 0% 0 0 }', - {'unitless-zero': true} - ); - }); - }); -}); - diff --git a/test/options/unitless-zero/lint/test.js b/test/options/unitless-zero/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/unitless-zero/process/css/issue-394.css b/test/options/unitless-zero/process/css/issue-394.css deleted file mode 100644 index 065b1142..00000000 --- a/test/options/unitless-zero/process/css/issue-394.css +++ /dev/null @@ -1,6 +0,0 @@ -.example { - bottom: 0em; - left: 0.5em; - right: 1em; - top: 1.5em; -} diff --git a/test/options/unitless-zero/process/css/issue-394.expected.css b/test/options/unitless-zero/process/css/issue-394.expected.css deleted file mode 100644 index dc9de0f0..00000000 --- a/test/options/unitless-zero/process/css/issue-394.expected.css +++ /dev/null @@ -1,6 +0,0 @@ -.example { - bottom: 0; - left: 0.5em; - right: 1em; - top: 1.5em; -} diff --git a/test/options/unitless-zero/process/less/issue-389.less b/test/options/unitless-zero/process/less/issue-389.less deleted file mode 100644 index f0626d68..00000000 --- a/test/options/unitless-zero/process/less/issue-389.less +++ /dev/null @@ -1,4 +0,0 @@ -.test -{ - width: 100%; -} diff --git a/test/options/unitless-zero/process/test.js b/test/options/unitless-zero/process/test.js deleted file mode 100644 index 1f2057aa..00000000 --- a/test/options/unitless-zero/process/test.js +++ /dev/null @@ -1,54 +0,0 @@ -var assert = require('assert'); -let Test = require('../../option_test'); - -describe('Option `unitless-zero`, process', function() { - describe('css', function() { - it('Should remove units in zero-valued dimensions', function() { - let test = new Test(this, {'unitless-zero': true}); - return test.comb.processString( - 'div { margin: 0em; padding: 0px }' - ).then(function(actual) { - assert.equal(actual, 'div { margin: 0; padding: 0 }'); - }); - }); - - it('Should remove units in zero-valued dimensions, test 2', function() { - let test = new Test(this, {'unitless-zero': true}); - return test.comb.processString( - 'div { margin: 0% }' - ).then(function(actual) { - assert.equal(actual, 'div { margin: 0 }'); - }); - }); - - it('Should remove units in zero-valued media-query params', function() { - let test = new Test(this, {'unitless-zero': true}); - return test.comb.processString( - '@media all and (min-width: 0px) { div { margin: 0em; padding: 0px } }' - ).then(function(actual) { - assert.equal(actual, '@media all and (min-width: 0) { div { margin: 0; padding: 0 } }'); - }); - }); - - it('Should not remove units (degs) in rotate property', function() { - let test = new Test(this, {'unitless-zero': true}); - return test.comb.processString( - 'div { -webkit-transform: rotate(0deg); }' - ).then(function(actual) { - assert.equal(actual, 'div { -webkit-transform: rotate(0deg); }'); - }); - }); - - it('Issue 394', function() { - let test = new Test(this, {'unitless-zero': true}); - return test.shouldBeEqual('issue-394.css', 'issue-394.expected.css'); - }); - }); - - describe('less', function() { - it('Issue 389', function() { - let test = new Test(this, {'unitless-zero': true}); - return test.shouldBeEqual('issue-389.less'); - }); - }); -}); diff --git a/test/options/vendor-prefix-align/detect/css/already-aligned.css b/test/options/vendor-prefix-align/detect/css/already-aligned.css deleted file mode 100644 index 35b7eeec..00000000 --- a/test/options/vendor-prefix-align/detect/css/already-aligned.css +++ /dev/null @@ -1,11 +0,0 @@ -.radio-button_theme_normal .radio-button__radio:before -{ - background: rgba(0,0,0,.4); - background: -webkit-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: -moz-linear-gradient(top, rgba(0,0,0,.2) 0, rgba(0,0,0,.4) 100%); - background: -o-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: linear-gradient(to bottom, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - - -moz-box-shadow: 0 1px 0 rgba(0,0,0,.07); - box-shadow: 0 1px 0 rgba(0,0,0,.07); -} diff --git a/test/options/vendor-prefix-align/detect/css/complex.css b/test/options/vendor-prefix-align/detect/css/complex.css deleted file mode 100644 index 3f896df2..00000000 --- a/test/options/vendor-prefix-align/detect/css/complex.css +++ /dev/null @@ -1,30 +0,0 @@ -@media all and (min-width:0) -{ - .radio-button_theme_normal .radio-button__radio:before - { - background: rgba(0,0,0,.4); - background: -webkit-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: -moz-linear-gradient(top, rgba(0,0,0,.2) 0, rgba(0,0,0,.4) 100%); - background: -o-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: linear-gradient(to bottom, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - -moz-box-shadow: 0 1px 0 rgba(0,0,0,.07); - box-shadow: 0 1px 0 rgba(0,0,0,.07); - } - - /* :after — фон */ - .radio-button_theme_normal .radio-button__radio:after - { - background: #fff; - background: -webkit-linear-gradient(top, #fff 0,#eee 100%); - background: -moz-linear-gradient(top, #fff 0, #eee 100%); - background: -o-linear-gradient(top, #fff 0,#eee 100%); - background: linear-gradient(to bottom, #fff 0,#eee 100%); - } - - /* _focused_yes */ - .radio-button_theme_normal .radio-button__radio_focused_yes:before - { - -moz-box-shadow: 0 0 6px 2px rgba(255,204,0,.7), 0 1px 0 rgba(0,0,0,.07); - box-shadow: 0 0 6px 2px rgba(255,204,0,.7), 0 1px 0 rgba(0,0,0,.07); - } -} diff --git a/test/options/vendor-prefix-align/detect/css/complex.expected.css b/test/options/vendor-prefix-align/detect/css/complex.expected.css deleted file mode 100644 index 688ecd61..00000000 --- a/test/options/vendor-prefix-align/detect/css/complex.expected.css +++ /dev/null @@ -1,30 +0,0 @@ -@media all and (min-width:0) -{ - .radio-button_theme_normal .radio-button__radio:before - { - background: rgba(0,0,0,.4); - background: -webkit-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: -moz-linear-gradient(top, rgba(0,0,0,.2) 0, rgba(0,0,0,.4) 100%); - background: -o-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: linear-gradient(to bottom, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - -moz-box-shadow: 0 1px 0 rgba(0,0,0,.07); - box-shadow: 0 1px 0 rgba(0,0,0,.07); - } - - /* :after — фон */ - .radio-button_theme_normal .radio-button__radio:after - { - background: #fff; - background: -webkit-linear-gradient(top, #fff 0,#eee 100%); - background: -moz-linear-gradient(top, #fff 0, #eee 100%); - background: -o-linear-gradient(top, #fff 0,#eee 100%); - background: linear-gradient(to bottom, #fff 0,#eee 100%); - } - - /* _focused_yes */ - .radio-button_theme_normal .radio-button__radio_focused_yes:before - { - -moz-box-shadow: 0 0 6px 2px rgba(255,204,0,.7), 0 1px 0 rgba(0,0,0,.07); - box-shadow: 0 0 6px 2px rgba(255,204,0,.7), 0 1px 0 rgba(0,0,0,.07); - } -} diff --git a/test/options/vendor-prefix-align/detect/css/property-align.css b/test/options/vendor-prefix-align/detect/css/property-align.css deleted file mode 100644 index b19d6b7c..00000000 --- a/test/options/vendor-prefix-align/detect/css/property-align.css +++ /dev/null @@ -1,8 +0,0 @@ -a -{ - color: #fff; - - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} diff --git a/test/options/vendor-prefix-align/detect/css/property-align.expected.css b/test/options/vendor-prefix-align/detect/css/property-align.expected.css deleted file mode 100644 index 25808572..00000000 --- a/test/options/vendor-prefix-align/detect/css/property-align.expected.css +++ /dev/null @@ -1,8 +0,0 @@ -a -{ - color: #fff; - - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} diff --git a/test/options/vendor-prefix-align/detect/css/value-align.css b/test/options/vendor-prefix-align/detect/css/value-align.css deleted file mode 100644 index f15a3620..00000000 --- a/test/options/vendor-prefix-align/detect/css/value-align.css +++ /dev/null @@ -1,10 +0,0 @@ -b -{ - color: #fff; - - background: -webkit-linear-gradient(linear, left top, right top, color-stop(0,rgba(255,255,255,0)), color-stop(20%, #fff)); - background: -moz-linear-gradient(left, rgba(255,255,255,0) 0, #fff 20%); - background: -o-linear-gradient(left, rgba(255,255,255,0) 0, #fff 20%); - background: -ms-linear-gradient(left, rgba(255,255,255,0) 0, #fff 20%); - background: linear-gradient(to right, rgba(255,255,255,0) 0, #fff 20%); -} diff --git a/test/options/vendor-prefix-align/detect/css/value-align.expected.css b/test/options/vendor-prefix-align/detect/css/value-align.expected.css deleted file mode 100644 index 60aba2ee..00000000 --- a/test/options/vendor-prefix-align/detect/css/value-align.expected.css +++ /dev/null @@ -1,10 +0,0 @@ -b -{ - color: #fff; - - background: -webkit-linear-gradient(linear, left top, right top, color-stop(0,rgba(255,255,255,0)), color-stop(20%, #fff)); - background: -moz-linear-gradient(left, rgba(255,255,255,0) 0, #fff 20%); - background: -o-linear-gradient(left, rgba(255,255,255,0) 0, #fff 20%); - background: -ms-linear-gradient(left, rgba(255,255,255,0) 0, #fff 20%); - background: linear-gradient(to right, rgba(255,255,255,0) 0, #fff 20%); -} diff --git a/test/options/vendor-prefix-align/detect/test.js b/test/options/vendor-prefix-align/detect/test.js deleted file mode 100644 index ca683896..00000000 --- a/test/options/vendor-prefix-align/detect/test.js +++ /dev/null @@ -1,86 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `vendor-prefix-align`, detect', function() { - describe('css', function() { - it('Shouldn not detect anything if there are no prefixed groups', function() { - let test = new Test(this); - test.shouldDetect( - ['vendor-prefix-align'], - 'a{ color: red }a{ -webkit-transform: translateZ(0) }', - {} - ); - }); - - it('Shouldn detect vendor-prefix-align as false in properties', function() { - let test = new Test(this); - test.shouldDetect( - ['vendor-prefix-align'], - test.readFile('property-align.css'), - {'vendor-prefix-align': false} - ); - }); - - it('Shouldn detect vendor-prefix-align as true in properties', function() { - let test = new Test(this); - test.shouldDetect( - ['vendor-prefix-align'], - test.readFile('property-align.expected.css'), - {'vendor-prefix-align': true} - ); - }); - - it('Shouldn detect vendor-prefix-align as false in values', function() { - let test = new Test(this); - test.shouldDetect( - ['vendor-prefix-align'], - test.readFile('value-align.css'), - {'vendor-prefix-align': false} - ); - }); - - it('Shouldn detect vendor-prefix-align as true in values', function() { - let test = new Test(this); - test.shouldDetect( - ['vendor-prefix-align'], - test.readFile('value-align.expected.css'), - {'vendor-prefix-align': true} - ); - }); - - it('Shouldn detect vendor-prefix-align as true, test 1', function() { - let test = new Test(this); - test.shouldDetect( - ['vendor-prefix-align'], - test.readFile('already-aligned.css'), - {'vendor-prefix-align': true} - ); - }); - - it('Shouldn detect vendor-prefix-align as true, test 2', function() { - let test = new Test(this); - test.shouldDetect( - ['vendor-prefix-align'], - test.readFile('complex.expected.css'), - {'vendor-prefix-align': true} - ); - }); - - it('Shouldn detect vendor-prefix-align as false', function() { - let test = new Test(this); - test.shouldDetect( - ['vendor-prefix-align'], - test.readFile('complex.css'), - {'vendor-prefix-align': false} - ); - }); - - it('Should not detect anything in simple case', function() { - let test = new Test(this); - test.shouldDetect( - ['vendor-prefix-align'], - 'a{border:0;}', - {} - ); - }); - }); -}); diff --git a/test/options/vendor-prefix-align/lint/test.js b/test/options/vendor-prefix-align/lint/test.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test/options/vendor-prefix-align/process/css/already-aligned.css b/test/options/vendor-prefix-align/process/css/already-aligned.css deleted file mode 100644 index 35b7eeec..00000000 --- a/test/options/vendor-prefix-align/process/css/already-aligned.css +++ /dev/null @@ -1,11 +0,0 @@ -.radio-button_theme_normal .radio-button__radio:before -{ - background: rgba(0,0,0,.4); - background: -webkit-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: -moz-linear-gradient(top, rgba(0,0,0,.2) 0, rgba(0,0,0,.4) 100%); - background: -o-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: linear-gradient(to bottom, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - - -moz-box-shadow: 0 1px 0 rgba(0,0,0,.07); - box-shadow: 0 1px 0 rgba(0,0,0,.07); -} diff --git a/test/options/vendor-prefix-align/process/css/already-aligned.expected.css b/test/options/vendor-prefix-align/process/css/already-aligned.expected.css deleted file mode 100644 index 35b7eeec..00000000 --- a/test/options/vendor-prefix-align/process/css/already-aligned.expected.css +++ /dev/null @@ -1,11 +0,0 @@ -.radio-button_theme_normal .radio-button__radio:before -{ - background: rgba(0,0,0,.4); - background: -webkit-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: -moz-linear-gradient(top, rgba(0,0,0,.2) 0, rgba(0,0,0,.4) 100%); - background: -o-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: linear-gradient(to bottom, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - - -moz-box-shadow: 0 1px 0 rgba(0,0,0,.07); - box-shadow: 0 1px 0 rgba(0,0,0,.07); -} diff --git a/test/options/vendor-prefix-align/process/css/both.css b/test/options/vendor-prefix-align/process/css/both.css deleted file mode 100644 index 3791d296..00000000 --- a/test/options/vendor-prefix-align/process/css/both.css +++ /dev/null @@ -1,5 +0,0 @@ -.serp-block__head_animation_yes -{ - -webkit-transition: -webkit-transform 150ms linear; - transition: transform 150ms linear; -} diff --git a/test/options/vendor-prefix-align/process/css/both.expected.css b/test/options/vendor-prefix-align/process/css/both.expected.css deleted file mode 100644 index f58aa02a..00000000 --- a/test/options/vendor-prefix-align/process/css/both.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -.serp-block__head_animation_yes -{ - -webkit-transition: -webkit-transform 150ms linear; - transition: transform 150ms linear; -} diff --git a/test/options/vendor-prefix-align/process/css/complex.css b/test/options/vendor-prefix-align/process/css/complex.css deleted file mode 100644 index 3f896df2..00000000 --- a/test/options/vendor-prefix-align/process/css/complex.css +++ /dev/null @@ -1,30 +0,0 @@ -@media all and (min-width:0) -{ - .radio-button_theme_normal .radio-button__radio:before - { - background: rgba(0,0,0,.4); - background: -webkit-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: -moz-linear-gradient(top, rgba(0,0,0,.2) 0, rgba(0,0,0,.4) 100%); - background: -o-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: linear-gradient(to bottom, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - -moz-box-shadow: 0 1px 0 rgba(0,0,0,.07); - box-shadow: 0 1px 0 rgba(0,0,0,.07); - } - - /* :after — фон */ - .radio-button_theme_normal .radio-button__radio:after - { - background: #fff; - background: -webkit-linear-gradient(top, #fff 0,#eee 100%); - background: -moz-linear-gradient(top, #fff 0, #eee 100%); - background: -o-linear-gradient(top, #fff 0,#eee 100%); - background: linear-gradient(to bottom, #fff 0,#eee 100%); - } - - /* _focused_yes */ - .radio-button_theme_normal .radio-button__radio_focused_yes:before - { - -moz-box-shadow: 0 0 6px 2px rgba(255,204,0,.7), 0 1px 0 rgba(0,0,0,.07); - box-shadow: 0 0 6px 2px rgba(255,204,0,.7), 0 1px 0 rgba(0,0,0,.07); - } -} diff --git a/test/options/vendor-prefix-align/process/css/complex.expected.css b/test/options/vendor-prefix-align/process/css/complex.expected.css deleted file mode 100644 index 688ecd61..00000000 --- a/test/options/vendor-prefix-align/process/css/complex.expected.css +++ /dev/null @@ -1,30 +0,0 @@ -@media all and (min-width:0) -{ - .radio-button_theme_normal .radio-button__radio:before - { - background: rgba(0,0,0,.4); - background: -webkit-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: -moz-linear-gradient(top, rgba(0,0,0,.2) 0, rgba(0,0,0,.4) 100%); - background: -o-linear-gradient(top, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - background: linear-gradient(to bottom, rgba(0,0,0,.2) 0,rgba(0,0,0,.4) 100%); - -moz-box-shadow: 0 1px 0 rgba(0,0,0,.07); - box-shadow: 0 1px 0 rgba(0,0,0,.07); - } - - /* :after — фон */ - .radio-button_theme_normal .radio-button__radio:after - { - background: #fff; - background: -webkit-linear-gradient(top, #fff 0,#eee 100%); - background: -moz-linear-gradient(top, #fff 0, #eee 100%); - background: -o-linear-gradient(top, #fff 0,#eee 100%); - background: linear-gradient(to bottom, #fff 0,#eee 100%); - } - - /* _focused_yes */ - .radio-button_theme_normal .radio-button__radio_focused_yes:before - { - -moz-box-shadow: 0 0 6px 2px rgba(255,204,0,.7), 0 1px 0 rgba(0,0,0,.07); - box-shadow: 0 0 6px 2px rgba(255,204,0,.7), 0 1px 0 rgba(0,0,0,.07); - } -} diff --git a/test/options/vendor-prefix-align/process/css/issue-193.css b/test/options/vendor-prefix-align/process/css/issue-193.css deleted file mode 100644 index e0047dd4..00000000 --- a/test/options/vendor-prefix-align/process/css/issue-193.css +++ /dev/null @@ -1,2 +0,0 @@ -li {color: #7799c8; - font-size: 10px;} diff --git a/test/options/vendor-prefix-align/process/css/issue-193.expected.css b/test/options/vendor-prefix-align/process/css/issue-193.expected.css deleted file mode 100644 index e0047dd4..00000000 --- a/test/options/vendor-prefix-align/process/css/issue-193.expected.css +++ /dev/null @@ -1,2 +0,0 @@ -li {color: #7799c8; - font-size: 10px;} diff --git a/test/options/vendor-prefix-align/process/css/issue-241.css b/test/options/vendor-prefix-align/process/css/issue-241.css deleted file mode 100644 index e562a614..00000000 --- a/test/options/vendor-prefix-align/process/css/issue-241.css +++ /dev/null @@ -1,6 +0,0 @@ -* -{ - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} diff --git a/test/options/vendor-prefix-align/process/css/issue-241.expected.css b/test/options/vendor-prefix-align/process/css/issue-241.expected.css deleted file mode 100644 index bbc0e348..00000000 --- a/test/options/vendor-prefix-align/process/css/issue-241.expected.css +++ /dev/null @@ -1,6 +0,0 @@ -* -{ - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } diff --git a/test/options/vendor-prefix-align/process/css/multiline-comments.css b/test/options/vendor-prefix-align/process/css/multiline-comments.css deleted file mode 100644 index 33c66c5e..00000000 --- a/test/options/vendor-prefix-align/process/css/multiline-comments.css +++ /dev/null @@ -1,9 +0,0 @@ -a -{ - -webkit-color: panda; - /* - * /\_/\ - * ( o.o ) - * > ^ < - */ -moz-color: panda; -} diff --git a/test/options/vendor-prefix-align/process/css/multiline-comments.expected.css b/test/options/vendor-prefix-align/process/css/multiline-comments.expected.css deleted file mode 100644 index 6bc01b39..00000000 --- a/test/options/vendor-prefix-align/process/css/multiline-comments.expected.css +++ /dev/null @@ -1,9 +0,0 @@ -a -{ - -webkit-color: panda; - /* - * /\_/\ - * ( o.o ) - * > ^ < - */ -moz-color: panda; -} diff --git a/test/options/vendor-prefix-align/process/css/one-line-2.css b/test/options/vendor-prefix-align/process/css/one-line-2.css deleted file mode 100644 index 6050079f..00000000 --- a/test/options/vendor-prefix-align/process/css/one-line-2.css +++ /dev/null @@ -1 +0,0 @@ -a{top:0} diff --git a/test/options/vendor-prefix-align/process/css/one-line-2.expected.css b/test/options/vendor-prefix-align/process/css/one-line-2.expected.css deleted file mode 100644 index 6050079f..00000000 --- a/test/options/vendor-prefix-align/process/css/one-line-2.expected.css +++ /dev/null @@ -1 +0,0 @@ -a{top:0} diff --git a/test/options/vendor-prefix-align/process/css/one-line.css b/test/options/vendor-prefix-align/process/css/one-line.css deleted file mode 100644 index 34265960..00000000 --- a/test/options/vendor-prefix-align/process/css/one-line.css +++ /dev/null @@ -1 +0,0 @@ -a{ -webkit-color:tomato; -moz-color:tomato; top:0 } diff --git a/test/options/vendor-prefix-align/process/css/one-line.expected.css b/test/options/vendor-prefix-align/process/css/one-line.expected.css deleted file mode 100644 index 34265960..00000000 --- a/test/options/vendor-prefix-align/process/css/one-line.expected.css +++ /dev/null @@ -1 +0,0 @@ -a{ -webkit-color:tomato; -moz-color:tomato; top:0 } diff --git a/test/options/vendor-prefix-align/process/css/property-align.css b/test/options/vendor-prefix-align/process/css/property-align.css deleted file mode 100644 index b19d6b7c..00000000 --- a/test/options/vendor-prefix-align/process/css/property-align.css +++ /dev/null @@ -1,8 +0,0 @@ -a -{ - color: #fff; - - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} diff --git a/test/options/vendor-prefix-align/process/css/property-align.expected.css b/test/options/vendor-prefix-align/process/css/property-align.expected.css deleted file mode 100644 index 25808572..00000000 --- a/test/options/vendor-prefix-align/process/css/property-align.expected.css +++ /dev/null @@ -1,8 +0,0 @@ -a -{ - color: #fff; - - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} diff --git a/test/options/vendor-prefix-align/process/css/same-name.css b/test/options/vendor-prefix-align/process/css/same-name.css deleted file mode 100644 index dbdc5c40..00000000 --- a/test/options/vendor-prefix-align/process/css/same-name.css +++ /dev/null @@ -1,7 +0,0 @@ -.test -{ - -webkit-transition: -webkit-transform .6s; - transition: transform .6s; - -webkit-transform: scale(.6, .6); - transform: scale(.6, .6); -} diff --git a/test/options/vendor-prefix-align/process/css/same-name.expected.css b/test/options/vendor-prefix-align/process/css/same-name.expected.css deleted file mode 100644 index 90598073..00000000 --- a/test/options/vendor-prefix-align/process/css/same-name.expected.css +++ /dev/null @@ -1,7 +0,0 @@ -.test -{ - -webkit-transition: -webkit-transform .6s; - transition: transform .6s; - -webkit-transform: scale(.6, .6); - transform: scale(.6, .6); -} diff --git a/test/options/vendor-prefix-align/process/css/value-align.css b/test/options/vendor-prefix-align/process/css/value-align.css deleted file mode 100644 index f15a3620..00000000 --- a/test/options/vendor-prefix-align/process/css/value-align.css +++ /dev/null @@ -1,10 +0,0 @@ -b -{ - color: #fff; - - background: -webkit-linear-gradient(linear, left top, right top, color-stop(0,rgba(255,255,255,0)), color-stop(20%, #fff)); - background: -moz-linear-gradient(left, rgba(255,255,255,0) 0, #fff 20%); - background: -o-linear-gradient(left, rgba(255,255,255,0) 0, #fff 20%); - background: -ms-linear-gradient(left, rgba(255,255,255,0) 0, #fff 20%); - background: linear-gradient(to right, rgba(255,255,255,0) 0, #fff 20%); -} diff --git a/test/options/vendor-prefix-align/process/css/value-align.expected.css b/test/options/vendor-prefix-align/process/css/value-align.expected.css deleted file mode 100644 index 60aba2ee..00000000 --- a/test/options/vendor-prefix-align/process/css/value-align.expected.css +++ /dev/null @@ -1,10 +0,0 @@ -b -{ - color: #fff; - - background: -webkit-linear-gradient(linear, left top, right top, color-stop(0,rgba(255,255,255,0)), color-stop(20%, #fff)); - background: -moz-linear-gradient(left, rgba(255,255,255,0) 0, #fff 20%); - background: -o-linear-gradient(left, rgba(255,255,255,0) 0, #fff 20%); - background: -ms-linear-gradient(left, rgba(255,255,255,0) 0, #fff 20%); - background: linear-gradient(to right, rgba(255,255,255,0) 0, #fff 20%); -} diff --git a/test/options/vendor-prefix-align/process/css/with-comment-property-2.css b/test/options/vendor-prefix-align/process/css/with-comment-property-2.css deleted file mode 100644 index 113d3342..00000000 --- a/test/options/vendor-prefix-align/process/css/with-comment-property-2.css +++ /dev/null @@ -1,3 +0,0 @@ -a -{ - top: 0;/* ololo */margin: 0;} diff --git a/test/options/vendor-prefix-align/process/css/with-comment-property-2.expected.css b/test/options/vendor-prefix-align/process/css/with-comment-property-2.expected.css deleted file mode 100644 index 113d3342..00000000 --- a/test/options/vendor-prefix-align/process/css/with-comment-property-2.expected.css +++ /dev/null @@ -1,3 +0,0 @@ -a -{ - top: 0;/* ololo */margin: 0;} diff --git a/test/options/vendor-prefix-align/process/css/with-comment-property.css b/test/options/vendor-prefix-align/process/css/with-comment-property.css deleted file mode 100644 index 9e3bea36..00000000 --- a/test/options/vendor-prefix-align/process/css/with-comment-property.css +++ /dev/null @@ -1,5 +0,0 @@ -body -{ - -webkit-transition: transform 150ms linear; - /* comment */ transition: transform 150ms linear; -} diff --git a/test/options/vendor-prefix-align/process/css/with-comment-property.expected.css b/test/options/vendor-prefix-align/process/css/with-comment-property.expected.css deleted file mode 100644 index b65b2105..00000000 --- a/test/options/vendor-prefix-align/process/css/with-comment-property.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -body -{ - -webkit-transition: transform 150ms linear; - /* comment */ transition: transform 150ms linear; -} diff --git a/test/options/vendor-prefix-align/process/css/with-comment.css b/test/options/vendor-prefix-align/process/css/with-comment.css deleted file mode 100644 index f792a8cc..00000000 --- a/test/options/vendor-prefix-align/process/css/with-comment.css +++ /dev/null @@ -1,5 +0,0 @@ -body -{ - background: -webkit-linear-gradient(nani); - background: /* comment */ -moz-linear-gradient(nani); -} diff --git a/test/options/vendor-prefix-align/process/css/with-comment.expected.css b/test/options/vendor-prefix-align/process/css/with-comment.expected.css deleted file mode 100644 index 9d5d161c..00000000 --- a/test/options/vendor-prefix-align/process/css/with-comment.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -body -{ - background: -webkit-linear-gradient(nani); - background: /* comment */ -moz-linear-gradient(nani); -} diff --git a/test/options/vendor-prefix-align/process/css/without-space.css b/test/options/vendor-prefix-align/process/css/without-space.css deleted file mode 100644 index 09bd955f..00000000 --- a/test/options/vendor-prefix-align/process/css/without-space.css +++ /dev/null @@ -1,5 +0,0 @@ -body -{ - background:-webkit-linear-gradient(nani); - background:-moz-linear-gradient(nani); -} diff --git a/test/options/vendor-prefix-align/process/css/without-space.expected.css b/test/options/vendor-prefix-align/process/css/without-space.expected.css deleted file mode 100644 index 1be53893..00000000 --- a/test/options/vendor-prefix-align/process/css/without-space.expected.css +++ /dev/null @@ -1,5 +0,0 @@ -body -{ - background:-webkit-linear-gradient(nani); - background: -moz-linear-gradient(nani); -} diff --git a/test/options/vendor-prefix-align/process/sass/property.sass b/test/options/vendor-prefix-align/process/sass/property.sass deleted file mode 100644 index b488c7a2..00000000 --- a/test/options/vendor-prefix-align/process/sass/property.sass +++ /dev/null @@ -1,4 +0,0 @@ -a - -webkit-color: panda - color: panda - -moz-color: panda diff --git a/test/options/vendor-prefix-align/process/sass/value.expected.sass b/test/options/vendor-prefix-align/process/sass/value.expected.sass deleted file mode 100644 index 4df59dad..00000000 --- a/test/options/vendor-prefix-align/process/sass/value.expected.sass +++ /dev/null @@ -1,4 +0,0 @@ -a - color: panda - color: -webkit-panda - color: -moz-panda diff --git a/test/options/vendor-prefix-align/process/sass/value.sass b/test/options/vendor-prefix-align/process/sass/value.sass deleted file mode 100644 index e3cff569..00000000 --- a/test/options/vendor-prefix-align/process/sass/value.sass +++ /dev/null @@ -1,4 +0,0 @@ -a - color: panda - color: -webkit-panda - color: -moz-panda diff --git a/test/options/vendor-prefix-align/process/test.js b/test/options/vendor-prefix-align/process/test.js deleted file mode 100644 index 1b4d70ac..00000000 --- a/test/options/vendor-prefix-align/process/test.js +++ /dev/null @@ -1,95 +0,0 @@ -let Test = require('../../option_test'); - -describe('Option `vendor-prefix-align`, process', function() { - describe('css', function() { - it('Should correctly work when there is comment before property name', function() { - let test = new Test(this, {'vendor-prefix-align': true}); - return test.shouldBeEqual('with-comment-property.css', 'with-comment-property.expected.css'); - }); - - it('Should correctly work when there is comment before property name. Test 2', function() { - let test = new Test(this, {'vendor-prefix-align': true}); - return test.shouldBeEqual('with-comment-property-2.css', 'with-comment-property-2.expected.css'); - }); - - it('Should correctly work when there is comment before property name. Test 3', function() { - let test = new Test(this, {'vendor-prefix-align': true}); - return test.shouldBeEqual('multiline-comments.css', 'multiline-comments.expected.css'); - }); - - it('Should correctly align prefixes in properties', function() { - let test = new Test(this, {'vendor-prefix-align': true}); - return test.shouldBeEqual('property-align.css', 'property-align.expected.css'); - }); - - it('Should correctly align prefixes in values', function() { - let test = new Test(this, {'vendor-prefix-align': true}); - return test.shouldBeEqual('value-align.css', 'value-align.expected.css'); - }); - - it('Should not touch already align prefixes', function() { - let test = new Test(this, {'vendor-prefix-align': true}); - return test.shouldBeEqual('already-aligned.css', 'already-aligned.expected.css'); - }); - - it('Should correctly align prefixes in properties and values at the same time', function() { - let test = new Test(this, {'vendor-prefix-align': true}); - return test.shouldBeEqual('both.css', 'both.expected.css'); - }); - - it('Should correctly work when value and property names are the same', function() { - let test = new Test(this, {'vendor-prefix-align': true}); - return test.shouldBeEqual('same-name.css', 'same-name.expected.css'); - }); - - it('Should correctly work when there is no whitespace after colon', function() { - let test = new Test(this, {'vendor-prefix-align': true}); - return test.shouldBeEqual('without-space.css', 'without-space.expected.css'); - }); - - it('Should correctly work when there is comment after colon', function() { - let test = new Test(this, {'vendor-prefix-align': true}); - return test.shouldBeEqual('with-comment.css', 'with-comment.expected.css'); - }); - - it('Should not do anything with oneliners', function() { - let test = new Test(this, {'vendor-prefix-align': true}); - return test.shouldBeEqual('one-line.css', 'one-line.expected.css'); - }); - - it('Should not do anything with oneliners. Test 2', function() { - let test = new Test(this, {'vendor-prefix-align': true}); - return test.shouldBeEqual('one-line-2.css', 'one-line-2.expected.css'); - }); - - it('Should always correctly align prefixes', function() { - let test = new Test(this, {'vendor-prefix-align': true}); - return test.shouldBeEqual('complex.css', 'complex.expected.css'); - }); - - it('Issue 193: should handle declarations without preceding spaces', function() { - let test = new Test(this, {'vendor-prefix-align': true}); - return test.shouldBeEqual('issue-193.css', 'issue-193.expected.css'); - }); - - it('Issue 241: should not break tabs', function() { - let test = new Test(this, { - 'block-indent': '\t', - 'vendor-prefix-align': true - }); - return test.shouldBeEqual('issue-241.css', 'issue-241.expected.css'); - }); - }); - - describe('sass', function() { - it('Should align prexied values', function() { - let test = new Test(this, {'vendor-prefix-align': true}); - return test.shouldBeEqual('value.sass', 'value.expected.sass'); - }); - - it('Should not align prefixed property names', function() { - let test = new Test(this, {'vendor-prefix-align': true}); - return test.shouldBeEqual('property.sass'); - }); - }); -});