Skip to content

Commit

Permalink
chore(deps): update dependency typescript-eslint to v8 (#3064)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency typescript-eslint to v8
* chore: fix lint errors
* chore: simplify code
* chore: remove eslint-plugin-deprecation

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
Co-authored-by: Shinigami92 <chrissi92@hotmail.de>
  • Loading branch information
3 people authored Aug 30, 2024
1 parent c850653 commit 8f01d29
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 95 deletions.
27 changes: 2 additions & 25 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// @ts-check
/* eslint-disable @typescript-eslint/no-unsafe-argument */
import { fixupPluginRules, includeIgnoreFile } from '@eslint/compat';
import { includeIgnoreFile } from '@eslint/compat';
import eslint from '@eslint/js';
import stylistic from '@stylistic/eslint-plugin';
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';
Expand All @@ -27,6 +26,7 @@ export default tseslint.config(
'docs/.vitepress/components/shims.d.ts',
'docs/.vitepress/shared/utils/slugify.ts',
'docs/.vitepress/theme/index.ts',
'eslint.config.js',
],
},
{
Expand Down Expand Up @@ -57,7 +57,6 @@ export default tseslint.config(
'@typescript-eslint': tseslint.plugin,
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: true,
warnOnUnsupportedTypeScriptVersion: false,
Expand Down Expand Up @@ -140,29 +139,7 @@ export default tseslint.config(
},
//#endregion

//#region deprecation
{
plugins: {
deprecation:
// https://github.com/gund/eslint-plugin-deprecation/issues/78
// @ts-expect-error: Just eat it!
fixupPluginRules(eslintPluginDeprecation),
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: true,
warnOnUnsupportedTypeScriptVersion: false,
},
},
rules: {
'deprecation/deprecation': 'error',
},
},
//#endregion

//#region unicorn
// @ts-expect-error: Ignore for now
eslintPluginUnicorn.configs['flat/recommended'],
{
rules: {
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
"eslint": "9.9.0",
"eslint-config-prettier": "9.1.0",
"eslint-define-config": "2.1.0",
"eslint-plugin-deprecation": "3.0.0",
"eslint-plugin-jsdoc": "50.2.2",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-unicorn": "55.0.0",
Expand All @@ -127,7 +126,7 @@
"tsup": "8.2.4",
"tsx": "4.17.0",
"typescript": "5.5.4",
"typescript-eslint": "7.18.0",
"typescript-eslint": "8.3.0",
"validator": "13.12.0",
"vite": "5.4.1",
"vitepress": "1.3.3",
Expand Down
160 changes: 102 additions & 58 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/locale-imports.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { keys } from '../src/internal/keys';

describe.each(keys(allLocales))('locale imports', (locale) => {
it(`should be possible to directly require('@faker-js/faker/locale/${locale}')`, () => {
// eslint-disable-next-line @typescript-eslint/no-var-requires, unicorn/prefer-module
// eslint-disable-next-line @typescript-eslint/no-require-imports, unicorn/prefer-module
const { faker } = require(`../dist/locale/${locale}.cjs`) as {
faker: Faker;
};
Expand Down
Loading

0 comments on commit 8f01d29

Please sign in to comment.