|
| 1 | +// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ |
| 2 | +// ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃ |
| 3 | +// ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃ |
| 4 | +// ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃ |
| 5 | +// ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃ |
| 6 | +// ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫ |
| 7 | +// ┃ Copyright (c) 2017, the Perspective Authors. ┃ |
| 8 | +// ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃ |
| 9 | +// ┃ This file is part of the Perspective library, distributed under the terms ┃ |
| 10 | +// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃ |
| 11 | +// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ |
| 12 | + |
| 13 | +import tseslint from "typescript-eslint"; |
| 14 | +// import globals from "globals"; |
| 15 | + |
| 16 | +export default tseslint.config( |
| 17 | + { |
| 18 | + ignores: [ |
| 19 | + "docs/**", |
| 20 | + "tools/**", |
| 21 | + "rust/**", |
| 22 | + "examples/**", |
| 23 | + "packages/cli/**/*", |
| 24 | + "packages/jupyterlab/**/*", |
| 25 | + // "packages/viewer-charts/**/*", |
| 26 | + // "packages/viewer-datagrid/**/*", |
| 27 | + "packages/workspace/**/*", |
| 28 | + "packages/react/**/*", |
| 29 | + |
| 30 | + ".emsdk/**", |
| 31 | + "**/py_modules/**", |
| 32 | + "**/node_modules/**", |
| 33 | + "**/dist/**", |
| 34 | + "**/build/**", |
| 35 | + "**/target/**", |
| 36 | + "**/pkg/**", |
| 37 | + ], |
| 38 | + }, |
| 39 | + ...tseslint.configs.recommended, |
| 40 | + { |
| 41 | + files: ["**/*.{ts,mts,tsx}"], |
| 42 | + languageOptions: { |
| 43 | + parserOptions: { |
| 44 | + projectService: true, |
| 45 | + tsconfigRootDir: import.meta.dirname, |
| 46 | + }, |
| 47 | + // globals: { |
| 48 | + // ...globals.browser, |
| 49 | + // ...globals.node, |
| 50 | + // }, |
| 51 | + }, |
| 52 | + rules: { |
| 53 | + "@typescript-eslint/no-explicit-any": "off", |
| 54 | + curly: "warn", |
| 55 | + "padding-line-between-statements": [ |
| 56 | + "warn", |
| 57 | + { blankLine: "always", prev: "block-like", next: "*" }, |
| 58 | + ], |
| 59 | + "@typescript-eslint/no-unused-vars": [ |
| 60 | + "warn", |
| 61 | + { |
| 62 | + args: "none", |
| 63 | + varsIgnorePattern: "^_", |
| 64 | + caughtErrorsIgnorePattern: "^_", |
| 65 | + }, |
| 66 | + ], |
| 67 | + |
| 68 | + // // This is why we can't have nice things. I like this rule, but |
| 69 | + // // `prettier` doesn't, so we conform or perish. |
| 70 | + // |
| 71 | + // "lines-around-comment": [ |
| 72 | + // "warn", |
| 73 | + // { |
| 74 | + // beforeLineComment: true, |
| 75 | + // beforeBlockComment: true, |
| 76 | + // }, |
| 77 | + // ], |
| 78 | + "@typescript-eslint/no-empty-object-type": "off", |
| 79 | + "@typescript-eslint/no-unused-expressions": "off", |
| 80 | + "@typescript-eslint/no-this-alias": "off", |
| 81 | + "@typescript-eslint/no-require-imports": "off", |
| 82 | + "@typescript-eslint/ban-ts-comment": "off", |
| 83 | + "@typescript-eslint/no-namespace": "off", |
| 84 | + "@typescript-eslint/no-wrapper-object-types": "off", |
| 85 | + "@typescript-eslint/no-unsafe-function-type": "off", |
| 86 | + "no-empty": "off", |
| 87 | + "no-prototype-builtins": "off", |
| 88 | + "no-control-regex": "off", |
| 89 | + "no-useless-escape": "off", |
| 90 | + "no-async-promise-executor": "off", |
| 91 | + "no-cond-assign": "off", |
| 92 | + "no-misleading-character-class": "off", |
| 93 | + }, |
| 94 | + }, |
| 95 | + { |
| 96 | + files: ["examples/**/*.{ts,mts,tsx}", "tools/bench/**/*.{ts,mts,tsx}"], |
| 97 | + rules: { |
| 98 | + "@typescript-eslint/no-unused-vars": "warn", |
| 99 | + }, |
| 100 | + }, |
| 101 | +); |
0 commit comments