question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't disable a plugin

See original GitHub issue

If you create a plugin for ember-template-lint and then try to disable it, this won’t work, for the following reasons:

  1. if you disable only the rule that is associated with a plugin, the code here: https://github.com/rwjblue/ember-template-lint/blob/master/lib/rules/base.js#L72 will error out because plugins are not recognized as rules (only the rules that ship with ember-template-lint are recognized as rules.
  2. If you disable all rules, the plugin’s configuration does not seem to change in time for it to process the directive. I tried to log the events that were happening and their sequence, and this is what I found:
(output from the plugin, in its visitor() method, logging its config:)
this.config { min: 20, max: 100 }
-> rules/base.js, line 401 (https://github.com/rwjblue/ember-template-lint/blob/master/lib/rules/base.js#L401)
-> rules/base.js line 413 (https://github.com/rwjblue/ember-template-lint/blob/master/lib/rules/base.js#L401)
-> returning { tree: false, value: false }
-> rules/base.js line 337 (https://github.com/rwjblue/ember-template-lint/blob/master/lib/rules/base.js#L337)

/Users/psbanka/dev/copy-tango/app/pods/support/docs-search/template.hbs
  -:-  error  Template length of 12 is smaller than 20  length-validation

For some reason the pugins seem to be processed before instructions are processed and therefore their configs do not get updated.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
patocallaghancommented, May 15, 2019

I’ve added a WIP spike of a fix in https://github.com/ember-template-lint/ember-template-lint/pull/718. Would appreciate any feedback

1reaction
patocallaghancommented, May 8, 2019

@psbanka @rwjblue I just came across this issue today.

I’m keen to have this functionality soon-ish so unless there is a PR close to completion I’d like to take a stab at it. Would that be okay?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Deactivate plugin - WordPress.org
Deleting the directory would deactivate and delete the plugin from your site, taking the tdih_event post type with it. If you want to...
Read more >
How To Disable WordPress Plugins (No Access to WP-Admin)
Browse into the plugins folder; Find the folder for the plugin you want to deactivate; Right-click on the folder and rename it to...
Read more >
How to Deactivate All Plugins When Not Able to Access WP ...
You need to right-click the plugins folder and select 'Rename'. Next, change the name of the plugins folder to anything that you like....
Read more >
How to Disable/Deactivate WordPress Plugins (3 Methods)
1. How to Disable a WordPress Plugin from the Dashboard ... Disabling a WordPress plugin through your admin dashboard is the easiest and...
Read more >
How to manually deactivate WordPress plugins
1. Rename your plugin's folder via SFTP or SSH · 2. Deactivating all plugins from the WordPress database · 3. Deactivate Plugins Using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found