New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stylelint error #317
Comments
@km-tr This gives very little to go on. Ideally, you should help us reproduce the error so that we can identify the issue. Could you please share your package.json? |
I'm sorry. I am investigating it because it does not reproduce in another repository. |
@sudo-suhas It is a reproduced repository↓ |
@km-tr What you are doing is slightly weird. What is happening is that due to the current configuration, stylelint gets passes the
Please read this section from the readme - https://github.com/okonet/lint-staged#what-commands-are-supported You can do any of the following to fix the issue: rm package.json script:
------------------------- assets/lint-staged.config.js -------------------------
index f6ada90..83ad00e 100644
@@ -1,9 +1,7 @@
-const { scripts } = require('./package.json');
-
module.exports = {
gitDir: "../",
verbose: true,
linters: {
- "**/assets/**/*.{css,scss}": [`${scripts.stylelint} --fix`, "git add"],
+ "**/assets/**/*.{css,scss}": ['stylelint -s scss --fix', "git add"],
},
-}
\ No newline at end of file
+}
----------------------------- assets/package.json -----------------------------
index c1bcb37..5234b12 100644
@@ -4,17 +4,12 @@
"description": "",
"main": "index.js",
"scripts": {
- "test": "lint-staged",
- "stylelint": "stylelint -s scss"
+ "test": "lint-staged"
},
"author": "kmtr <kumagai@bear.tokyo>",
"license": "MIT", rename package.json script:
------------------------- assets/lint-staged.config.js -------------------------
index f6ada90..cb79b2b 100644
@@ -1,9 +1,7 @@
-const { scripts } = require('./package.json');
-
module.exports = {
gitDir: "../",
verbose: true,
linters: {
- "**/assets/**/*.{css,scss}": [`${scripts.stylelint} --fix`, "git add"],
+ "**/assets/**/*.{css,scss}": ['lint:css --fix', "git add"],
},
-}
\ No newline at end of file
+}
----------------------------- assets/package.json -----------------------------
index c1bcb37..aa0a923 100644
@@ -5,16 +5,12 @@
"main": "index.js",
"scripts": {
"test": "lint-staged",
- "stylelint": "stylelint -s scss"
+ "lint:css": "stylelint -s scss"
},
"author": "kmtr <kumagai@bear.tokyo>",
"license": "MIT", |
If you have version 4.2.3 or higher, you will get an error when running stylelint
The text was updated successfully, but these errors were encountered: