Skip to content
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
11 changes: 0 additions & 11 deletions .jshintrc

This file was deleted.

71 changes: 71 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* Copyright (c) 2015-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
*/

// ESLint 9+ flat config
const globals = require("globals");

module.exports = [
{
// Base configuration for all JS files
files: ["**/*.js"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "commonjs", // Node.js uses CommonJS
globals: {
...globals.commonjs,
...globals.node,
...globals.browser, // Add browser globals like setTimeout
structuredClone: "readonly",
// Legacy globals from old config
Atomics: "readonly",
SharedArrayBuffer: "readonly"
}
},
rules: {
// Spacing and formatting
"indent": "off", // TODO: Fix indentation in separate PR
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always"],

// Modern best practices
"eqeqeq": "error",
"curly": ["error", "all"], // Require braces for all control structures
"no-unused-vars": "error",
"no-undef": "error",

// Spacing rules (disabled for initial setup - TODO: Fix in separate PR)
"arrow-spacing": "off",
"space-before-blocks": "off",
"space-before-function-paren": "off",
"space-in-parens": "off",
"object-curly-spacing": "off",
"keyword-spacing": "off",
"comma-spacing": "off",
"key-spacing": "off",
"space-infix-ops": "off",

// Style rules (disabled for initial setup - TODO: Fix in separate PR)
"array-bracket-spacing": "off",
"block-spacing": "off",
"brace-style": "off",
"func-call-spacing": "off",
"no-trailing-spaces": "off",

// Disable console errors for this project
"no-console": "off",

// Bracket notation preference
"dot-notation": "error"
}
},
{
// Ignore patterns
ignores: [
"**/data/*.js",
"node_modules/**",
"coverage/**"
]
}
];
9 changes: 5 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
const path = require('path');
const gulp = require('gulp');
const jshint = require('gulp-jshint');
const eslint = require('gulp-eslint-new');
const mocha = require('gulp-mocha');
const jsdoc = require('gulp-jsdoc3');

Expand All @@ -17,9 +17,10 @@ const basicloader = require('./lib/basic-loader.js');
const streamToArray = require("stream-to-array");

function lint() {
return gulp.src('lib/*')
.pipe(jshint({lookup:true}))
.pipe(jshint.reporter('default'));
return gulp.src('lib/*.js')
.pipe(eslint({ overrideConfigFile: 'eslint.config.js' }))
.pipe(eslint.format())
.pipe(eslint.failAfterError());
}

function test() {
Expand Down
Loading