Disabled 'no default exports' rule for Storybook files and Stimulus controllers (#13032)

This commit is contained in:
Nick Taylor 2021-03-17 21:29:39 -04:00 committed by GitHub
parent a7056ab650
commit f222497913
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 8 additions and 8 deletions

View file

@ -23,4 +23,12 @@ module.exports = {
},
],
},
overrides: [
{
files: ['**/*.stories.jsx', 'app/javascript/admin/controllers/*.js'],
rules: {
'no-restricted-syntax': 'off',
},
},
],
};

View file

@ -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();

View file

@ -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'];

View file

@ -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'];

View file

@ -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',

View file

@ -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();

View file

@ -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 };

View file

@ -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,

View file

@ -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 = {