Skip to content

Commit

Permalink
Remove override of node/global-require rule for resources dir (#2970
Browse files Browse the repository at this point in the history
)
  • Loading branch information
IvanGoncharov committed Mar 13, 2021
1 parent f8155ac commit c581573
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion .eslintrc.yml
Expand Up @@ -688,7 +688,6 @@ overrides:
rules:
node/no-unpublished-require: off
node/no-sync: off
node/global-require: off
import/no-extraneous-dependencies: [error, { devDependencies: true }]
import/no-nodejs-modules: off
import/no-commonjs: off
Expand Down
5 changes: 4 additions & 1 deletion resources/build-npm.js
Expand Up @@ -55,7 +55,10 @@ function babelBuild(srcPath, options) {
}

function buildPackageJSON() {
const packageJSON = require('../package.json');
const packageJSON = JSON.parse(
fs.readFileSync(require.resolve('../package.json'), 'utf-8'),
);

delete packageJSON.private;
delete packageJSON.scripts;
delete packageJSON.devDependencies;
Expand Down
4 changes: 3 additions & 1 deletion resources/eslint-internal-rules/index.js
@@ -1,7 +1,9 @@
'use strict';

const noDirImport = require('./no-dir-import');

module.exports = {
rules: {
'no-dir-import': require('./no-dir-import'),
'no-dir-import': noDirImport,
},
};

0 comments on commit c581573

Please sign in to comment.