5

flycheck-mode creates temporary files in the current directory. That is annoying. How can I disable/set the default place for these temporary files.

I use javascript eslint syntax checker for react jsx files.

  • 1
    You can't. Flycheck writes the file to that place on purpose and moving it away breaks certain features of eslint. – lunaryorn Jul 11 '15 at 17:13
  • By chance, is real problem that your js server is crashing because of the temp files? I had this issue with sails.js, the real problem needs to be solved by configuring which files your server checks for updates to not include the flycheck files. – Jordon Biondo Jul 11 '15 at 20:33
  • @JordonBiondo I use webpack or ember-cli, It conflicts with live reload feature. – eguneys Jul 12 '15 at 4:49
  • 1
    Somewhere in your project there will likely be a config file with patterns that specify which files to live reload, you can change that to exclude the flycheck files. I think for me it was a grunt task and I needed to change some globbing patterns on . – Jordon Biondo Jul 12 '15 at 13:03
2

TL;DR: Update to the latest Flycheck release to get rid temporary files entirely.


You cannot change the directory Flycheck writes its temporary files to. Flycheck tries hard to avoid writing to the current directory, and normally uses the system's temporary directory. But when it writes to the current directory it does so for a reason. In ESLint specifically that's because eslint uses the filename to locate its configuration files, and moving the file out of the source code tree broke user's eslint configuration.


However, since Flycheck 0.25.1 Flycheck passes buffer contents on standard input to most syntax checkers, including eslint. Flycheck creates no temporary files for these checkers anymore which should solve all issues with tools that watch the source code tree.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.