Skip to content
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

Ignore scsslint_tmp files in sass watch? #13

Closed
peterjmag opened this issue Apr 17, 2015 · 8 comments
Closed

Ignore scsslint_tmp files in sass watch? #13

peterjmag opened this issue Apr 17, 2015 · 8 comments

Comments

@peterjmag
Copy link

I currently get a bit of extra noise using this plugin while running sass --watch:

[exec] >>> Change detected to: styles/scss/testfile.scss
[exec] >>> Deleted template detected: styles/scss/testfile_scsslint_tmp5738996101794459734.scss
[exec]      delete /Users/peterjmag/checkouts/scss-lint-test/styles/testfile_scsslint_tmp5738996101794459734.css
[exec]      delete /Users/peterjmag/checkouts/scss-lint-test/styles/testfile_scsslint_tmp5738996101794459734.css.map
[exec]       write /Users/peterjmag/checkouts/scss-lint-test/styles/testfile.css
[exec]       write /Users/peterjmag/checkouts/scss-lint-test/styles/testfile.css.map
[exec] >>> Change detected to: styles/scss/testfile.scss

Unfortunately, sass doesn't appear to support explicitly ignoring files. Perhaps we can simply add an underscore before the baseName in ThreadLocalActualFile.java? Then theoretically the scsslint_tmp files would be ignored as a partial.

I would try this out myself, but I'm having trouble building the plugin locally at the moment. (Just problems with my environment, I believe.)

@JacobDorman
Copy link

Partials are still watched, just not compiled into their own separate css file. So this wouldn't fix the issue.

Is there a reason these need to be created in the working directory, rather than say the system temp dir?

If you use grunt you can just ignore the pattern !sass/**/*scsslint_tmp*.scss

@SpenceDiNicolantonio
Copy link

This has been a source of headache for me recently (juanfran/gulp-scss-lint#36). These temp files really should be stored elsewhere.

@siiron
Copy link

siiron commented Jan 10, 2016

Having the same issue here. The scsslint_tmp-files triggers my watch-task while editing my scss-files since they appear in my working directory instead of a different folder. It's a bit annoying. Since I use grunt, It still works to exclude them from the watch-task with something like !sass/**/*scsslint_tmp*.scss.

@bivainis
Copy link

I've just spent an hour trying to figure out why my webpack server was reloading like crazy on each keystroke in scss files. Well, now it appears it's just scss lint that creates a temp file, triggering the server to reload.

Here's a quick fix for gulp to ignore those files:

// Update your watch task to exclude any scss file that 
// has scsslint_tmp in the file name
gulp.watch('**/*.scss',
           '!**/*scsslint_tmp*.scss']);

@idok
Copy link
Owner

idok commented Mar 27, 2016

I've moved the temp files to a temp directory, this should resolve this issue

@AndyOGo
Copy link

AndyOGo commented Sep 16, 2016

I have this problem with PHPStorm (newest version) +Gulp and get these weird tmp files for my js files.
Yes .jsnot .scss...

It's horrible it creates those tmp files inside source dir, and scsslint for js files does not make any sense...

tasks/docs-scripts_scsslint_tmp1537225672253761620.js
tasks/scripts-bundle_scsslint_tmp4377624646903046346.js

@idok
Copy link
Owner

idok commented Sep 16, 2016

@AndyOGo
Which version of scss-lint-plugin do you have?
do you have other plugins enabled?
specifically something from this list
please disabled them and retry.

@AndyOGo
Copy link

AndyOGo commented Sep 16, 2016

@idok
I use eslint, but I have set it up to use my local eslint module specified within my package.json file

btw i created another issue with the file which creates those scsslint_tmp suffixed files:
#45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants