Skip to content

Commit

Permalink
Disabled 'no default exports' rule for Storybook files and Stimulus c…
Browse files Browse the repository at this point in the history
…ontrollers (forem#13032)
  • Loading branch information
nickytonline authored Mar 18, 2021
1 parent a7056ab commit f222497
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 8 deletions.
8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,12 @@ module.exports = {
},
],
},
overrides: [
{
files: ['**/*.stories.jsx', 'app/javascript/admin/controllers/*.js'],
rules: {
'no-restricted-syntax': 'off',
},
},
],
};
1 change: 0 additions & 1 deletion app/javascript/admin/controllers/ahoy_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ ahoy.configure({
trackVisits: false,
});

// eslint-disable-next-line no-restricted-syntax
export default class AhoyController extends Controller {
trackOverviewLink(event) {
event.preventDefault();
Expand Down
1 change: 0 additions & 1 deletion app/javascript/admin/controllers/article_controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Controller } from 'stimulus';

// eslint-disable-next-line no-restricted-syntax
export default class ArticleController extends Controller {
static classes = ['bgHighlighted', 'borderHighlighted'];
static targets = ['featuredNumber', 'cardBody'];
Expand Down
1 change: 0 additions & 1 deletion app/javascript/admin/controllers/buffer_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const CONFIRM_BADGE_HTML =
const DISMISS_BADGE_HTML =
'<span class="ml-2 badge badge-danger">Dismiss</span>';

// eslint-disable-next-line no-restricted-syntax
export default class BufferController extends Controller {
static classes = ['bgHighlighted', 'borderHighlighted'];
static targets = ['header', 'bodyText'];
Expand Down
1 change: 0 additions & 1 deletion app/javascript/admin/controllers/config_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const emailAuthModalBody = `
<p>However, people who have already created an account using their email address can continue to login.</p>
<p><strong>You must confirm and update site config to save below this action.</strong></p>`;

// eslint-disable-next-line no-restricted-syntax
export default class ConfigController extends Controller {
static targets = [
'authenticationProviders',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Controller } from 'stimulus';

// eslint-disable-next-line no-restricted-syntax
export default class DataUpdateScriptController extends Controller {
forceRun(event) {
event.preventDefault();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Controller } from 'stimulus';

// eslint-disable-next-line no-restricted-syntax
export default class ImageUploadController extends Controller {
static targets = ['fileField', 'imageResult'];
static values = { url: String };
Expand Down
1 change: 0 additions & 1 deletion app/javascript/admin/controllers/modal_controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Controller } from 'stimulus';

// eslint-disable-next-line no-restricted-syntax
export default class ModalController extends Controller {
static values = {
rootSelector: String,
Expand Down
1 change: 0 additions & 1 deletion app/javascript/admin/controllers/reaction_controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Controller } from 'stimulus';

// eslint-disable-next-line no-restricted-syntax
export default class ReactionController extends Controller {
static targets = ['invalid', 'confirmed'];
static values = {
Expand Down

0 comments on commit f222497

Please sign in to comment.