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
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

9 changes: 0 additions & 9 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Remove `update-notifier` dependency. Re-implement locally. Refs STCLI-288.
* Use node-native glob functionality in `translate compile`. Refs STCLI-273.
* Bug fix: `app create` cleans up correct `.git` directory; tests correctly await slow git-clones. Refs STCLI-293.
* Migrate from `eslint` to `oxlint`. Refs STCLI-290.

## [5.0.0](https://github.com/folio-org/stripes-cli/tree/v5.0.0) (2026-04-15)
[Full Changelog](https://github.com/folio-org/stripes-cli/compare/v4.0.0...v5.0.0)
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function getContext(dir) {
try {
cwdPackageJson = context.require(`${ctx.cwd}/package.json`); // eslint-disable-line
ctx.isLocalCoreAvailable = Object.getOwnPropertyNames(cwdPackageJson.dependencies).findIndex(key => key.startsWith('@folio/stripes-core')) > -1;
} catch (e) {
} catch {
// no package.json in the current directory
}

Expand Down
2 changes: 1 addition & 1 deletion lib/okapi/permission-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = class PermissionService {
let packageJson;
try {
packageJson = require(`${this.context.cwd}/package.json`); // eslint-disable-line
} catch (e) {
} catch {
return false;
}
return packageJson;
Expand Down
2 changes: 1 addition & 1 deletion lib/platform/alias-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ module.exports = class AliasService {

try {
this.require.resolve(packageJsonPath);
} catch (error) {
} catch {
validationError = new AliasError(`No package.json found at ${packageJsonPath}`);
}

Expand Down
3 changes: 3 additions & 0 deletions oxfmt.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { defineFmtConfig, fmtConfig } from "@folio/eslint-config-stripes";
export default defineFmtConfig({ ...fmtConfig });

13 changes: 13 additions & 0 deletions oxlint.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineLintConfig, lintConfig } from "@folio/eslint-config-stripes";

export default defineLintConfig({
...lintConfig,
overrides: [
...(lintConfig.overrides ?? []),
{
// permit chai-style assertions, e.g. `expect(foo).to.be.true`
files: ["**/*.spec.js"],
rules: { "no-unused-expressions": "off" },
},
],
});
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"scripts": {
"test": "mocha --recursive",
"test:coverage": "nyc --reporter=lcov --reporter=text --report-dir ./artifacts/coverage mocha --recursive",
"lint": "eslint ./",
"lint-templates": "eslint ./resources --no-ignore",
"lint": "stripes-lint ./",
"docs": "node ./lib/doc/generator"
},
"dependencies": {
Expand Down Expand Up @@ -72,10 +71,9 @@
"yargs": "^17.3.1"
},
"devDependencies": {
"@folio/eslint-config-stripes": "^9.0.0",
"@folio/eslint-config-stripes": "^10.0.0",
"chai": "^4.1.2",
"colors": "1.4.0",
"eslint": "^7.32.0",
"sinon": "^15.0.4",
"sinon-chai": "^3.7.0"
}
Expand Down
1 change: 1 addition & 0 deletions test/cli/update-checker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ describe('update-checker', function () {
});
});

// eslint-disable-next-line jest/expect-expect -- resolving without throwing is the assertion
it('does not throw when the registry is unreachable', function () {
this.sandbox.stub(this.sut.config, 'get').withArgs('lastChecked').returns(0);
this.sandbox.stub(this.sut.config, 'set');
Expand Down
2 changes: 1 addition & 1 deletion test/commands/build.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const packageJsonStub = {};
const tenantConfig = {};

function StripesModuleParserStub(name) {
this.packageJson = Object.assign({}, packageJsonStub, { name });
this.packageJson = Object.assign({}, packageJsonStub, { name }); // eslint-disable-line react/no-this-in-sfc
}

const stripesCoreStub = {
Expand Down
2 changes: 1 addition & 1 deletion test/okapi/auth-service.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ describe('The auth-service', function () {
});


describe('retrieves tokens', async function () {
describe('retrieves tokens', function () {
it('token', async function () {
this.sut = new AuthService();
this.sandbox.stub(this.sut.tokenStorage, 'getToken').callsFake(() => true);
Expand Down
2 changes: 1 addition & 1 deletion test/okapi/descriptor-service.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const tenantConfig = {
};

function StripesModuleParserStub(name) {
this.packageJson = Object.assign({}, packageJsonStub, { name });
this.packageJson = Object.assign({}, packageJsonStub, { name }); // eslint-disable-line react/no-this-in-sfc
}

const stripesCoreStub = {
Expand Down
2 changes: 1 addition & 1 deletion test/okapi/okapi-client.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe('The okapi-client', function () {
let didError = false;
try {
await this.sut._exchangeToken(getStub);
} catch (e) {
} catch {
didError = true;
}
expect(didError).to.equal(false);
Expand Down
Loading
Loading