Skip to content

Commit

Permalink
chore: finalize config
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Jul 18, 2024
1 parent 8d5f73f commit 37f402c
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// @ts-check
/* eslint-disable @typescript-eslint/no-unsafe-argument */
import { includeIgnoreFile } from '@eslint/compat';
import { fixupPluginRules, includeIgnoreFile } from '@eslint/compat';
import eslint from '@eslint/js';
import eslintPluginDeprecation from 'eslint-plugin-deprecation';
import eslintPluginJsdoc from 'eslint-plugin-jsdoc';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
import vitest from 'eslint-plugin-vitest';
import eslintPluginVitest from 'eslint-plugin-vitest';
import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import tseslint from 'typescript-eslint';
Expand Down Expand Up @@ -132,7 +132,10 @@ export default tseslint.config(
//#region deprecation
{
plugins: {
deprecation: eslintPluginDeprecation,
deprecation:
// https://github.com/gund/eslint-plugin-deprecation/issues/78
// @ts-expect-error: Just eat it!
fixupPluginRules(eslintPluginDeprecation),
},
languageOptions: {
parser: tseslint.parser,
Expand All @@ -142,9 +145,7 @@ export default tseslint.config(
},
},
rules: {
// TODO @Shinigami92 2024-04-08: Add eslint-plugin-deprecation later
// https://github.com/gund/eslint-plugin-deprecation/issues/78
// 'deprecation/deprecation': 'error',
'deprecation/deprecation': 'error',
},
},
//#endregion
Expand Down Expand Up @@ -209,11 +210,6 @@ export default tseslint.config(
},
//#endregion

//#region vitest
// TODO @Shinigami92 2024-04-08: Add vitest later
// https://github.com/veritem/eslint-plugin-vitest/issues/413
//#endregion

//#region prettier
eslintPluginPrettierRecommended,
//#endregion,
Expand Down Expand Up @@ -246,7 +242,7 @@ export default tseslint.config(
{
files: ['test/**/*.spec.ts', 'test/**/*.spec.d.ts'],
plugins: {
vitest,
vitest: eslintPluginVitest,
},
rules: {
'deprecation/deprecation': 'off',
Expand All @@ -260,7 +256,7 @@ export default tseslint.config(
},
],

...vitest.configs.recommended.rules,
...eslintPluginVitest.configs.recommended.rules,

'vitest/expect-expect': 'off',
'vitest/no-alias-methods': 'error',
Expand Down

0 comments on commit 37f402c

Please sign in to comment.