Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sdk): Updates to eslint, and fixes from that #423

Merged
merged 12 commits into from
Feb 18, 2025
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
path: ./lib/opentdf-sdk-*.tgz
- name: SonarCloud Scan
if: fromJSON(env.do_sonarscan)
uses: SonarSource/sonarcloud-github-action@master
uses: SonarSource/sonarqube-scan-action@v5.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
9 changes: 0 additions & 9 deletions cli/.eslintrc.yaml

This file was deleted.

41 changes: 41 additions & 0 deletions cli/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import pluginChaiFriendly from "eslint-plugin-chai-friendly";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends("plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"), {
plugins: {
"chai-friendly": pluginChaiFriendly,
"@typescript-eslint": typescriptEslint,
},
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},

ecmaVersion: 5,
sourceType: "commonjs",

parserOptions: {
project: ["**/tsconfig.json"],
},

},
rules: {
// See https://www.npmjs.com/package/eslint-plugin-chai-friendly
"@typescript-eslint/no-unused-expressions": "off", // disable original rule
"chai-friendly/no-unused-expressions": "error"
},
}];
Loading
Loading