-
-
Notifications
You must be signed in to change notification settings - Fork 47
Only fails on modified files #84
Comments
Interesting. I tried replicating this by generating a new app and writing a rule that would cause How are you implementing your own rules on top of those generated in |
I've implemented a few rules in a plugin that you can fine here. This is my current configuration: module.exports = {
extends: './node_modules/ember-cli-eslint/coding-standard/ember-application.js',
plugins: [
'ember-suave'
],
rules: {
// 'prefer-const': ['error'],
// Ember Suave rules
// https://github.com/alexlafroscia/eslint-plugin-ember-suave
'ember-suave/no-const-outside-module-scope': ['error'],
'ember-suave/no-direct-property-access': ['error'],
'ember-suave/require-access-in-comments': ['error'],
'ember-suave/require-const-for-ember-properties': ['error']
}
}; If I run If I update the config to look like this: module.exports = {
extends: './node_modules/ember-cli-eslint/coding-standard/ember-application.js',
plugins: [
'ember-suave'
],
rules: {
'prefer-const': ['error'],
// Ember Suave rules
// https://github.com/alexlafroscia/eslint-plugin-ember-suave
'ember-suave/no-const-outside-module-scope': ['error'],
'ember-suave/no-direct-property-access': ['error'],
'ember-suave/require-access-in-comments': ['error'],
'ember-suave/require-const-for-ember-properties': ['error']
}
}; I now get one failing with Interesting, the Also, if I disable the // foo
import Ember from 'ember';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
let App;
Ember.MODEL_FACTORY_INJECTIONS = true;
App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
});
loadInitializers(App, config.modulePrefix);
export default App; now |
I'm trying to reproduce in a new repo, but am having trouble. I'm going to play with it and see if I can pin down what exact steps cause it to have the above behavior. |
Ehh... I've tried reproducing it by re-tracing my steps but just can't get it to have the same problem on a fresh repo, even though this particular app is still seeing the same problem. If I ever figure it out, I'll make sure to note the fix here but in the mean time don't want to waste anyone's time. |
Hi @alexlafroscia, I just encountered the same issue in my project. I wrote eslint plugin some time ago (https://github.com/netguru/eslint-plugin-netguru-ember) with rules according to our ember styleguide. I was using it without problems so far, but today I had problem with one rule, that was not passing, so I updated this plugin and released new version - which has the rule fixed. After updating package in project eslint still shows the same error, however if I change anything in my component's file everything passes.. Looks definitely like a caching issue - the rules code isn't even executed when file not changed. Do you know already how could I clean this cache? Thanks in advice! :) |
Now that I understand the Broccoli process a little bit more, I can probably provide a little more context. There's a cache used at the Broccoli level that makes sure that a file is not linted again if it hasn't changed. However, this caching does not take configuration changes into account, which should invalidate the entire cache. This is an optimization that should be implemented at the This cache, AFAIK, is persisted into a directory within |
Yeah, I just started digging in their repo, there is an option |
I'm seeing some pretty weird behavior, and I'm not sure where in the pipeline the issue is.
I've been working on porting Ember Suave's rules over to ESLint, and so have installed
ember-cli-eslint
on a fresh Ember app as well as my ESLint plugin. After runningember test
it shows that all of the tests, even when the tests should fail.If I go into one of the files that should fail,
app/app.js
for example, and modify it in any way, the test now fails the way I expect it to. It's like the passing test is being cached for some reason. I've trying nuking thedist
andtmp
directories, but that didn't help at all. Is there somewhere else where these results might be cached?I do know that ESLint can cache results which sounds like the behavior that I'm experiencing, but I can't find a
.eslintcache
directory anywhere.The text was updated successfully, but these errors were encountered: