Skip to content

Commit

Permalink
Mise à jour des dépendances et ajout de la configuration ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
KillianG committed Nov 5, 2024
1 parent 201ceca commit de4a689
Show file tree
Hide file tree
Showing 4 changed files with 264 additions and 2,629 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: '1.23.0'
go-version: 1.23.0
cache-dependency-path: bucket-scanner/go.sum

- name: Install ginkgo
Expand Down
66 changes: 66 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import mocha from "eslint-plugin-mocha";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

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("scality"), {
plugins: {
mocha,
},

languageOptions: {
ecmaVersion: 2020,
sourceType: "script",
},

settings: {
"import/resolver": {
node: {
paths: ["/backbeat/node_modules", "node_modules"],
},
},
},

rules: {
"object-curly-newline": "off",
"import/newline-after-import": "off",
"import/order": "off",
"prefer-destructuring": "off",
"operator-linebreak": "off",
"no-underscore-dangle": "off",
indent: "off",
"function-paren-newline": "off",
"implicit-arrow-linebreak": "off",
"no-bitwise": "off",
"comma-dangle": "off",
"padded-blocks": "off",
"lines-around-directive": "off",
"global-require": "off",
"import/no-dynamic-require": "off",
"object-property-newline": "off",
"no-plusplus": "off",
"class-methods-use-this": "off",
"no-lonely-if": "off",
"no-else-return": "off",
"dot-location": "off",
"no-restricted-properties": "off",
"no-buffer-constructor": "off",
"no-restricted-globals": "off",
"no-useless-return": "off",
"no-multi-spaces": "off",
"space-unary-ops": "off",
"no-undef-init": "off",
"newline-per-chained-call": "off",
"no-useless-escape": "off",
"mocha/no-exclusive-tests": "error",
},
}];
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,15 @@
"node-rdkafka-prometheus/prom-client": "14.2.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.14.0",
"c8": "^10.1.2",
"eslint": "^9.13.0",
"eslint": "^9.14.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-scality": "scality/Guidelines#8.2.0",
"eslint-config-scality": "scality/Guidelines#8.3.0",
"eslint-plugin-import": "^2.14.0",
"lolex": "^6.0.0",
"mocha": "^10.8.1",
"mocha": "^10.8.2",
"nyc": "^17.1.0",
"sinon": "^19.0.2",
"zookeeper-mock": "^1.2.0"
Expand Down
Loading

0 comments on commit de4a689

Please sign in to comment.