Skip to content

Commit

Permalink
feat: switch to eslint-plugin-n
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Nov 14, 2023
2 parents b632020 + ef2cb65 commit ca45625
Show file tree
Hide file tree
Showing 11 changed files with 260 additions and 392 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
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
@@ -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
@@ -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

0 comments on commit ca45625

Please sign in to comment.