mirror of
https://github.com/LukeHagar/polar.git
synced 2025-12-06 12:47:46 +00:00
45 lines
939 B
JavaScript
45 lines
939 B
JavaScript
import globals from "globals";
|
|
import pluginJs from "@eslint/js";
|
|
import tseslint from "typescript-eslint";
|
|
|
|
export default [
|
|
{ files: ["src/**/*.{js,mjs,cjs,ts,tsx}"] },
|
|
{
|
|
ignores: [
|
|
"dist/**",
|
|
"eslint.config.js",
|
|
"**/_generated/",
|
|
"node10stubs.mjs",
|
|
],
|
|
},
|
|
{
|
|
languageOptions: {
|
|
globals: globals.worker,
|
|
parser: tseslint.parser,
|
|
|
|
parserOptions: {
|
|
project: true,
|
|
tsconfigRootDir: ".",
|
|
},
|
|
},
|
|
},
|
|
pluginJs.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
{
|
|
rules: {
|
|
"@typescript-eslint/no-floating-promises": "error",
|
|
"eslint-comments/no-unused-disable": "off",
|
|
|
|
// allow (_arg: number) => {} and const _foo = 1;
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"warn",
|
|
{
|
|
argsIgnorePattern: "^_",
|
|
varsIgnorePattern: "^_",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
];
|