|
| 1 | +import path from "node:path"; |
| 2 | +import { fileURLToPath } from "node:url"; |
| 3 | +import js from "@eslint/js"; |
| 4 | +import { FlatCompat } from "@eslint/eslintrc"; |
| 5 | + |
| 6 | +const __filename = fileURLToPath(import.meta.url); |
| 7 | +const __dirname = path.dirname(__filename); |
| 8 | +const compat = new FlatCompat({ |
| 9 | + baseDirectory: __dirname, |
| 10 | + recommendedConfig: js.configs.recommended, |
| 11 | + allConfig: js.configs.all |
| 12 | +}); |
| 13 | + |
| 14 | +export default [...compat.extends('@scality/scality'), |
| 15 | + { |
| 16 | + languageOptions: { |
| 17 | + ecmaVersion: 2020, |
| 18 | + sourceType: "script", |
| 19 | + globals: { |
| 20 | + BigInt: "readonly", |
| 21 | + jest: "readonly", |
| 22 | + expect: "readonly", |
| 23 | + fail: "readonly", |
| 24 | + beforeAll: "readonly", |
| 25 | + afterAll: "readonly", |
| 26 | + }, |
| 27 | + }, |
| 28 | + rules: { |
| 29 | + "no-plusplus": 'off', |
| 30 | + "no-underscore-dangle": 'off', |
| 31 | + "no-restricted-syntax": 'off', |
| 32 | + "max-len": 'off', |
| 33 | + "import/no-extraneous-dependencies": 'off', |
| 34 | + "no-continue": 'off', |
| 35 | + "global-require": 'off', |
| 36 | + "no-prototype-builtins": 'off', |
| 37 | + "class-methods-use-this": 'off', |
| 38 | + "no-unused-vars": 'off', |
| 39 | + "no-lonely-if": 'off', |
| 40 | + "max-classes-per-file": 'off', |
| 41 | + "prefer-spread": 'off', |
| 42 | + "no-constructor-return": 'off', |
| 43 | + "new-cap": 'off', |
| 44 | + "no-redeclare":"off", |
| 45 | + } |
| 46 | + } |
| 47 | +]; |
0 commit comments