stylelint: Error: No rules found within configuration
> zen-audio-player@1.1.0 stylelint:css /home/agauniyal/projects/zen-audio-player.github.io
> stylelint css/*.css
Error: No rules found within configuration
at exports.default (/home/agauniyal/projects/zen-audio-player.github.io/node_modules/stylelint/dist/utils/configurationError.js:8:13)
at /home/agauniyal/projects/zen-audio-player.github.io/node_modules/stylelint/dist/postcssPlugin.js:69:45
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'stylelint:css' ]
2 info using npm@3.5.2
3 info using node@v5.3.0
4 verbose run-script [ 'prestylelint:css', 'stylelint:css', 'poststylelint:css' ]
5 info lifecycle zen-audio-player@1.1.0~prestylelint:css: zen-audio-player@1.1.0
6 silly lifecycle zen-audio-player@1.1.0~prestylelint:css: no script for prestylelint:css, continuing
7 info lifecycle zen-audio-player@1.1.0~stylelint:css: zen-audio-player@1.1.0
8 verbose lifecycle zen-audio-player@1.1.0~stylelint:css: unsafe-perm in lifecycle true
9 verbose lifecycle zen-audio-player@1.1.0~stylelint:css: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/agauniyal/projects/zen-audio-player.github.io/node_modules/.bin:/home/agauniyal/.npm-global/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
10 verbose lifecycle zen-audio-player@1.1.0~stylelint:css: CWD: /home/agauniyal/projects/zen-audio-player.github.io
11 silly lifecycle zen-audio-player@1.1.0~stylelint:css: Args: [ '-c', 'stylelint css/*.css' ]
12 silly lifecycle zen-audio-player@1.1.0~stylelint:css: Returned: code: 78 signal: null
13 info lifecycle zen-audio-player@1.1.0~stylelint:css: Failed to exec stylelint:css script
14 verbose stack Error: zen-audio-player@1.1.0 stylelint:css: `stylelint css/*.css`
14 verbose stack Exit status 78
14 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at EventEmitter.emit (events.js:172:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at ChildProcess.emit (events.js:172:7)
14 verbose stack at maybeClose (internal/child_process.js:818:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid zen-audio-player@1.1.0
16 verbose cwd /home/agauniyal/projects/zen-audio-player.github.io
17 error Linux 4.3.3-2-ARCH
18 error argv "/usr/bin/node" "/usr/bin/npm" "run" "stylelint:css"
19 error node v5.3.0
20 error npm v3.5.2
21 error code ELIFECYCLE
22 error zen-audio-player@1.1.0 stylelint:css: `stylelint css/*.css`
22 error Exit status 78
23 error Failed at the zen-audio-player@1.1.0 stylelint:css script 'stylelint css/*.css'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the zen-audio-player package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error stylelint css/*.css
23 error You can get information on how to open an issue for this project with:
23 error npm bugs zen-audio-player
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls zen-audio-player
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
csslint package works well with same arguments - csslint css/*.css so it’s definitely not related to directory issue. Here’s my rc file :
{
"at-rule-empty-line-before": "always",
"at-rule-no-vendor-prefix": true,
"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always-multi-line",
"block-closing-brace-space-after": "always-single-line",
"block-closing-brace-space-before": "always",
"block-no-empty": true,
"block-opening-brace-newline-after": "always-multi-line",
"block-opening-brace-newline-before": "always-multi-line",
"block-opening-brace-space-after": "always",
"block-opening-brace-space-before": "always",
"color-hex-case": "lower",
"color-hex-length": "long",
"color-no-hex": false,
"color-no-invalid-hex": true,
"color-no-named": true,
"comment-empty-line-before": "always",
"comment-whitespace-inside": "always",
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-block-no-single-line": false,
"declaration-block-semicolon-newline-after": "always",
"declaration-block-semicolon-newline-before": "never-multi-line",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-space-before": "never-single-line",
"declaration-block-single-line-max-declarations": 1,
"declaration-colon-newline-after": "always-multi-line",
"declaration-colon-space-after": "always",
"declaration-colon-space-before": "never",
"declaration-no-important": true,
"function-calc-no-unspaced-operator": true,
"function-comma-newline-after": "never-multi-line",
"function-comma-newline-before": "never-multi-line",
"function-comma-space-after": "always-single-line",
"function-comma-space-before": "never",
"function-linear-gradient-no-nonstandard-direction": true,
"function-parentheses-newline-inside": "always-multi-line",
"function-parentheses-space-inside": "never",
"function-url-quotes": "double",
"function-whitespace-after": "always",
"indentation": 4,
"max-empty-lines": 2,
"max-line-length": 80,
"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-name-no-vendor-prefix": true,
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",
"media-query-list-comma-newline-after": "always-multi-line",
"media-query-list-comma-newline-before": "never-multi-line",
"media-query-list-comma-space-after": "always-single-line",
"media-query-list-comma-space-before": "never",
"media-query-parentheses-space-inside": "always",
"no-eol-whitespace": true,
"no-missing-eof-newline": true,
"number-leading-zero": "always",
"number-max-precision": 2,
"number-no-trailing-zeros": true,
"number-zero-length-no-unit": true,
"property-no-vendor-prefix": true,
"rule-nested-empty-line-before": "always-multi-line",
"rule-no-duplicate-properties": true,
"rule-no-shorthand-property-overrides": true,
"rule-non-nested-empty-line-before": "always",
"rule-trailing-semicolon": "always",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-list-comma-newline-after": "always-multi-line",
"selector-list-comma-newline-before": "never-multi-line",
"selector-list-comma-space-after": "always",
"selector-list-comma-space-before": "never",
"selector-no-id": false,
"selector-no-type": false,
"selector-no-universal": true,
"selector-no-vendor-prefix": true,
"selector-pseudo-element-colon-notation": "double",
"selector-root-no-composition": true,
"string-quotes": "double",
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-newline-before": "never-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
"value-no-vendor-prefix": true
}
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 15 (6 by maintainers)
Ha, it was staring us in the face all along… I just had to start working through the issue to see it.
You’re missing the
"rules"key within your config. Your config should read:Thanks for your detailed reports btw. And sorry for not seeing the obvious from the very beginning.
FYI, the
"rules"key is needed as there are other keys in the config e.g.@davidtheclark Perhaps we can expand the error message to
No rules found within configuration. Have you used the "rules" key?, or something similar?