Skip to content

Commit

Permalink
bump eslint and related packages
Browse files Browse the repository at this point in the history
  • Loading branch information
rnegron committed Dec 3, 2024
1 parent 6612ca0 commit 4aca06f
Show file tree
Hide file tree
Showing 8 changed files with 273 additions and 210 deletions.
34 changes: 0 additions & 34 deletions .eslintrc

This file was deleted.

61 changes: 61 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
const mocha = require("eslint-plugin-mocha");
const globals = require("globals");
const js = require("@eslint/js");

const {
FlatCompat,
} = require("@eslint/eslintrc");

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

module.exports = [{
ignores: [
"packages/cli/scaffold/*.js",
"packages/cli/src/generators/templates/**/*.template.js",
"**/.yarn",
],
}, ...compat.extends("eslint:recommended", "standard", "prettier"), {
plugins: {
mocha,
},

languageOptions: {
globals: {
...globals.node,
},
},
}, {
files: [
"packages/*/test/**/*.js",
"packages/*/smoke-test/**/*.js",
"packages/*/integration-test/**/*.js",
"packages/cli/src/tests/**/*.js",
"packages/cli/src/smoke-tests/**/*.js",
],

languageOptions: {
globals: {
...globals.mocha,
},
},

rules: {
"mocha/no-exclusive-tests": "error",
},
}, {
files: ["packages/cli/snippets/**/*.js"],

languageOptions: {
globals: {
...globals.mocha,
},
},

rules: {
"no-unused-vars": 0,
},
}];
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@
"name": "root",
"private": true,
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.16.0",
"chalk": "^4.1.1",
"cross-env": "^7.0.3",
"eslint": "^8.32.0",
"eslint-config-prettier": "^8.6.0",
"eslint": "^9.16.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-n": "^15.6.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-standard": "^5.0.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-mocha": "^10.5.0",
"eslint-plugin-n": "^17.14.0",
"eslint-plugin-promise": "^7.2.1",
"globals": "^15.13.0",
"husky": "^9.1.7",
"inquirer": "^8.0.0",
"lerna": "^8.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"/oclif.manifest.json"
],
"engines": {
"node": ">=18"
"node": ">=18.18"
},
"scripts": {
"docs": "ZAPIER_BASE_ENDPOINT='' node scripts/docs.js",
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/tools/memory-checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const checkMemory = (event) => {
'Force killing process by Zapier for too many open file descriptors'
);

/* eslint no-process-exit: 0 */
process.exit(1);
} else {
throw err;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/moduleuserapp/export-func.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = (z, bundle) => {
return [{ id: 1234 }] || bundle;
return [{ id: 1234 }];
};
2 changes: 1 addition & 1 deletion packages/core/test/tools/callback-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('callbackwrapper', () => {
should.not.exist(input._zapier.event.callbackUsed);
});
it('should set the isUsed property', () => {
wrapper(); // eslint-disable-line no-unused-expressions
wrapper();
input._zapier.event.callbackUsed.should.eql(true);
});
});
Expand Down
Loading

0 comments on commit 4aca06f

Please sign in to comment.