eslint - move import/first & fix

- import/first is useful in tests when we need to set up globals before importing (jquery)
pull/8733/head^2
LB Johnston 2022-06-23 21:21:33 +10:00 zatwierdzone przez Matt Westcott
rodzic 6fd77175aa
commit 6995ba4aee
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -4,7 +4,6 @@ const legacyCode = {
'class-methods-use-this': 'off',
'constructor-super': 'off',
'default-param-last': 'off',
'import/first': 'off',
'import/no-cycle': 'off',
'import/no-extraneous-dependencies': 'off',
'jsx-a11y/alt-text': 'off',
@ -119,6 +118,7 @@ module.exports = {
rules: {
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-var-requires': 'off',
'import/first': 'off',
'import/no-extraneous-dependencies': 'off',
'react/function-component-definition': 'off',
'react/jsx-props-no-spreading': 'off',

Wyświetl plik

@ -1,9 +1,9 @@
import { cleanForSlug } from './cleanForSlug';
// eslint-disable-next-line no-unused-expressions
require('../../../wagtail/admin/static_src/wagtailadmin/js/vendor/urlify')
.default;
import { cleanForSlug } from './cleanForSlug';
describe('page-editor tests', () => {
describe('cleanForSlug without unicode slugs enabled', () => {
beforeEach(() => {