Skip to content

Commit

Permalink
chore: fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Jul 9, 2022
1 parent bca36d2 commit 32fcb9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
{
"files": "test/*.js",
"rules": {
"no-magic-numbers": "off"
"no-magic-numbers": "off",
"unicorn/prefer-top-level-await": "off"
}
}
]
Expand Down
10 changes: 4 additions & 6 deletions test/prettier.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
// Requirements
// ------------------------------------------------------------------------------

const assert = require('assert');
const fs = require('fs');
const path = require('path');
const assert = require('node:assert');
const fs = require('node:fs');
const path = require('node:path');

const { ESLint, RuleTester } = require('eslint');

Expand Down Expand Up @@ -314,9 +314,7 @@ runFixture('eslint-plugin-svelte3/*.svelte', [[], []]);
function loadInvalidFixture(name) {
const filename = path.join(__dirname, 'invalid', name + '.txt');
const src = fs.readFileSync(filename, 'utf8');
const sections = src
.split(/^[A-Z]+:\n/m)
.map(x => x.replace(/(?=\n)\n$/, ''));
const sections = src.split(/^[A-Z]+:\n/m).map(x => x.replace(/\n$/, ''));
const item = {
code: sections[1],
output: sections[2],
Expand Down

0 comments on commit 32fcb9f

Please sign in to comment.