|
| 1 | +import globals from "globals"; |
| 2 | +import path from "node:path"; |
| 3 | +import {fileURLToPath} from "node:url"; |
| 4 | +import js from "@eslint/js"; |
| 5 | +import {FlatCompat} from "@eslint/eslintrc"; |
| 6 | + |
| 7 | +const __filename = fileURLToPath(import.meta.url); |
| 8 | +const __dirname = path.dirname(__filename); |
| 9 | +const compat = new FlatCompat({ |
| 10 | + baseDirectory: __dirname, |
| 11 | + recommendedConfig: js.configs.recommended, |
| 12 | + allConfig: js.configs.all |
| 13 | +}); |
| 14 | + |
| 15 | +export default [{ |
| 16 | + ignores: ["test/data/output", "lib/css2xpath/*"], |
| 17 | +}, ...compat.extends("airbnb-base"), { |
| 18 | + languageOptions: { |
| 19 | + globals: { |
| 20 | + ...globals.node, |
| 21 | + }, |
| 22 | + |
| 23 | + ecmaVersion: 2020, |
| 24 | + sourceType: "commonjs", |
| 25 | + }, |
| 26 | + |
| 27 | + rules: { |
| 28 | + "func-names": 0, |
| 29 | + "no-use-before-define": 0, |
| 30 | + "no-unused-vars": 0, |
| 31 | + "no-underscore-dangle": 0, |
| 32 | + "no-undef": 0, |
| 33 | + "prefer-destructuring": 0, |
| 34 | + "no-param-reassign": 0, |
| 35 | + "max-len": 0, |
| 36 | + camelcase: 0, |
| 37 | + "no-shadow": 0, |
| 38 | + "consistent-return": 0, |
| 39 | + "no-console": 0, |
| 40 | + "global-require": 0, |
| 41 | + "class-methods-use-this": 0, |
| 42 | + "no-plusplus": 0, |
| 43 | + "no-return-assign": 0, |
| 44 | + "prefer-rest-params": 0, |
| 45 | + "no-useless-escape": 0, |
| 46 | + "no-restricted-syntax": 0, |
| 47 | + "no-unused-expressions": 0, |
| 48 | + "guard-for-in": 0, |
| 49 | + "no-multi-assign": 0, |
| 50 | + "require-yield": 0, |
| 51 | + "prefer-spread": 0, |
| 52 | + "import/no-dynamic-require": 0, |
| 53 | + "no-continue": 0, |
| 54 | + "no-mixed-operators": 0, |
| 55 | + "default-case": 0, |
| 56 | + "import/no-extraneous-dependencies": 0, |
| 57 | + "no-cond-assign": 0, |
| 58 | + "import/no-unresolved": 0, |
| 59 | + "no-await-in-loop": 0, |
| 60 | + "arrow-body-style": 0, |
| 61 | + "no-loop-func": 0, |
| 62 | + "arrow-parens": 0, |
| 63 | + "default-param-last": 0, |
| 64 | + semi: 0, |
| 65 | + "operator-linebreak": 0, |
| 66 | + "nonblock-statement-body-position": 0, |
| 67 | + curly: 0, |
| 68 | + "implicit-arrow-linebreak": 0, |
| 69 | + indent: 0, |
| 70 | + "object-curly-newline": 0, |
| 71 | + "semi-style": 0, |
| 72 | + "function-paren-newline": 0, |
| 73 | + "prefer-template": 0, |
| 74 | + "newline-per-chained-call": 0, |
| 75 | + "prefer-arrow-callback": 0, |
| 76 | + "no-bitwise": 0, |
| 77 | + "prefer-const": 0, |
| 78 | + "no-extra-semi": 0, |
| 79 | + "max-classes-per-file": 0 |
| 80 | + }, |
| 81 | +}]; |
0 commit comments