dense-analysis / dense-analysis/ale

stylelint --fix fails

Open
#2,580 1 comment 2 reactions 0 assignees View on GitHub
bug
Dominant language
Vim Script
Stars
14k
Forks
1.5k
Avg merge
17h 49m
Merged PRs (30d)
1

Description

## Information

**VIM version**

```
NVIM v0.3.7
Build type: Release
LuaJIT 2.0.5
```

Operating System: Arch Linux.

## What went wrong

I have stylelint set as a fixer for scss, however it fails to run. This is the command that gets used, according to `:ALEInfo`:

```
(finished - exit code 78) ['/bin/bash', '-c', '''/data/proj/my-project/assets/node_modules/stylelint/bin/stylelint.js'' --fix ''/tmp/nvimMCfEGD/7/base.scss''']
```

The "exit code 78" part is an error that's specific to stylelint: https://github.com/stylelint/stylelint/blob/0fb8b6d561ca59830cb6d66addf588cfe6169ff1/lib/utils/configurationError.js

Here's the error message that it would write out to the tmp file:

```
Error: No configuration provided for /tmp/nvimMCfEGD/7/base.scss
at module.exports (/data/proj/my-project/assets/node_modules/stylelint/lib/utils/configurationError.js:8:28)
at searchForConfig.then.then.config (/data/proj/my-project/assets/node_modules/stylelint/lib/getConfigForFile.js:55:15)
```

Stylelint does work when used as a regular linter. It finds the configuration in `my-project/assets/.stylelintrc` and shows the warnings / errors from the current file. It's just the fixing functionality that is broken. Perhaps it's not able to find the configuration because it's looking in the directory of the temporary file?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.