diff --git a/eslint.config.mjs b/eslint.config.mjs index 9516f4b..2ad5ca2 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,30 +1,17 @@ -import { FlatCompat } from '@eslint/eslintrc' -import js from '@eslint/js' +import eslint from '@eslint/js' import typescriptEslint from '@typescript-eslint/eslint-plugin' import tsParser from '@typescript-eslint/parser' +import sort from 'eslint-plugin-sort' 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) - -//TODO: cleanup compat https://acquia.atlassian.net/browse/FE-1172 -const compat = new FlatCompat({ - allConfig: js.configs.all, - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, -}) +import tseslint from 'typescript-eslint' export default [ { ignores: ['**/lib/', '**/packages/eslint-playground/'], }, - ...compat.extends( - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:sort/recommended', - ), + eslint.configs.recommended, + ...tseslint.configs.recommended, + sort.configs['flat/recommended'], { languageOptions: { globals: { diff --git a/package.json b/package.json index 4ef6911..2d61ba3 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "globals": "^15.8.0", "jest": "^29.7.0", "prettier": "^3.3.2", - "typescript": "^5.5.3" + "typescript": "^5.5.3", + "typescript-eslint": "^7.16.0" } } diff --git a/yarn.lock b/yarn.lock index c541425..0656c1f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3739,6 +3739,7 @@ __metadata: jest: ^29.7.0 prettier: ^3.3.2 typescript: ^5.5.3 + typescript-eslint: ^7.16.0 languageName: unknown linkType: soft