Skip to content

Commit

Permalink
chore(deps): update dependency eslint to v9 (#664)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <[email protected]>
  • Loading branch information
renovate[bot] and viceice authored Nov 13, 2024
1 parent f915f7a commit 30da0a0
Show file tree
Hide file tree
Showing 7 changed files with 538 additions and 222 deletions.
43 changes: 0 additions & 43 deletions .eslintrc.js

This file was deleted.

119 changes: 119 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/* eslint-disable import/no-named-as-default-member */
import eslintContainerbase from '@containerbase/eslint-plugin';
import js from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginImport from 'eslint-plugin-import';
import pluginPromise from 'eslint-plugin-promise';
import globals from 'globals';
import tseslint from 'typescript-eslint';
import eslintJestPlugin from 'eslint-plugin-jest';

export default tseslint.config(
{
ignores: [
'**/.git/',
'**/.vscode',
'**/node_modules/',
'**/dist/',
'**/coverage/',
'**/__fixtures__/**/*',
'**/__mocks__/**/*',
'**/*.d.ts',
'**/*.generated.ts',
'tools/dist',
'patches',
],
},
{
linterOptions: {
reportUnusedDisableDirectives: true,
},
},
js.configs.recommended,
...tseslint.configs.recommendedTypeChecked.map((config) => ({
...config,
files: ['**/*.{ts,js,mjs,cjs}'],
})),
...tseslint.configs.stylisticTypeChecked.map((config) => ({
...config,
files: ['**/*.{ts,js,mjs,cjs}'],
})),
eslintPluginImport.flatConfigs.errors,
eslintPluginImport.flatConfigs.warnings,
eslintPluginImport.flatConfigs.recommended,
eslintPluginImport.flatConfigs.typescript,
eslintJestPlugin.configs['flat/recommended'],
eslintJestPlugin.configs['flat/style'],
pluginPromise.configs['flat/recommended'],
eslintContainerbase.configs.all,
eslintConfigPrettier,
{
files: ['**/*.{ts,js,mjs,cjs}'],

languageOptions: {
globals: {
...globals.node,
},
ecmaVersion: 'latest',
sourceType: 'module',
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},

settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
},
},
},
},
{
files: ['**/*.{ts,js,mjs,cjs}'],
rules: {
camelcase: 0,
'no-param-reassign': 'warn',
'require-await': 'error',
'no-use-before-define': 0,
'no-restricted-syntax': 0,
'no-await-in-loop': 0,
'prefer-template': 'off',
'promise/always-return': 'error',
'promise/no-return-wrap': 'error',
'promise/param-names': 'error',
'promise/catch-or-return': 'error',
'promise/no-native': 'off',
'promise/no-nesting': 'warn',
'promise/no-promise-in-callback': 'warn',
'promise/no-callback-in-promise': 'warn',
'promise/avoid-new': 'warn',

// TODO: fixme
'@typescript-eslint/no-require-imports': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-argument': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/prefer-nullish-coalescing': 0,
'@typescript-eslint/prefer-optional-chain': 0,
'@typescript-eslint/restrict-template-expressions': 0,
},
},
{
files: ['test/**/*.{ts,js,mjs,cjs}'],
languageOptions: {
globals: {
...globals.jest,
},
},
rules: {
'prefer-destructuring': 0,
'prefer-promise-reject-errors': 0,
'import/no-extraneous-dependencies': 0,
'global-require': 0,
},
},
);
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,29 @@
"test": "run-s prettier eslint markdown-lint jest"
},
"devDependencies": {
"@containerbase/eslint-plugin": "1.1.0",
"@eslint/js": "9.14.0",
"@types/eslint-config-prettier": "6.11.3",
"@types/jest": "29.5.14",
"@types/node": "20.17.5",
"conventional-changelog-conventionalcommits": "8.0.0",
"eslint": "8.57.1",
"eslint": "9.14.0",
"eslint-config-prettier": "9.1.0",
"eslint-formatter-gha": "1.5.1",
"eslint-import-resolver-typescript": "3.6.3",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jest": "28.9.0",
"eslint-plugin-promise": "7.1.0",
"globals": "15.12.0",
"husky": "9.1.6",
"jest": "29.7.0",
"lint-staged": "15.2.10",
"markdownlint-cli2": "0.14.0",
"npm-run-all2": "7.0.1",
"prettier": "3.3.3",
"prettier-plugin-packagejson": "2.5.3",
"semantic-release": "24.2.0"
"semantic-release": "24.2.0",
"typescript-eslint": "8.14.0"
},
"packageManager": "[email protected]",
"engines": {
Expand Down
Loading

0 comments on commit 30da0a0

Please sign in to comment.