Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves #72 switch from eslint-plugin-node to eslint-plugin-n #75

Merged
merged 3 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ module.exports = {
],
rules: {
'canonical/filename-match-regex': 0,
'node/global-require': 0,
'n/global-require': 0,
},
};
127 changes: 46 additions & 81 deletions COMPARISON_TABLE.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion compare/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"rules": {
"node/global-require": 0,
"n/global-require": 0,
"import/no-dynamic-require": 0
}
}
10 changes: 5 additions & 5 deletions compare/compare.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable complexity */
/* eslint-disable no-console */

const { readFileSync, writeFileSync } = require('node:fs');
const { writeFile, readFile } = require('node:fs/promises');
const { resolve } = require('node:path');
const stringify = require('safe-stable-stringify');
const {
Expand Down Expand Up @@ -219,17 +219,17 @@ const createIncompatibleRuleSummary = (

const README_PATH = resolve(__dirname, '../COMPARISON_TABLE.md');

writeFileSync(
await writeFile(
README_PATH,
readFileSync(README_PATH, 'utf8').replace(
(await readFile(README_PATH, 'utf8')).replace(
/<!-- START compare -->[\s\S]+<!-- END compare -->/u,
markdownLines.join('\n'),
),
);

writeFileSync(
await writeFile(
README_PATH,
readFileSync(README_PATH, 'utf8').replace(
(await readFile(README_PATH, 'utf8')).replace(
/<!-- START incompatibleRules -->[\s\S]+<!-- END incompatibleRules -->/u,
'<!-- START incompatibleRules -->\n' +
[
Expand Down
Loading