Skip to content

Commit

Permalink
chore:deduce eslint version
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanrajpac committed Jun 5, 2024
1 parent d6d8c16 commit d7894ef
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 204 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.cache
build
node_modules
vendor
!.*.js
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require( '@wordpress/prettier-config' );
module.exports = require('@wordpress/prettier-config');
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
"@wordpress/e2e-test-utils-playwright": "^1.0.0",
"@wordpress/env": "^10.0.0",
"@wordpress/eslint-plugin": "^19.0.0",
"@wordpress/scripts": "27.9.0",
"eslint": "^9.4.0",
"@wordpress/scripts": "27.8.0",
"eslint": "8.57.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-cypress": "^3.3.0",
"eslint-plugin-import": "^2.29.1",
Expand Down
4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ codebFeatureFlags.isEnabled = (flag: string) => {
}
);

if (isFlagExist) return true;

return false;
return !!isFlagExist;
};

export {};
4 changes: 3 additions & 1 deletion tests/e2e/helper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export async function deleteAllFlags(page: Page) {
.count();

if (count > 0) {
for (let i = 0; i < count; ++i) await deleteLastFlag(page);
for (let i = 0; i < count; ++i) {
await deleteLastFlag(page);
}
}
},
{ box: true }
Expand Down
8 changes: 6 additions & 2 deletions tests/performance/cli/results.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ if (beforeFile && !existsSync(beforeFile)) {
* @return {string} Formatted value.
*/
function formatTableValue(v) {
if (v === true || v === 'true') return '✅';
if (!v || v === 'false') return '';
if (v === true || v === 'true') {
return '✅';
}
if (!v || v === 'false') {
return '';
}
return v?.toString() || String(v);
}

Expand Down
Loading

0 comments on commit d7894ef

Please sign in to comment.