Skip to content

Commit

Permalink
fix: nice autoconfig?
Browse files Browse the repository at this point in the history
  • Loading branch information
bddvlpr committed Sep 26, 2024
1 parent aebe74d commit 7a13108
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 31 deletions.
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mkYarnPackage rec {

offlineCache = fetchYarnDeps {
yarnLock = src + "/yarn.lock";
hash = "sha256-SePDL1jsGL+HPEMFC0T8a7n90jn02Ef3AeBmPmLt8Uo=";
hash = "sha256-AOTjgcUgE6C9v9dksliYTGrE0Xzr89coNaaRAOVldK0=";
};

nativeBuildInputs = [makeWrapper];
Expand Down
66 changes: 36 additions & 30 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,46 +1,52 @@
import typescriptEslintEslintPlugin 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";
import typescriptEslintEslintPlugin 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
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [{
ignores: ["**/.eslintrc.js"],
}, ...compat.extends("plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"), {
export default [
{
ignores: ['**/.eslintrc.js'],
},
...compat.extends(
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
),
{
plugins: {
"@typescript-eslint": typescriptEslintEslintPlugin,
'@typescript-eslint': typescriptEslintEslintPlugin,
},

languageOptions: {
globals: {
...globals.node,
...globals.jest,
},
globals: {
...globals.node,
...globals.jest,
},

parser: tsParser,
ecmaVersion: 5,
sourceType: "module",
parser: tsParser,
ecmaVersion: 5,
sourceType: 'module',

parserOptions: {
project: "tsconfig.json",
tsconfigRootDir: "/home/bddvlpr/Documents/Projects/github.com/bddvlpr/untis-ics-sync",
},
parserOptions: {
project: 'tsconfig.json',
},
},

rules: {
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
}];
},
];

0 comments on commit 7a13108

Please sign in to comment.