Skip to content

Commit

Permalink
⬆ ESLint Migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Nich87 committed Nov 25, 2024
1 parent a69abd4 commit aa8fe43
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

39 changes: 39 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { FlatCompat } from '@eslint/eslintrc';
import js from '@eslint/js';
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import globals from 'globals';
import path from 'node:path';
import { fileURLToPath } from 'node:url';

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: ['**/build/', '**/node_modules/', '**/.env']
},
...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'),
{
plugins: {
'@typescript-eslint': typescriptEslint
},

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

parser: tsParser,
ecmaVersion: 'latest',
sourceType: 'module'
},

rules: {}
}
];
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@
},
"license": "MIT",
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.15.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"globals": "^15.12.0",
"prettier": "^3.3.3",
"ts-node": "^10.9.2",
"typescript": "^5.7.2"
Expand Down

0 comments on commit aa8fe43

Please sign in to comment.