UNPKG

poto-siril

Version:

Automatization around Siril (<https://siril.org/>) for deep sky astrophotography.

89 lines (80 loc) 2.09 kB
import typescriptEslint from "@typescript-eslint/eslint-plugin"; import globals from "globals"; import tsParser from "@typescript-eslint/parser"; 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 [ { ignores: ["**/dist/"], }, ...compat.extends( "eslint:recommended", "plugin:@typescript-eslint/recommended", ), { plugins: { "@typescript-eslint": typescriptEslint, }, languageOptions: { globals: { ...Object.fromEntries( Object.entries(globals.browser).map(([key]) => [key, "off"]), ), }, parser: tsParser, ecmaVersion: "latest", sourceType: "module", }, rules: { indent: [ "warn", 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1, MemberExpression: 1, FunctionDeclaration: { parameters: 1, body: 1 }, FunctionExpression: { parameters: 1, body: 1 }, CallExpression: { arguments: 1 }, ArrayExpression: 1, ObjectExpression: 1, ImportDeclaration: 1, flatTernaryExpressions: false, offsetTernaryExpressions: true, ignoreComments: false, }, ], "no-tabs": "error", "linebreak-style": ["error", "unix"], quotes: ["error", "double"], semi: ["error", "always"], "comma-dangle": ["error", "always-multiline"], "@typescript-eslint/no-unused-vars": [ "error", { varsIgnorePattern: "^_", }, ], }, }, { files: ["**/.eslintrc.{js,cjs}"], languageOptions: { globals: { ...globals.node, }, ecmaVersion: 5, sourceType: "commonjs", }, }, ];