You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stylelint currently doesn't work with pathname contains square brackets '[]'
these commends won't work:
> touch '[abcd].js'
> stylelint '[abcd].js'
Error: No files matching the pattern "[abcd].js" were found.
at /Users/tzhang/workspace/appannie/aa-react/node_modules/stylelint/lib/standalone.js:212:12
at processTicksAndRejections (internal/process/task_queues.js:93:5)
> stylelint '\[abcd\].js'
Error: No files matching the pattern "\[abcd\].js" were found.
at /Users/tzhang/workspace/appannie/aa-react/node_modules/stylelint/lib/standalone.js:212:12
at processTicksAndRejections (internal/process/task_queues.js:93:5)
The reason we're using [] in paths is next.js decides to use those characters for dynamic routing. Various tools are broken because of this. While most of them can be fixed by quote or escape the path, stylelint just doesn't work no matter how the input paths are escaped, so need to be fixed in the package directly.
stylelint
currently doesn't work with pathname contains square brackets '[]'these commends won't work:
The reason we're using
[]
in paths isnext.js
decides to use those characters for dynamic routing. Various tools are broken because of this. While most of them can be fixed by quote or escape the path,stylelint
just doesn't work no matter how the input paths are escaped, so need to be fixed in the package directly.Related discisson: lint-staged/lint-staged#676
12.0.0
CLI command ran by
lint-staged
can check files with
[]
chars in their path.The text was updated successfully, but these errors were encountered: